(This isn’t entirely GFX related, but I can’t seem to find a forum this would fit into…)
Its an overhead 2D game, tile based. It takes place in individual screens, like the older Zeldas did.
Right now, I have it so it reads levels in from files, allowing me to implement a level editor and maybe in the future allow players to add their own levels. (The game knows how to load them and when based on the file number). This works all fine and well until i get to ingame “events”.
Currently, the level files look like this:
Beta Zone
nnnnnnnnnnnnnnnnnnnnnnnnn
dgggggggggdgggggggggggggd
ggggggggggdgggggggggggggg
ggggggggggdgggggggggggggg
ggggggggggdgggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
ggggggggggggggggggggggggg
dgggggggggggggggggggggggd
NULL LINE. EVENTS NEXT
nnnnnnnnnnnnnnnnnnnnnnnnn
xxxxxxxxxxtxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxx
1
(It doesnt format perfectly here, but I’m sure you’ll get the drift)
I read it in using basic dataInputStream stuff, and it works very nicely. It gets and draws the level, and reads that there is a “teleport” event tile at t in the 2nd grid. (The 2nd grid kind of “overlays” the first grid so to speak, as an event layer. That is how it appears in the editor too). Now the 1 at the end is supposed to show the destination zone for the teleport event. However, when I try to read the 1 in using .readInt(), it gives me an end of file exception, and gets some insane number instead of 1. I’m using notepad, so i dont THINK there are any hidden formatting things screwing up the .readInt()…if anyone knows why this is happening, it would be greatly appreciated.
Also, I’m looking for any tips/advice you have on implementing the events system…thanks for your time
Feel free to move this post if there is a forum section more suited for it…