ChevyRay - isometric

Posted by happytrash on April 21, 2007, 11:28 p.m.

[[ copied from http://eocommunity.co.uk ]]

No blog in awhile, time for an update I imagine; I'll start with the good news.

I got the awaited call from the University of Victoria, and I was accepted into first year Computer Sciences in the Faculty of Engineering. I am excited, and I love learnin'.

In the electronic world, I've been working hard just playing around with some engines and pixels. Lately, fooling around with some isometric sprites, I realized that isometric games are scarce in the GM Communities, and not only that, but rarely include platforming aspects such as jumping, gravity, and whatnot. Now I like isometric games a lot, and especially the platforming ones… examples?

Super Mario RPG (duh) for the SNES, one of the greatest games of all time, featured wonderful graphics, but limited isometric platforming mechanics. Fortunately, it had a great battle system to back that up.

Screenshots at MobyGames

Landstalker for the Sega Genesis was a game I stumbled upon and fell in love with a long time ago, back in the days when I loved to play Sonic 2, Shining Force 1/2, and Shadowrun on the ol' Genesis. Landstalker's graphics were a bit odd, but the storyline was much deeper than Zelda III (Landstalker's counterpart for Genesis' rival at the time, SNES) and the puzzles relied more on logic or platforming rather than tools.

Screenshots at MobyGames

Anyways, I've been piling up isometric scripts for over a year now, and will continue to do so in no order and whenever I want. Every time I jump back into isometric programming, I discover something new and add it to my collection. In a year or so, maybe I will use it all to compile a beautiful isometric extension, engine, and/or tutorial. I may even start up a community if I really get into it. With that lah-tee-dah over with, I'll share some info at what I've worked out so far…

ISOMETRIC PLATFORMING

Movement and Depth.

Obviously the first thing I set out to do. This was easy, of course, but necessary.

Height and Position

I set about creating platforms with different heights, next. This is also not new, or difficult at all. But there is one issue I noticed, when doing this, that really annoyed me.

This little area, you'll see that there are 3 platforms. But here's the question: is the topmost platform adjacent to the leftmost one? The answer, no.

If I rotate it to get this image, you'll see that the topmost platform (now at the bottom) was actually a lower platform at a higher position, and not adjacent to the other two. Now, if you're playing an isometric platform game and you come across a piece of land that looks like that first image above, there's no way of telling whether you can walk from the leftmost platform to the topmost one; to get rid of this problem, I used a method that I learned from playing Final Fantasy Tactics Advance, to avoid the same thing…

Since this only happens on the top left and right sides of these platforms, the trick is to have an outline drawn around it when there is nothing of the same or greater height attached to it. I used a white line to indicate the change, though it looks ugly… but anyhow, notice that there is no top-left line on the bottom platform, and that is because it is attached to the leftmost one, and to let you know they are connected, there is no outline drawn. The result will have continuous lines drawn on edges that fall off, and separate them from the ones they are distant from.

I've noticed that pixel artists tend to hate outlines, but I think they are necessary sometimes. It's not so bad, either; take a look at this image, a bunch of platforms of different heights, and without the outlining. Now, compare it to the next…

That's not so bad, is it? It helps establish depth and positioning of the platforms, and hardly kills the pixel work. Also, if you don't like black outlines, you could simply use darker colors of the respective platform… like for example, if I used dark-green on these ones, it wouldn't even look like an outline, but it'd still help establish depth and position.

Anyhow, that's it for that. Sometimes you want lines drawn on the sides of the platforms as well, which only helps achieve what I just have.

Gravity and Jumping

Now, if I wanted to have an isometric platform engine, I think that being able to actually ascend and descend the raised platforms would be a BIG bonus – so I did that too. This was also pretty easy. First off, every object has a z position and a [h]eight value. The z position is the height at which they are sitting, and their height is how far up they extend from their z position. For example, if the character is standing on a 8-pixel-high block, his z value is 8. And since the character is 20 (or so) pixels tall, his height is 20. Thus, the top of the character is 28 pixels off the ground level, where z = 0. For jumping, I simply created a gravity system that functioned with z, so I had the following varables:

z_speed –> The speed at which your height is increasing. - means you are ascending, and + means you are descending.

z_grav_acc –> The acceleration of the gravity. Equivalent to gravity in GML for vspeed.

z_grav_max –> The max speed at which the gravity can accelerate to; aka: the greatest value z_speed can reach.

z_below –> IMPORTANT. This is the dynamic value that records the height of the platforms below you. As your z increases by z_speed, the furthest down it can fall is to

z_below. So if a 16-pixel-tall platform is below you when you jump, z_below=16, and when z>=16, the gravity will stop and you will land on that platform, setting z to 16. Also, because the character can walk in pixels, and not snap to the grid, there are often several levels of ground below him. In this case, z_below is set to the value of the tallest platform that is not higher than the character's own z value.

z_jump –> Your jumping speed. When the jump button is pressed, z_speed is set to z_jump.

With these, and the fact that platforms are only solid if your z is lower than theirs (except for the floating ones) you can jump up, land on platforms, and also walk around in all 4 directions. Also, because z_below only registers platforms whose z lies below the character's, if there is a floating platform in your position and its z is higher than the character's, he will still be able to jump while below it. Either way, with all these functioning, it was easy to do the following…

Floating Platforms that Move and your character can ride.

Platforms that Ascend and Descend and your character can stand on to go gain or lose height.

Movable Platforms that your character can push around and use as a step-up (the metal box in the engine screenshot above)

And pretty much anything else that side-view platforming games can offer, except just with a new perspective and 3d level design! I thought it was pretty cool; now you can see why I look forward to compiling a full-out engine to support this baby, which will at the LEAST support all of these features. Don't expect it for awhile, though. There is reason to doubt that I have discovered the best means of accomplishing all this, and until I've optimized the engines to the best of my ability, there will be nothing for anybody to see. :)

Have a gooooood day, evening, and night y'all.

PS: Oh, and there is no Bad News, by the way. ;D I'll end it on that note.

Comments

Jabberwock 17 years ago

Holy gee. Clearly I have a lot to learn about isometry.

[deleted user] 17 years ago

That was awesome, really…

The sprites are really sexy too, I find isometric sprites hard.

Mu6502 17 years ago

Isometric yum yum!

WaleedAmer 17 years ago

Haha, nice job! That thing looks beastly!

beam 17 years ago

haha that game looks great

Shork 17 years ago

I have been trying to do this stuff for so damn long. Seeing this makes all my work feel worthless… Oh well, I have finals to study for anyway, if you've done all this work for me, that will increase time for molecular and cellular biology.

happytrash 17 years ago

@Jabberwock: Well, now you know who to call, right? :)

@Biggerfish: I have been practicing isometric sprites for a long time, though, and those are still only mediocre as far as really good pixel art goes. My first ones could've been sprited better by poo. A lot of helpful tutorials and examples can be found on the net, and referral pictures help a LOT too. Play LOTS of isometric games, which you can tell I like a lot.

@Murftronics: I can see by your truck :) yum yum indeed! Iso is my heart's content. Actually, judging by all the positive replies, would I be safe to assume that isometric-style games are well-liked in these communities? Everybody I've shown this too so far gives me big thumbs up. If so, then I'm definitely headed in the right direction for making a name for myself.

@Amerup: Thanks; actually, the only really good thing in that image is the tree, and possibly the grass texture. If you've seen good iso art (pixeljoint!), then you KNOW what beastly is. BUT, I must say, I've gone all out on the animation, so once you see this baby moving, you'll really learn to appreciate it :) I'd imagine. He has smooth walking, jumping, and pushing animations. And everything else I've pixeled for the game so far is also very adequately and thoroughly animated.

@beam: :)

@Shork: Yeah, hopefully if I can get a good set of isometric scripts up, as well as a nicely compiled example, tutorial, and extensions… then you'd all be able to have such an engine, with only a teeny-weeny credit to myself, probably in size 6 font in the corner of the credits screen. ;)

Don't wait for it though… I'm terrrrible at making examples, and if I were to do so, it would have to be a joint project with someone else who is adequate at isometric programming so they could help me out and point out where and how I can touch it up and repair it. Either way, it's a nice though.

Thanks y'all! More news coming very soon,

Chevy Ray