LD48 # 26

So yea i am doing one more of these again and it’s starting in about two hours from now, i am going to update this page as i go as well as tweet it, but first things first.

1. last time didn’t go that well, i came almost last out of several hundreds of entries, so i somewhat limiting my scope this time, it’s going to be entirely 2D for starters and not use physics anymore complicated than what was used in super mario.
2. I am using this toolkit, it’s a somewhat updated version of the previous one and adds a few things i need for this game, like the ability to load a texture into cpu memory instead of gpu, and generating a x by y grid of sprites.
I am pretty sure there are going to be more things added as i go.


Day 1 report:

I got basically all rendering besides the hud working, as well as a lot of movement, no physics yet, but it’s up next.
I spent a stupid amount of time fixing bugs related to the mismatched coordinate systems i am forced to use, but i think i got them all since the last code for th day was basically testing what tile color on the map is at the players coordinates.

Anyway im off to sleep now so here is a screen shot for your enjoyment



Final result:

48 hours passes quickly when debugging but i finally made it with two hours to spare and i think it turned out pretty well save for some issues i will discuss later, but im pretty impressed that i got sound working.
The game is called “the Escape” is itself pretty short, again due to time constraints, but it’s mostly an issue regarding level editing, in fact feel free to mod the game by editing the file maparea.tga and send it to me, if it’s good enough i might post it or use it in a special edition later on.
Though for that i think i might add things like extra tiles a background layer, liquids like mud, water and lava (lava is in the game but is currently considered a solid and you can actually land on it) , save points and a timer, that and more now that i have a lot more time to work on it. (contact me if your interested)

So any way, download it here and screenshot belowthe Escape


Issues, things i learned and things to change for the next time:

1. coordinate systems are a pain, seriously, i had so many that it in the end became a problem, i had screenspace, tilespace, mapspace which is tilespace in reverse on the y axis.
the player and the maps had slightly different coordinate systems which made colision detection a mess, player used float while map used int.
Not to mention that all the gui stuff used it’s own coordinate space.

all in all i need to unify all of that like i have for 3D space where i among other things have 1.0f=1M.

2. rendering was problematic not only did the tile renderer refuse to work properly the first day, first it didn’t want to generate a 1024×1024 grid of quads, so i had to separate them in to a 32×32 grid of 32 x32 tiles (originally this was all that was going to be displayed, but i later changed my mind).
But now only a few of the tile grids was rendering, that took like 2 hours to fix, and finally i though that it would be nice if i didn’t have to render all of the 2 million polygons generated, but not the coordinate systems put a stop to that, but is’t fast enough to handle that so it doesn’t matter.

all the rest of the sprites was a bit of a hack as well as for every sprite i had to generate a separate FSQ object (Full screen Quad) which is normally used to render just that for backgrounds, post processing and stuff.

So for the next time i need a way to arbitrarily draw a sprite using the same coordinate system and layout as the collision detection system should use.
Along with various ways of rendering 2d art without the requirement of first generating them as i do with 3d and i might go that route with 3D as well later on.

3. while texturing wasn’t exactly a problem this time i can see the need for my texture loading to be enhanced, like loading a texture atlas into a texture array, having more image formats to choose from and so on.

4. Physics is another thing i have to work on, this time it wasn’t that hard because of the nature of the game, essentially all i had to do is to check the distance between to cubes on both x and y axis separately and if they are both in range they are colliding which is pretty easy.
now if i want to do proper physics in my toolkit i am going to need objects and that presents a bit of a problem since it’s a toolkit with lots of helpful functions and not a full on game engine with classes and such.
The simplest route would be to make a struct that stores all the relevant information about the object, but i would like to attach things to those objects and give them additional properties, i have an idea, but it’s still a hard thing to do.
Even harder would be to make an entity structure in the same way and have it automatically generate proper animations and behavior, again i have an idea, but it’s pretty complex.

5. in addition i also think i will need a new basecode, the one i have still works but it’s missing some really important stuff, also whenever i have to change something in (like window size) it i have to dig deep down into the guts of it to find where it is, in addition the error messages need to improve and it needs to be more error tolerant.

Please play the game, comment on it and suggest improvements.

1 Comment

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment


WordPress Themes