Oblique Projection Mini-Demo

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
Not exactly rocket science but any sort of projection requires a little ingenuity. The old school oblique projection was often slated compared to 'proper' isometric games but if it was good enough for Ultima 7 it can't be all bad :D

This mini demo is recorded as a gif hence the jumpiness.

obworld.gif
 

RaspberryDJ

Member
Joined
Jun 3, 2019
That looks great. Would it be hard to add the ability to jump and have like two levels on top of each other?
 

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
That looks great. Would it be hard to add the ability to jump and have like two levels on top of each other?
Multiple layers would be ok, not sure about jumping I'd have to give that some thought!
 

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
Here y'go. A bit confusing with these placeholder graphics but there's a solid 'bridge' near the top and a bridge with an openwork middle near the bottom.

obworld2.gif
 

rickychus

Member
Joined
Sep 26, 2017
Hello,
Coincidentally I've been looking for PDF books related to this theme, retro-style games to the old school. But I have not been lucky.
Maybe also an isometric view like Diablo 1 or 2?
Any books / article / tutorial to recommend?
Thank you R.-
 
Last edited:

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
Well there are plenty of isometric view tutorials on the net (or there were when I last looked into the subject a decade or so back!) but they seem to have become less relevant with the advent of tools such as Unity and Godot which take all the pain out of this type of view - just slap in some scenery, bung in your sprites, adjust the camera and off you go!

Top of the Google search list is https://gamedevelopment.tutsplus.com/tutorials/creating-isometric-worlds-a-primer-for-game-developers--gamedev-6511 which is a decent intro but like most tutorials on this subject it stops when you get to the tricky bits.

I struggled for ages to get proper sprite making working for that type of view - I did it eventually in Blitz Basic, I've still got the source and Win executable if anyone wants it although I imaging the source is pretty horrible. Basically the method was to draw the scene, work out where the player (or any other sprite) was situated and grab that chunk of the scene into a temporary bitmap. The player was then rendered into that bitmap (overlapping everything!), then any scenery 'in front of the player' was also rendered into that same bitmap. The temporary bitmap was then drawn back over the main scene - job done! The downside happens when you get several sprites on screen that also need to be properly masked - you have to work out the correct Z order before you start rendering to those temporary bitmaps and it soon gets messy (and probably too slow). I'm sure the 'proper' method is to create a properly z-ordered 'draw list' with sprites inserted at the correct location - I've tried it several times but never fully succeeded.

I imagine Ultima 7 used the more unusual oblique projection because it's considerably 'cheaper' and that game had more than enough going on without having to expend processing power on a 'proper' isometric view. Anyway, for my little demo the technique also uses the draw list idea, simply working out where (or rather when) the player needs to be draw. The problem that always arises is incorrect masking ie sprites suddenly 'pop through' the edges of walls they're supposed to be behind. There are two ways to fix that - the easy way (that I've used) is to keep the sprite slightly away from the walls. The second way is to draw the sprite in two or more parts depending how much it overlaps adjacent cells. I've tried that several times, I've got close but it always makes my head hurt too much :D

For a general overview of projections, this page is great (and will probably bring back memories for some old codgers like me :p):


Hope that's some help :D
 

Rich

Active Member
3rd Party Module Dev
Joined
Sep 9, 2017
my eyes had to do a shift, like looking into a stereo 3d picture. The top right 3D is like an Escher picture ;-)

i like this a lot, it might be clearer if the blocks height isnt the same is the width/length (maybe half height).
this way the character might not fully disappear behind corridors (but this might be a feature of this effect)
 

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
my eyes had to do a shift, like looking into a stereo 3d picture. The top right 3D is like an Escher picture ;-)

i like this a lot, it might be clearer if the blocks height isnt the same is the width/length (maybe half height).
this way the character might not fully disappear behind corridors (but this might be a feature of this effect)
Yeah, it needs careful artwork/shading to prevent blocks 'inverting' like an optical illusion.

The half-height wall idea has been used in lots of games to reveal more of the character or other sprites.

Here's a half height block with a bit more cut out and a simple ramp (although no code to use that yet).

ob4.gif
 

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
Happily, multiple sprite rendering also works... (maybe this should be in dev logs rather than showcase?)

ob5.gif
 

Paul59

Active Member
CX Code Contributor
Joined
Dec 13, 2018
Location
UK
That's what I thought about all my GUI posts
Your GUI module is pretty complete so probably does belong here. I put this little demo here without expecting to do any more with it but I'm having fun expanding it a bit!
 
Top Bottom