News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

WIP Transversion

Started by Typhon, 22:50, 22 April 24

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Typhon

Evening all,
 
Some screenshots of a new project: Transversion: a port to the CPC of the 1983 Solar-Fox/Gridrunner game originally for the Speccy. I'm using the lovely CPCTelera library, and I hope to have it completed in a few weeks, and I'll be including a few of the graphical tweaks from the awesome versions by Denis Grachev, (Sector and Sector:Invasion) which were released a few years ago, also for the Spectrum. Will work on any CPC, and full source code will be available. Stay tuned to this thread for more details!

0.png1.png7.png5.png6.pngYou cannot view this attachment.3.png4.png2.png

Gryzor

Didn't know of this, looks interesting.



But please do something about the sound 😁

Typhon

Quote from: Gryzor on 04:11, 23 April 24Didn't know of this, looks interesting.



But please do something about the sound 😁
Our lovely MrLou has granted me permission to use some of his music instead of the Speccy's dulcet tones.

Typhon

    Next steps:
  • add enemy bullets/collision detection
  • game over splash
  • music/sfx
  • extra graphical touches and effects

Typhon

You cannot view this attachment.You cannot view this attachment.You cannot view this attachment.

menegator

Nice. An idea, if it's not to late, make the tiles like bombjack, if you take them at a certain order to get higher score.

lightforce6128

I always liked this game on the Atari 2600:

https://youtu.be/sk3resNu1kA?feature=shared&t=186

I'm looking forward to your CPC version.

Typhon

Alright, so a brief video of a WIP. Note that this is obviously way too slow and sluggish. I'm still writing my code as if I've got unlimited fps and a graphics card to play with! But now I have a vague idea of what is going on, its time to properly optimise stuff and get rid of stuff that doesn't translate well on a Z80 (for example, needless integer division and unnecessary redrawing of areas on the screen that haven't changed!), and to make the frame rate like the proverbial poo off a shovel.




Typhon

I've done some optimisation and additional work, though its not smooth or speedy enough yet. But its an enjoyable process to do so. I've got collision detection switched off for development purposes.


Typhon

Cracked the speed issue. Next stop, collision detection and death animations. I also need to look at ensuring things all happen at a consistent pace, and there's no slowdown or speedup depending on what is happening on screen.


ervin

Wow that's a big difference!
What were the main optimisations that led to the speed-up?

Typhon

OK, so the gameplay is functionally complete, and I've attached the game-as-is. Would welcome any feedback. To load run "tv2024.bas".

Next stop - extra graphics/animations, and of course music/sfx. I've got almost 14k free currently, so plenty of space for some nice stuff.

Typhon

QAOP or Joystick to control, H to pause.

Secret Keys in this level: ESC to abort/quit, or C to move onto next level.

Jean-Marie

Nice :) Could you please add the Cursor keys in the list of redefinable keys ?
I noticed that sometimes, when I'm hit by a laser bolt, I remain unscathed. I dunno if that's a bug, or maybe I misunderstood something?

Typhon

Think I just need to adjust the timing of the game code a bit. Player movement and bolt movement are updated on different frame-counters for speed reasons. :-)

I'll change things so you can redefine to cursor keys too, as well, as enabling of cancelling of the redefine screen without having to go through all the list of controls!

Typhon

Quote from: ervin on 03:57, 06 May 24Wow that's a big difference!
What were the main optimisations that led to the speed-up?

To belatedly answer your question:

  • instead of scanning the whole playfield (25 x 17 grid) for tiles that have been marked dirty to redraw, each bolt/enemy etc now just keeps two tiles to redraw directly.
  • Precalculate the sprite for each possible cell on the grid (there's only 12 possible variations)
  • Remove in/out parameters where possible and replace with globals
  • Precalculate as much as possible into static arrays
  • Adjust what gets done each game loop, and control that by a frame-counter set in the interrupt.
  • Get rid of any divisions, and replace structs inside structs so that a struct never contains anything other than normal types.
The long and the short, I stopped programming like I could refresh the entire screen at 50fps :-)

ervin

Nice one.
Lots of cool optimisation ideas in there.

Powered by SMFPacks Menu Editor Mod