Joefish wrote: ↑Mon Nov 04, 2019 5:55 pm
Or although BASIC is fairly slow, some graphics engine that can be set up from BASIC then have the whole screen rendered in a single operation. This would have to be something simple, maybe static screens or a small number of moving objects.
All of the games I finished making were written in BASIC and compiled using ZIP compiler (after it appeared on the Your Sinclair covertape, Christmas 1993 - best Christmas EVER!!!)
This was fine for single-screen games, but ultimately I ended up creating Z80 routines for screen drawing, scrolling, and drawing bitmasked sprites for later projects... all sadly unfinished and lost on cassettes in an attic somewhere.
Nevertheless, even in BASIC these were playable to some extent - and the compiled versions require pointless "do nothing" loops inserted into them to lower the frame rate (particularly as I didn't know about interrupts back then!)
So, I'm new here & delving back into the Z80 after a long haitus... I know I'm nowhere near competent enough to write a game in pure Z80 code, but I'm currently working on ideas for a collision map, and sprite printing routines with screen edge cropping (rather than "only show it if it's fully on screen"). It's all gonna be 8x8 block based at the moment because... baby steps! I can work my way towards pixel-based stuff later...
Long story short - the collision engine I'm designing can have a map of arbitrary size (up to 256 x 256), so could be useful for multiple game formats. One of the first milestones will be testing it on a fixed-height horizontal scroller, with the collision map being twice the width of the screen - the idea being that enemy sprites who've disappeared off screen can still interact with their surroundings, even though you can't see them; so they could still bounce off a wall and re-enter the screen, or if you are following them you could catch them up again. It also solves the issue of sprites suddenly appearing when they're in full view, rather than scrolling into view gracefully (hence the need for the sprite cropping routine!)
So there you go - this thread piqued my interest because my proposed routines sound like something that would fit your "graphics engine run from BASIC" scenario. Let me know if you want to know further info on what I've planned for its internal workings