Game Development Reference
In-Depth Information
This will keep us busy for a while, but in the end we will probably have something that will
hopefully be able to entertain people for more than 3 minutes.
Some items on this list are easy fixes. After playing around with Pixelmator for 15 minutes,
I ended up with a bullet that is visible on both light and dark backgrounds:
Highly visible bullet
Motion and firing mechanics will either have to be tuned setting by setting, or rewritten
from scratch. Implementing score system, powerups and improving enemy AI deserve to
have chapters of their own. The rest can be taken care of right away.
Drawing Water Beyond Map Boundaries
We don't want to see darkness when we come to the edge of game world. Luckily, it is
a trivial fix. In Map#draw we check if tile exists in map before drawing it. When tile
does not exist, we can draw water instead. And we can always fallback to water tile in
Map#tile_at :
class Map
# ...
def draw (viewport)
viewport . map! { | p | p / TILE_SIZE }
x0, x1, y0, y1 = viewport . map( & :to_i )
(x0 . .x1) . each do | x |
(y0 . .y1) . each do | y |
row = @map [ x ]
map_x = x * TILE_SIZE
map_y = y * TILE_SIZE
if row
tile = @map [ x ][ y ]
if tile
Search WWH ::




Custom Search