Sunday, October 9, 2011

So far so good

Well after a fierce coding battle and hardcore bug tracing (yeah i'm so badass... not) the invisible fence of the death was defeated and now everyone can walk touching walls! YIKES! Also the fireballs are now officially behaving like they should and they are damaging the enemies! Wohooo!!! everything is starting to look better and i'm extremely happy about that.


There is one more thing I added to the game and honestly it was easier than i thought it would be at first: a moving camera. Yeah it shouldn't be something so hard to do, at first I was thinking of the most inefficient and slow way to do it, wich was moving each and every object according to an offset calculated by the player's position and the actual screen position.... this IS TERRIBLY SLOW because I would have needed to move each object from one cell of the Grid to another each time the game updated 1 frame of the game (and there should be at least 60 frames per second for the game to move smoothly) so this was clearly not the best idea and so i kind of dropped it, gave up, and decided to keep simple screen-sized maps and navigate through them using some kind of doors.... That was my idea until today (well it's now 3 am but it's not tomorrow until you wake up!) when i suddenly thought about it again and asked myself "what if I didnt have to actually move the objects? what if I just draw them where i want them to be seen?" (If you thought about this at the beginning then you are smarter than me hahaha, but sometimes we just complicate things too much don't we?) So i started coding what i had in mind about drawing the sprites where i wanted them to be, and it was done pretty quickly and it works great! What the code does is calculate the offset I talked about before, and then on the section of the code that takes care of the drawing i just added this "offset vector" (because it involves the X and Y axis) to move the sprites that are near the player to the screen, even when they are actually never moving.


So...  let's see, I'm gonna share with you my TODO list for the near future:

  • Fix the annoying crosshair: With the new camera thingy added I now have to deal with how am I going to aim to a place outside the screen when I'm not actually moving and the mouse only works within the screen limits... I'm sure this is not big deal but today i just didn't want to do it... was kind of lazy....
  • Update the Map-Editor: Again! thanks to the new camera I have to update the Map-Editor so I can... you know... edit... the whole map not just the part visible on the screen. I'm also wondering what would be a good map size to begin with... but I'll decide it later, there are no restrictions to this anymore since I broke free from the screen's evil you-cant-use-bigger-maps spell so I could even vary it depending on the circumstances.
  • XNA 4.0: I started using XNA when it was on the 3.1 version, I stayed with it until now because I wasn't really making progress with the game... but now I am and now there's another reason to go from 3.1 to 4.0 for me: remember the screenshot from the last entry? well, look at the wizard for a sec, noted something strange? yes, there's this weird shine behind him .... that's not supossed to be there and I found 2 ways to correct it, one for 3.1 and one for 4.0 and for the sake of moving on im going for the 4.0 option, besides, it seems to be better for what im trying to do.
  • A Real First Level: So!!!! by this point I should have everything I need to make a real First Level! wohoooo so exciting! Anyways, with the editor finished I will start thinking about some simple desing for this first level so it can be fun and exciting right at the beginning, I'm aiming at this because I learned at the Global GameJam that a game should be fun or interesting within the first 5 minutes of gameplay, so I think I'm gonna look for some tutorials on levels design and when I get something I'm  happy with I'll post it.



That's all for now, soon I'll talk a bit about what kind of gameplay I'm aiming for, but now I'm going to sleep, good night!

No comments:

Post a Comment