View Single Post
Old 10 August 2018, 22:51   #9
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,510
Good progress! Congratulations.


Quote:
Originally Posted by LeCaravage View Post
- The tiles with collision attribute = -1 could now handle diagonals colision -not only pure horizontal ones-. I mean I added tiles/plateforms with slopes and the hero sticks to it when walking on. In fact, the collision detection routine handles the same way these tiles, they could be perfectly horizontal or sloping. Of course, obviously same will be for ennemies.
Wow! That's huge! Slopes are the holy grail of tile-based games!

In fact I gave up on slopes in my current game project, because my head exploded while trying to implement them in the most efficient way.


Quote:
But, as I don't know if the game will run at full frame yet, it could be possible to meet the need to change all anims delays/speed. As when the game drops from 50Hz to 25hz, it could look so slow if you don't adapt these parameters.
It's a fixed-screen game, without any scrolling? And you are coding in assembler? You really should be able to keep 50Hz, if you don't make very stupid mistakes.


Quote:
hero/map collision detection for the projectiles. Added an 'explosion' animation when a projectile meets a wall or tile with collision attribute=1.
BTW, how did you encode the tile attributes? In an additional table, referenced indirectly by the tile-code? Or included in the tile code?

You wrote in the previous posting that you don't have more than 64 different tiles in a map, so there would be 2 bits left in a byte. Using the MSB for the most important attribute would allow you fast checks with the N-flag.


Quote:
Need to scan the projectiles table at every loop when adding or removing a projectile type from it, as a projectile could disappear before a previous one (You're an alien if you did understand).
Indeed, I didn't understand.

But as soon as you have a certain amount of objects to handle, a list may be better than a table.


Quote:
- Until now I didn't need backbuffer -remember the hero and projectiles are hardware sprites-. Added backbuffer swap routine.
Does every BOB get its own backbuffer, or do you have a pool of buffers which you assign to active BOBs?

Other solutions would be triple buffering, with the third bitmap dedicated for restoring the background. Or using a bitmap with a set bit for every dirty tile on the screen (I used this method in my latest project - works best with lots of foreground tiles and BOBs).


Quote:
So far, the whole object code is 190Kb. 140 Kb fast ram, and 50Kb Chip ram.
140K for code and data is a lot. Uninitialized data (BSS) not included?
phx is offline  
 
Page generated in 0.04404 seconds with 11 queries