Demo of multidirectional scroll 50fps
Hello!!!
Im working with scrolls, and I want to show you a demo of a posible game.
It works at 50fps and can manage about 7 sprites in the screen with different
behaviours.
Im working with scrolls, and I want to show you a demo of a posible game.
It works at 50fps and can manage about 7 sprites in the screen with different
behaviours.
Post edited by climacus on
Comments
It looks really impressive
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
Twitter: Sokurah
The screen is 12x7 (16x16) tiles.
How big is your backbuffer?
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
Twitter: Sokurah
I dont use backbuffer. So the left, rigth and down borders must be in black attribute. For upper, Ive done a small routine for calculating the part of the sprite to be shown.
Well, Id say something like Afteroids...
Games List 2016 - Games List 2015 - Games List 2014
JSpeccy-win32-portable
Nice. cannot await to show the finished game to some commodore users.
https://www.youtube.com/watch?v=NnmBqkW-1aE
i think
drawing sprites on the upper border
after sprites here is a background refreshing
something like push hl,de,bc,af because 3 tiles per line.
good and fast technology. but poor background.
The idea is to make a scroll game at 50fps with an interesting number of sprites in the screen.
Perhaps someting like Alien Syndrome but with more frenetic action.
So it has some limitation such as the number of tiles per line (as @Jerri said)
I can put only two different tiles or three if the tiles are not repeated.
Ive done a scroll routine managing four tiles per line, but it did?t work at 50fps with a sufficient number of sprites in the screen.
The most complicated problem to solve has been to calculate where to put the sprites in the map in order to avoid no tresspasing areas. And it can be work better.
And, how about the sound? I dont know if I will have to sacrifice some sprite for it...
Bytes:Chuntey - Spectrum tech blog.
Sorry. Ive been out of Internet!!!
Thanks, Polomint!!!!!!
I dont know, but I prefer finish with 50fps first...
yeah
main zx spectrum problem - low screen refreshing speed.
Joffa Smith make games with 25 fps - Firefly was created on this technology.
you can play sfx on free tacts. as maked in firefly :)
I don't really understand this limitation. How does this work?
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
Twitter: Sokurah
Well, Ill try explain it (perhaps I doing it in wrong way)
Each line of the map takes 16 pixels high.
Each tile takes 16x16 pixels.
I use POP AF, POP HL, POP DE, POP BC for taking the grahic to print in the line and I put ir in the screen with PUSHes for these registers.
Each graphic takes 4 preshifted tiles so takes 16 high for 64 width.
For example each graphic can be: grass-tomb-tomb-grass and its shifted.
So after POPs the registers have:
AF=grass-tomb
HL=tomb-tomb
DE=tomb-grass
BC=grass-grass
If I put PUSH AF it will appear the tile grass-tomb (in the properly shifted).
If the following is PUSH HL, it will appear a tomb, etc...
So I only can combine two tiles because I dont have more registers to use.
I can use IX, IY or alternative registers, but it is slower.
I dont know how it works in other games (like Cobra). Ive wanted to do it by myself.
I hope Ive explained me properly
Hmm, I think I've got it...think so. :lol: I guess there are some things you can not really know how works fully unless you really sat and developed it yourself.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation, SQIJ.
Twitter: Sokurah
:lol:
So with two different cell types on a row (e.g. grass and wall) you have four different combinations as things scroll horizontally: grass -> more grass, grass -> wall transition, wall -> more wall and wall -> back to grass. You treat each screen block as a mini-animation of what may pass through it as the maze scrolls horizontally.
Now you pre-load each of those combinations into registers AF, BC, DE and HL, then use a tailored list of PUSH instructions to draw the appropriate pre-shifted animation into each position on the screen.
You can use more registers, but it hugely complicates things to have the extra codes for IX, IY or EXX instructions in there and it makes things slower. So that's why you stick with two cell types per row, so there are only four different sequences.
Vertical scrolling is a lot easier, as you just raise and lower the screen address you're writing to.
Yes, it's how Cobra works and how my 50Hurts demo works.
Though Cobra has an extra trick. Although the PUSH puts up 16 pixels at a time, it can shift left and right by a byte (8 pixels). That means that instead of an empty block, a solid block, and two transitions, you can have an empty block, and three narrow items so long as they're only 8 pixels wide plus one scroll step (i.e. 9 or 10 wide). Like the way Miner Willy animates, they scroll sideways within a 16x16 block then the whole frame jumps 8 pixels just before they slide out of it. It means you don't need transitional versions of these blocks, and is how the narrow vertical pillars and pipes are done all on the same row in Cobra.
- IONIAN-GAMES.com -