0 Members and 3 Guests are viewing this topic.
Progress:Implemented ship motion, shooting, and dynamic backgrounds. The background is generated as needed. The user may shoot while moving the ship. The firing rate is dependent on whether the shoot button is held down or pressed rapidly (to mimic the old NES behavior). Any "stuttering" happening with shooting and moving is due to my inability to use the left hand and simultaneously shoot and move, while filming with my right hand. On the calculator, it's very smooth.The entire source code is 13KB including graphics (so far). I imagine the game engine will (hopefully) be under 100KB and the rest will be graphics. I wrote a playable version of COLUMNS that was only 35KB or so; I cannot imagine this would be that much more complicated.
That looks very nice. Do you have any idea how you will implement collisions detection yet ?
Quote from: MacBernick on January 18, 2014, 07:27:06 amThat looks very nice. Do you have any idea how you will implement collisions detection yet ? Some ideas I had were to use pixel tests. The game screen is broken into layers. There will be a layer for background walls, and a layer for enemies. "Blank" regions in each layer are colored with a masking color (lime green). The collision detection will first detect if the position of a shot corresponds to a lime green pixel (no collision) in the wall / enemy layers or a non-green pixel (collision occurred). If enemy collision occurs then it will search the enemies list and mark it as destroyed. For speed, only the ship and the bullets will detect collision. For the ship, we search a bullet list only if the colored pixel is within a specific range of colors (thatwill not be used for enemies).The thought is that a pixel test would be quick and save some computational time. The alternative would be to search the enemy list and possibly get no collision, which eats up CPU time.My approach right now is to add a few elements of the game in at a time and find the slowest frame rate. If it is acceptable, then I'll complete the project and turn it into an actual game in which all the other frames are timed accordingly so that there aren't moments where everything moves fast and other areas where you see too much slowdown. In the event that I cannot optimize the code to an acceptable frame rate, I'll just release the code as is for someone else to play with.Maybe I should have made a blog on the process...