Author Topic: tile-based engine (cpctelera)  (Read 139 times)

0 Members and 1 Guest are viewing this topic.

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 976
  • Country: au
    • index.php?action=treasury
  • Liked: 637
tile-based engine (cpctelera)
« on: 13:34, 21 April 17 »
Hi folks.

Since completing my cpctelera line-drawing package last year, I've not done any coding.
But that itch never goes away, and I've decided to pick up the compiler once again.
 :laugh:

Anyway, a few years back I wrote a tile-based engine using ccz80, but only used it for a simple demo.
It ran quite well, but I've learned a lot since then (and of course RUNCPC used a tile-based display)...

So I thought I'd write a tile-based side-scrolling platformer using cpctelera.

So far there is no scrolling. Or platforming.
But there are tiles, and the screen display routines are done, and I'm seeing some nice possibilities.

Hopefully I'll manage to finish a game with it (even something simple!).
I can imagine a full-screen game running quite quickly with this engine, though obviously it's a little early to tell!
I'm hoping to have quite a zoomed-in viewpoint, with a large main character.

The first attachment is simply a box that can be moved around the screen using the arrow keys, but it gives a good idea of the speed.
Note that while the screen display routines are optimised, nothing else is.
(i.e. the positioning of the squares and the tiles of the box itself are done using C, not asm).

Note that I have no idea how to use hardware tricks and crtc registers or any of that stuff.
This is all done in software, and uses a dirty buffer approach, to achieve a high speed display.

Also, I want this to run on a 464, and I'll probably need as much RAM as possible, so no double-buffering.
This of course results in a bit of screen-tearing, but to be honest I kind of like it!
 :P
« Last Edit: 14:02, 21 April 17 by ervin »
RUNCPC
My entry for the CPCRetroDev 2015 Competition
http://www.pouet.net/prod.php?which=66566

FAST line drawing in CPCtelera
http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/

Online ||C|-|E||

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 1.532
  • Country: gb
    • Mundo CPC
  • Liked: 867
Re: tile-based engine (cpctelera)
« Reply #1 on: 15:04, 21 April 17 »
It actually looks very cool!! Can I encourage you to go for a 128KB version as well?  :)

Offline ervin

  • Supporter
  • 6128 Plus
  • *
  • Posts: 976
  • Country: au
    • index.php?action=treasury
  • Liked: 637
Re: tile-based engine (cpctelera)
« Reply #2 on: 15:13, 21 April 17 »
It actually looks very cool!! Can I encourage you to go for a 128KB version as well?  :)

Thanks!
 :)

I'll have to think about that... spare time is hard to find, so I'll have to see how the "464 version" comes along.
RUNCPC
My entry for the CPCRetroDev 2015 Competition
http://www.pouet.net/prod.php?which=66566

FAST line drawing in CPCtelera
http://www.cpcwiki.eu/forum/programming/drawing-lines-with-cpctelera-sdcc/

Offline Arnaud

  • Supporter
  • CPC6128
  • *
  • Posts: 224
  • Country: fr
  • Liked: 145
Re: tile-based engine (cpctelera)
« Reply #3 on: 16:01, 21 April 17 »
It's nice to see new projects made with CPCTelera, it's rather quiet these days.

Good technical demo, the animation is quite smooth.