Merrak's Isometric Adventures -- Dimetric Dilemna

merrak

  • *
  • Posts: 2738
Here's my first actual room rendered. It's a bit lacking in decoration. I added light fixtures, but no furniture. Someone will move in there eventually... but who??  >:(

I still need to optimize some more, but I'm pretty close to getting to make an actual game.

Thief of Vallas has gone through a lot of revisions. The concept I was happiest with was the cinematic platformer variation (think Prince of Persia), but it was lacking depth. The first generation of the isometric renderer couldn't handle multiple heights, which essentially ruled out any kind of vertical exploration.

Now I have the best of both worlds, albeit with mobile and Flash no longer an option. While I can probably get the engine running well enough to make a Flash game plausible, I think the only way I'm going to have a shot at monetizing my work is to shoot for something like Steam.

« Last Edit: June 10, 2016, 11:39:49 pm by merrak »

NobodyX

  • *
  • Posts: 1228
Last pics are very Diablo-like, I like it! This is very cool to be done in stencyl.

merrak

  • *
  • Posts: 2738
Some more progress has been made--
I now have a proper camera that can scroll through the levels. In the process of debugging the camera I found and corrected some poorly optimized code. hxScout shows about half of CPU usage goes to rendering, and a big chunk of that is managing the drawing order. Much earlier in the thread I discussed using Painter's Algorithm to handle drawing. I thought of a better approach, but will save this for a future update--after I try it out.

In the meantime, I put some more thought into how to design levels. Stencyl's 2D scene editor works very well until I get to maps with many levels. It's hard to visualize how the layers stack when all the floors are separated into their own regions.

So I started putting together an in-game level editor. Not only will this help me visualize levels, it's also part of the game--so players can design their own dungeons. I attached a sample level and its output. There are only five blocks to choose from. I think the comparison shows how different types of lighting can add a lot of variety using a very small number of assets.

Last pics are very Diablo-like, I like it! This is very cool to be done in stencyl.

Thanks! :D  I had imagined a Diablo-like game that follows many of the conventions of cinematic platformers. Prince of Persia has always been a significant influence--I'd like to have a lot of the vertical exploration and deep pits found in the older 2D games.

mdotedot

  • Posts: 1654

In the meantime, I put some more thought into how to design levels. Stencyl's 2D scene editor works very well until I get to maps with many levels. It's hard to visualize how the layers stack when all the floors are separated into their own regions.

So I started putting together an in-game level editor. Not only will this help me visualize levels, it's also part of the game--so players can design their own dungeons. I attached a sample level and its output. There are only five blocks to choose from. I think the comparison shows how different types of lighting can add a lot of variety using a very small number of assets.



WOW !! That would be great. I love level editors.
Especially when you can open-source it (hint , hint)

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

gurigraphics

  • Posts: 690
Create the map in Tiled and import the TMX file or JSON is a option also. A example for Phaser:

https://github.com/mathieuanthoine/haxe-phaser-plugin-isometric

But the lighting really makes all the difference.

mebloo

  • Posts: 128
I would love making a Landstalker-like game with what you've done :D

merrak

  • *
  • Posts: 2738
WOW !! That would be great. I love level editors.
Especially when you can open-source it (hint , hint)

I spent many hours modding Doom and Xwing when I was younger :D . Make the type of games you'd like to play is pretty good advice, so I can't see not having an editor. It'll be necessary, anyway. Due to the vast number of animation frames required for different types of light, atmosphere--and even for some of the characters, I might be better off designing a type of WAD system than importing all the assets directly into Stencyl. I'll have to sit down and think pretty carefully about how to move forward. Optimizations aside, the engine is close to done.

I don't think Tiled will be a better option. I looked through Phaser, though. The design of the code is pretty similar to "Vallas Isometric Engine", which is basically a Stencyl plugin that replaces many of the default blocks for actor and scene manipulation.

At some point I'll release the extension itself. Maybe someone will come along and make some improvements to it. The second generation of "Vallas Isometric" is designed for true 3D environments. Although the camera is still fixed, gameplay is not limited to a 2D plane. I'm not completely sure where the line between 2.5D and 3D is drawn. I could call it 2.75D :P

I would love making a Landstalker-like game with what you've done :D

Landstalker looks like it takes place on a 2D plane. I released an extension and sample game a few pages back that would work pretty well for any isometric game without a 3D world. I'm not sure where the sample game is--it's in the thread somewhere. The extension only does the math. Even that may not be necessary though. I looked through a bunch of screenshots and I don't see any examples of real-time depth sorting. The standard 2D scene editor and careful arrangement of graphics in the tiles may be all you need.

Edit: Sample game and extension is here: http://www.anorthogonaluniverse.com/public-code/isometric.php. I believe the extension is also in the official list, but without the sample game.

Bombini

  • *
  • Posts: 1400
Fantastic job on the light engine!

merrak

  • *
  • Posts: 2738
Fantastic job on the light engine!

Thanks! :)

While I was on a flight yesterday, I managed to think of a way to improve shadow generation. I'm not sure if it's worth implementing or not. In theory it will work. It's a twist on the usual 2D shadow generation. In practice, I haven't yet figured out if it'll run in a reasonable time.

Crovaxus17

  • Posts: 76
You have clearly put a lot of work and thought into this. What you have come up with seems pretty incredible considering that Stencyl is a 2D engine. My question is this: Have you given any thought to pathing for enemies? It seems hard enough on a 2D plane, but with a 3rd dimension. . . yikes!

merrak

  • *
  • Posts: 2738
You have clearly put a lot of work and thought into this. What you have come up with seems pretty incredible considering that Stencyl is a 2D engine. My question is this: Have you given any thought to pathing for enemies? It seems hard enough on a 2D plane, but with a 3rd dimension. . . yikes!

I actually designed the AI Tools Extension the way I did for this purpose. The attached .png file is the room from the top of Page 7 of this thread as seen from the scene editor. Actually, it's just the first two floors.

I drew a graph over it, with an additional edge for the staircase. CPU controlled actors can use this graph to navigate the room using A* or any other path-finding algorithm.

merrak

  • *
  • Posts: 2738
9. Making a Player-Customizable Game

Over the past few days I designed a WAD file-like scheme to manage the assets in the game. The motivation to go this route comes from not wanting to load all the animation states for the heroine into Stencyl manually.

Figure 1: 8 animation frames for one state (walking) in one of 8 directions

I use MakeHuman to render the figures, then draw clothes on by hand. It's kinda tedious, but doable. The big news on this front is that MakeHuman 1.1 was released, and I might be able to use Blender to render some better motions. I might even be able to make 3D clothes. I'm not sure which would be more time consuming--learning a new skill, or doing it the (long) way I know how.

In any case, I'll have a lot of images. I recently discovered Fast for xml parsing in Haxe, which the Stencyl engine itself uses. Now that I can parse xml, I can make config files. Here's an example.

Code: [Select]
<asset type="structure" template= "Generic Pillar" name="brick1-pillar">
<number behavior="Wall" attribute="XOffset">64</number>
<number behavior="Wall" attribute="YOffset">128</number>
<number behavior="Wall" attribute="XOrigin">32</number>
<number behavior="Wall" attribute="YOrigin">32</number>
<number behavior="Wall" attribute="DrawStackOffset">0</number>
<number behavior="Wall" attribute="MaxZBound">32</number>
<text behavior="Wall" attribute="ImageFile">brick1/pillar-diffuse.png</text>
<text behavior="Wall Lighting" attribute="LeftAmbientFile">brick1/pillar-ambient-left.png</text>
<text behavior="Wall Lighting" attribute="RightAmbientFile">brick1/pillar-ambient-right.png</text>
<text behavior="Wall Lighting" attribute="LeftShadowFile">dark/xz-full.png</text>
<text behavior="Wall Lighting" attribute="RightShadowFile">dark/yz-full.png</text>
</asset>

It's probably not clear what this does, but it's pretty simple. When the file is read, it changes the contents of the attributes in an actor's behaviors. These are the same parameters that define the brick pillars in the earlier screenshots. I can now set up template actors, then load their "real" values in-game. The structure I set up allows for assets and 'libraries', which are collections of assets and can function like PWADs in Doom. Each asset is given a name, and could potentially be overwritten by a player that wishes to load a patch. No access to the .stencyl project file is needed to customize the game from the user's end.

Working with the raw xml files is pretty easy, but theoretically, someone could write an editor if they wished to.

Anyway-- Fast is a great little tool, and appropriately named.

merrak

  • *
  • Posts: 2738
Not really a game, but I did want to demonstrate a small isometric graphics library I've been working on.

<a href="http://static.stencyl.com/games/34523-0.swf" target="_blank" class="new_win">http://static.stencyl.com/games/34523-0.swf</a>

The library is capable of rendering arbitrarily positioned 3D figures, where as Vallas Isometric is only capable of rendering static images. The trade-off is that this new library does not feature any kind of texturing.

I might make another game with the 3D library, but I'd rather release it as an extension and see what other people might come up with. Since this library allows arbitrary positions, a Monument Valley like game might be doable. I haven't really tested the performance, though.

LIBERADO

  • *
  • Posts: 2720
I'd rather release it as an extension and see what other people might come up with.
Wow! This is a very interesting extension. It is really impressive.
If it has a good performance, we could make original fun games with it.
I'm spanish, excuse me for my bad English.
I'm not a private teacher. Please, post your questions in the public forum.

merrak

  • *
  • Posts: 2738
Wow! This is a very interesting extension. It is really impressive.
If it has a good performance, we could make original fun games with it.

Thanks :)

I recently stumbled upon Isomer, which served as an inspiration. While most of the underlying framework was pulled from Vallas Isometric, I tried to replicate the features of the Isomer API while also adhering to the standard Stencyl features. While it's not quite as versatile as Isomer, it does work with the standard blocks and events.

I had to write new rendering routines, and these need some work. Once that's done, I'll put out a beta version.

Current features include:
Single-source lighting
Construct rectangular solids and pyramids
Basic geometric transformations: rotation, translation, scale

Remaining features to implement:
A few more basic solids
Render stand-alone faces
Bug fixes and other miscellany