RAGE1: New Adventure Game Engine for ZX Spectrum

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Good night,

during the last weeks I have been developing an Adventure Game Engine for ZX Spectrum based on Alvin Albrecht's great SP1 sprite engine. My main motivation was to create a ZX Spectrum game for my kids, but as I was writing it I thought it would be better to refactor most of it in the form of a game engine. This way, similar games could be easily made with it. Heavy inspiration was taken from MK1 La Churrera, by Mojon Twins.

My personal game is still quite in its early infancy, but I'd like to share with you RAGE1: Retro Adventure Game Engine, release 1.

The public repo is at https://github.com/jorgegv/rage1. You can find a README on the main page, and some usage and development documentation. This is a work in progress (and will be for a long time!) so please accept my apologies in advance for lacking documentation or functionality.

I'd very much appreciate any feedback and comments about it.

Have fun, and long live the ZX Spectrum! :-)
Jorge
amateus
Member
Posts: 46
Joined: Fri Nov 15, 2019 9:13 am

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by amateus »

This seems really interesting. I'll be watching it. Nice work.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by Timmy »

I am reading at the requirements right now, and other than z88dk and perl (that I don't know how to use) and fuse, I have no idea what the rest are.

I've also read most of the files in the doc directory, and I still have not much idea how to use it.

I think I've seen some really old Churrera before, I think there, Churrera needs many inputs:

* map data from mappy,
* sprites and wall tiles from an image(?),
* scripts for the scripting engine,
* a background for main screen.

What does your engine need for inputs?

I see that you have a scripting engine too.

For me, it seems to be harder to learn than C.

I like what you have done, but I think you need some better examples and documentation if you want other people to use it.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Hi Timmy, thanks for your time reviewing.

The requirements are for Linux, since that's where I do all my development. I should specify that in the docs.

The engine inputs you are asking for are in the game_data directory (you'll find sprites, game definitions, maps and scripts), which gets translated by the tools in the tools directory to files in generated directory. These files are automatically included in the compilation.

There are no graphic tools for generating the data files, other than the sprite data being extracted from PNG files. Probably it would be good that RAGE could use Mappy outputs or something, but I'be had some trouble compiling the tools for Linux (I don't do WIndows, sorry). May be I can use WINE to use the WIndows tools.

I'll do my duty and enhance the documentation with a starter guide.

Thanks again
Jorge
Last edited by jorgegv on Sat Feb 06, 2021 8:52 am, edited 1 time in total.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Well, I added a warning to the main README so that people know that for the moment it's been only tested under Linux. And also, the development branch for the Flowgen tool (the scripting engine) has been finally bug-fixed and merged into master.

I have opened myself a couple of issues for this documentation and also for making a Windows-compatibe build script.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Hi again @Timmy,

I have added detailed instructions for building under Windows, and I also have added links and reorganized the READMEs for better guidance about how or where to start reading/developing with RAGE1.

I think most of what you wanted to know about the engine (inputs, outputs, etc.) is included in the doc/USAGE.md document.

I hope you can give it a second look with this info. I warn you that the demo game is not polished at all, but instead is intended to exercise and demonstrate all the engine modules. I'm also working on a couple of games using this engine, which I'll share when they are ready.

Thanks again
Jorge
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by Timmy »

I have looked a second time (and a third) at it, and I decided it's not for me.

A bit because of all the extra stuff I need to install.

But mostly because the way how I make and design games is a bit different. (I'll make a separate thread for that later.)

Some comments:

1) I don't think your installation document is near complete. Have you tried it yourself on a fresh computer?
I was installing a 2.1 version of z88dk 2 weeks ago and I noticed I needed to build sp1 myself. Is that in your instructions? (I assume you need sp1.)

2) The "USAGE" link in your readme leads to a 404 page.

3) It's a month later now, have you tried finishing a game now? What do you think of it yourself?
You should try finish one game now. Try not to make "finishing a game" time longer than to learn z88dk and sp1.
Try to make a game with 10 rooms. It's fine for a first game.

4) If you are having problems with making or designing of a game, you can ask here. And I can see if I can help.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Timmy wrote: Thu Mar 18, 2021 9:40 pm I have looked a second time (and a third) at it, and I decided it's not for me.

A bit because of all the extra stuff I need to install.

But mostly because the way how I make and design games is a bit different. (I'll make a separate thread for that later.)
Well I think this is mostly due to my development environment being Linux and not WIndows. I'm quite looking forward to your game design thread, I've read your recent posts and they have been quite enlightening.
Timmy wrote: Thu Mar 18, 2021 9:40 pm
Some comments:

1) I don't think your installation document is near complete. Have you tried it yourself on a fresh computer?
I was installing a 2.1 version of z88dk 2 weeks ago and I noticed I needed to build sp1 myself. Is that in your instructions? (I assume you need sp1.)
Well, yes, I tried it on a fresh computer. In fact, this is what I did to test the Windows requirements and installation, since as I said, I do all my development on Linux.

For the WIndows part, I installed Cygwin and Fuse, and then Z88DK (my version in Windows is "v17482-696f605-20210210"

On Linux, I just git clone the z88dk repo and recompile everything. I have never needed to recompile SP1 myself, but yes, you need SP1.
Timmy wrote: Thu Mar 18, 2021 9:40 pm 2) The "USAGE" link in your readme leads to a 404 page.
Fixed, thanks.
Timmy wrote: Thu Mar 18, 2021 9:40 pm 3) It's a month later now, have you tried finishing a game now? What do you think of it yourself?
You should try finish one game now. Try not to make "finishing a game" time longer than to learn z88dk and sp1.
Try to make a game with 10 rooms. It's fine for a first game.
There is a finished game as a demo of the library, and it is included with it. In fact, I'm regularly using this test game (which is absurdly simple and dull, I admit) to develop and test the library. If you follow the Quickstart instructions, you'll generate a game.tap file with the game. A menu and instructions are included in itself, but it's just a matter of "kill all enemies, get all items, go to exit". BTW, life counting works bad on purpose, I needed it to test some parts of the library.

The game has only 2 screens, the bare minimum I needed to test the screen changing functionality.

You can download the game TAP from here.

I'm also developing right now another couple of (similar) games, which make use of the library. I'll post them when they are somewhat playable.
Timmy wrote: Thu Mar 18, 2021 9:40 pm 4) If you are having problems with making or designing of a game, you can ask here. And I can see if I can help.
My main problem now is dedication, since I do this in my spare time, and I have a family and a full time work to attend. I mostly do some bursts whenever I can (as you can probably see from the commit rate).

Anyway, thanks again for your comments, I'm pretty comfortable in this forum and I know I can ask.

Cheers
Jorge
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by Timmy »

jorgegv wrote: Fri Mar 19, 2021 9:15 am My main problem now is dedication, since I do this in my spare time, and I have a family and a full time work to attend. I mostly do some bursts whenever I can (as you can probably see from the commit rate).
Don't worry, I never look at commit rates. I don't need to use Github, other than maybe setting up a free cheap website.

My advice to you is, that if you don't have much time. Then Prioritise what you want to work on, as hobby.

Sorry for late reply. I have more free time than you, but I have other important things that I need to do too. :)
And I still hope to finish a game in 2 weeks (no I have not started yet).
The game has only 2 screens, the bare minimum I needed to test the screen changing functionality.

You can download the game TAP from here.
This is really nice. You have done a lot already.

Even more features than in some of my games. :)

I like how you draw graphics and maps with a text editor.
I'm also developing right now another couple of (similar) games, which make use of the library. I'll post them when they are somewhat playable.
And Prioritising means that you don't need to make many games at once. One (or maybe two) at the same time is good enough.

And you already have enough functionalities build to make a game.

I think what you need to do now, is draw some screens with the graphics you already have, and then you have one finished game.

It does not need to be perfect.

We are all waiting for you to finish a game so that we can play. :cool:
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Timmy wrote: Thu Mar 25, 2021 3:18 pm I like how you draw graphics and maps with a text editor.
This is just the consequence of not having an editor in hand. All tools I found seemed to be for really old windows versions, add this to the fact that I have a HiDPI display and I could barely see the UI in them....

...and then I decided to do it on a text editor. After that, I implemented the "PNG_PIXELS" functionality, and I don't use the text editor any more :-)

And Prioritising means that you don't need to make many games at once. One (or maybe two) at the same time is good enough.
Well, they are both in the stage where I decided the gameplay and plot, I've just started to draw the graphics and sprites. Some of the graphics you see (the "Toma email" tile) come from one of those games.
And you already have enough functionalities build to make a game.

I think what you need to do now, is draw some screens with the graphics you already have, and then you have one finished game.

It does not need to be perfect.

We are all waiting for you to finish a game so that we can play. :cool:
Coming from you, this is a big encouragement :-)

Thanks, I'll keep you posted.
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Hi again, fellow coders, :)

I have released version 0.2.0 of my RAGE1 adventure engine. New features include a versatile game scripting tool, a new map editing format (same philosophy as the PIXELS lines for Sprites and Tiles), and several graphics enhancements and optimizations. All of the have the goal of making adventure game development faster.

You can read the CHANGELOG for the full list of new features. All of them are exhaustively documented and also demonstrated in the test game, which you can download here in TAP format.

I'm also working on my first real game (which of course drives most of my enhancements to the library). You can see my Work In Progress here (sorry, spanish only, for the moment :) ) I'm also keeping a development diary for it, which will become a RAGE1 game development tutorial in the future.

Cheers
Jorge
andydansby
Member
Posts: 51
Joined: Fri May 27, 2016 8:58 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by andydansby »

Nice, I am planning on looking at your engine in the near future, trying to get a kid off to college and set him up in an apartment the next weeks. So ugggg, hardly time for much..

Nice sample game BTW.
cborn
Well known member
Posts: 267
Joined: Tue Oct 06, 2020 7:45 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by cborn »

Hi Jorge,
a simple question
i noticed in 'game_function" that you define 23 lines , 0 to 22. and not 0-23
do you reserve a single line for the border ?

Code: Select all

// External frame coordinates and dimensions
#define BORDER_TOP		0
#define BORDER_LEFT		0
#define BORDER_BOTTOM		22
#define BORDER_RIGHT		31
#define BORDER_WIDTH		( BORDER_RIGHT - BORDER_LEFT + 1 )
#define BORDER_HEIGHT		( BORDER_BOTTOM - BORDER_TOP + 1 )

struct sp1_Rect border_area = { BORDER_TOP, BORDER_LEFT, BORDER_WIDTH, BORDER_HEIGHT };
cborn
Well known member
Posts: 267
Joined: Tue Oct 06, 2020 7:45 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by cborn »

EDIT:
i found the answer ( and the forum engine is to short of memory to let me press ENTER while editing)

Code: Select all

// off-screen cell coords (used for "parking" sprites)
#define OFF_SCREEN_ROW		24
#define OFF_SCREEN_COLUMN	0
its a parkinglot for sprites! =D
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Mmmm... you found the parking lot!

But answering your question: yes, indeed I have reserved the bottom line for the lives and inventory display in the test game. (that's line 23). So, the bottom line is _not_ the parking lot :-)

The 24th line is technically outside the screen and does not exist. But no sprites are going to be drawn when they are there...
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

andydansby wrote: Sun Aug 15, 2021 1:50 pm Nice, I am planning on looking at your engine in the near future, trying to get a kid off to college and set him up in an apartment the next weeks. So ugggg, hardly time for much..

Nice sample game BTW.
Nice! I've been busy lately with the banking memory setup for 128K games (I really need the memory if I want to have big sprites and graphics :-) ). I'll tag a new release when this is ready (but you can clone and follow master for my latest developments, of course!)
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Hi again, guys,

I have released version 0.4.0 of my RAGE1 engine. This release is focused on one main feature: getting games compiled automatically for 128K Spectrum... and I succeeded! :-)

There are also lots of other optimizations and documentation which I suggest you to read if you feel like. Full announcement here: https://jogv.es/posts/2021/10/02/rage1_0.4.0/

Gameplay for the example Test Game which comes included with RAGE1:

Image

...and also for my ongoing Famargon game:

Image

The next version will include a tutorial which I'll be publishing in these forums, so stay tuned!

As always, comments, ideas and pull requests are welcome =D

J.
andydansby
Member
Posts: 51
Joined: Fri May 27, 2016 8:58 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by andydansby »

Nice. I really enjoy your work, looking forward to seeing your tutorial. When you pop up the tutorial, I'll link up to it from my blog. Love to see work like this.

andy
User avatar
jorgegv
Well known member
Posts: 287
Joined: Wed Nov 18, 2020 5:08 pm

Re: RAGE1: New Adventure Game Engine for ZX Spectrum

Post by jorgegv »

Hi again, people,

I have some news about my RAGE1 engine which may be interesting to some :-)

It's been a busy year, but I've managed to find some periods to work intensively on it, and even though version 0.5.0 is still not ready, I have already finished some new features needed for a new game which is in the works, and specially, I finished a new tool called MAPGEN.

This tool came out of the need to create the game map quickly, avoiding the tedious process of defining each screen separately, then connecting them with hotzones to allow screen-switching, positioning objects, tiles, etc.

With MAPGEN, the input is a PNG wfile with the full game map (all screens!), drawn by copying/pasting the BTiles from another PNG file (BTiles in RAGE can be any size, not 8x8, 16x16 or any fixed size; by defining and using Big Tiles, map design can be done much faster). The tool reads and analyzes the PNG file, and creates the RAGE1 data files for all the needed map screens, including the proper hotzones and screen switching rules so that navigation around the map is completely automatic!

The map can be similar to this:

Image

MAPGEN can optionally create a check-map PNG: a file on which it draws outlines of the detected objects (BTiles, Items, Hotzones) in different colors, so that they can be quickly checked visually against the Main Map PNG.

This check-map can be like this:

Image

The full reference and tutorial for MAPGEN can be found on this link

Have fun :-)
Jorge

P.S. @andydansby: the tutorial is still in the works, but with this tool it will be much more interesting. Thanks for your patience :-)
Post Reply