Author Topic: Arcade Game Designer  (Read 2211 times)

0 Members and 1 Guest are viewing this topic.

Offline Jonathan.

  • CPC464
  • **
  • Posts: 23
    • The Arcade Game Designer Forums
  • Liked: 64
Arcade Game Designer
« on: 03:22, 18 February 18 »


It has been a busy week but the editorless version of AGD has now been ported to the CPC.  Unlike the editor version that runs on the CPC itself, this is a full implementation of all the functionality that exists on the editorless Spectrum and Next/Timex versions.  So MENU, WHILE/ENDWHILE, READ/DATA/RESTORE, CONTROL, EXPLODE and much more are supported.


Converting games to or from Amstrad and Spectrum should be a doddle, it's little more than a case of pasting in new graphics.  Beyond that there are palette differences and the Spectrum has KEMPSTON and SINCLAIR as control options where the CPC has JOYSTICK0 and JOYSTICK1.  Redefineable keys are also an option, which was a concern for many with the previous CPC implementation.


If you can develop a game for the CPC with this you should be able to port it to the Spectrum with very little difficulty, and vice versa.  There are dozens, if not hundreds of users, mostly Spectrum ATM so hopefully we'll get some crossover and more games for both platforms.  As always, it's all done in a very simple scripting language inspired by BASIC.  There's an example program, Test.AGD included as well as a skeleton program to start you off with your own creations.  There's a directory with some coding templates too - platformer controls, timer bars, pushable blocks and other stuff are covered there.


Please take a look.  It's all source ATM so you'll need a C compiler to build the compiler.  I'm still using X86 which is why I've not included executables but if you can compile to x64 do feel free to make your executables available to others.


Download here.


Finally, I'm hoping to turn AGD into a truly multi-platform 8-bit game development tool (an Acorn Atom version is looking promising) so if you know anyone who might be interested in getting involved do let me know!   CPC graphics/screen editors would be really helpful and I'm always looking for more masochi.. er, I mean volunteers to convert this to other platforms.  Please spread the word...


Offline jesusdelmas

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 43
Re: Arcade Game Designer
« Reply #1 on: 16:54, 18 February 18 »

It has been a busy week but the editorless version of AGD has now been ported to the CPC.  Unlike the editor version that runs on the CPC itself, this is a full implementation of all the functionality that exists on the editorless Spectrum and Next/Timex versions.  So MENU, WHILE/ENDWHILE, READ/DATA/RESTORE, CONTROL, EXPLODE and much more are supported.


Converting games to or from Amstrad and Spectrum should be a doddle, it's little more than a case of pasting in new graphics.  Beyond that there are palette differences and the Spectrum has KEMPSTON and SINCLAIR as control options where the CPC has JOYSTICK0 and JOYSTICK1.  Redefineable keys are also an option, which was a concern for many with the previous CPC implementation.


If you can develop a game for the CPC with this you should be able to port it to the Spectrum with very little difficulty, and vice versa.  There are dozens, if not hundreds of users, mostly Spectrum ATM so hopefully we'll get some crossover and more games for both platforms.  As always, it's all done in a very simple scripting language inspired by BASIC.  There's an example program, Test.AGD included as well as a skeleton program to start you off with your own creations.  There's a directory with some coding templates too - platformer controls, timer bars, pushable blocks and other stuff are covered there.


Please take a look.  It's all source ATM so you'll need a C compiler to build the compiler.  I'm still using X86 which is why I've not included executables but if you can compile to x64 do feel free to make your executables available to others.


Download here.


Finally, I'm hoping to turn AGD into a truly multi-platform 8-bit game development tool (an Acorn Atom version is looking promising) so if you know anyone who might be interested in getting involved do let me know!   CPC graphics/screen editors would be really helpful and I'm always looking for more masochi.. er, I mean volunteers to convert this to other platforms.  Please spread the word...




thanks a million!! amazing job. this version means that the spectrum tutorial that its on youtube will work for the amstrad cpc as well???


 :)

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.936
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 781
Re: Arcade Game Designer
« Reply #2 on: 17:19, 18 February 18 »
Hi @Jonathan ,


Could you upload the files here too? I'd like to take a look but I honestly don't want to register in another forum, and I cannot download the files there, as I'm not registered.


Cheers,
Rob

Offline Jonathan.

  • CPC464
  • **
  • Posts: 23
    • The Arcade Game Designer Forums
  • Liked: 64
Re: Arcade Game Designer
« Reply #3 on: 20:40, 18 February 18 »
Didn't realise I could do that until I read your post so here you go, it's attached.  I've added some executables too so no need to use a C compiler to build the AGD compilers any more.  C source code is still included though.


Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 495
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 473
Re: Arcade Game Designer
« Reply #4 on: 21:09, 18 February 18 »
Nice !

Somehow I do not manage to get test.agd compiled to one ASM that WinAPE "compiles" and after that it is runable on Emulator ...

ASM generated in Attachments:


« Last Edit: 21:48, 18 February 18 by SRS »

Offline johnlobo

  • CPC464
  • **
  • Posts: 8
  • Country: es
  • Liked: 6
Re: Arcade Game Designer
« Reply #5 on: 16:04, 19 February 18 »
Didn't realise I could do that until I read your post so here you go, it's attached.  I've added some executables too so no need to use a C compiler to build the AGD compilers any more.  C source code is still included though.


I have tried to build the example project (skeleton.AGD), but when I try to assemble the generated asm file in Winape, I get 46 undefined symbol errors... :-(  ...what am I missing??

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 495
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 473
Re: Arcade Game Designer
« Reply #6 on: 19:26, 19 February 18 »
It doesn't seem to include "WINDOWTOP" etc. to the ASM-Source ?

If you use the ZX Compiler or Next one it does put them after game engine (lines 3500 and onward)

Code: [Select]
; Game-specific data and events code generated by the compiler ------------------


WINDOWTOP equ 1
WINDOWLFT equ 9
WINDOWHGT equ 22
WINDOWWID equ 22

which "confuses" Assembler ?
« Last Edit: 19:29, 19 February 18 by SRS »

Offline jesusdelmas

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 43
Re: Arcade Game Designer
« Reply #7 on: 02:20, 20 February 18 »
i dont know how to open this AGD0 file, i dont know if i need the AGD 4.7 for spectrum and later complile the game for amstrad, or just use the cpc 1.4 version..


im new in this so if there is a tutorial it will be very helpful for me :)


thanks anyway!




Offline billamu

  • Speccy
  • *
  • Posts: 2
  • Country: nz
  • Liked: 3
Re: Arcade Game Designer
« Reply #8 on: 04:06, 20 February 18 »
Hi jesusdelmas. AGD 1.4 is run on an Amstrad computer or emulator, whereas this is a Windows-based workflow - the .AGD file is a text file that can be exported to an assembly language file that in turn can be compiled to machine code, and run on the Amstrad.

...if we can work out how to do so!  :)

I copy-pasted both of SRS' code into WinApe and compiled it... yes it compiles, and it had a couple of doubles, but after I removed them it doesn't appear to run.

It would be great if someone works out how to make this work!

Offline jesusdelmas

  • CPC664
  • ***
  • Posts: 62
  • Country: es
  • Liked: 43
Re: Arcade Game Designer
« Reply #9 on: 14:48, 20 February 18 »

It has been a busy week but the editorless version of AGD has now been ported to the CPC.  Unlike the editor version that runs on the CPC itself, this is a full implementation of all the functionality that exists on the editorless Spectrum and Next/Timex versions.  So MENU, WHILE/ENDWHILE, READ/DATA/RESTORE, CONTROL, EXPLODE and much more are supported.


Converting games to or from Amstrad and Spectrum should be a doddle, it's little more than a case of pasting in new graphics.  Beyond that there are palette differences and the Spectrum has KEMPSTON and SINCLAIR as control options where the CPC has JOYSTICK0 and JOYSTICK1.  Redefineable keys are also an option, which was a concern for many with the previous CPC implementation.


If you can develop a game for the CPC with this you should be able to port it to the Spectrum with very little difficulty, and vice versa.  There are dozens, if not hundreds of users, mostly Spectrum ATM so hopefully we'll get some crossover and more games for both platforms.  As always, it's all done in a very simple scripting language inspired by BASIC.  There's an example program, Test.AGD included as well as a skeleton program to start you off with your own creations.  There's a directory with some coding templates too - platformer controls, timer bars, pushable blocks and other stuff are covered there.


Please take a look.  It's all source ATM so you'll need a C compiler to build the compiler.  I'm still using X86 which is why I've not included executables but if you can compile to x64 do feel free to make your executables available to others.


Download here.


Finally, I'm hoping to turn AGD into a truly multi-platform 8-bit game development tool (an Acorn Atom version is looking promising) so if you know anyone who might be interested in getting involved do let me know!   CPC graphics/screen editors would be really helpful and I'm always looking for more masochi.. er, I mean volunteers to convert this to other platforms.  Please spread the word...




Hi!!! i sorry to bother you, but can you tellnus how to run this AGD in an amstrad emulator? (win ape)


it is being really hard make this work...


thansk a million anyway  :)

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.291
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2176
Re: Arcade Game Designer
« Reply #10 on: 16:03, 20 February 18 »
@Jonathan:

There are some small bugs in your code.

around line 956 this is new fixed code. you can also use fgetc and fputc and feof.

Code: [Select]

puts( "test4" );
char chData[1];
    lSize = fread(chData, 1, 1, pEngine );            /* read first character of engine source. */
puts( "test5" );

    while ( lSize > 0 )
    {
        fwrite(chData, 1, 1, pObject );                /* write code to output file. */
        lSize = fread(chData, 1, 1, pEngine );        /* read next byte of source. */
    }

it was reading and writing into a pointer before. This was causing a crash for me.

line 888:

should be:
Code: [Select]
    sprintf( szObjectFilename, "%s.asm", argv[ 1 ]);

too many parameters to sprintf.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline billamu

  • Speccy
  • *
  • Posts: 2
  • Country: nz
  • Liked: 3
Re: Arcade Game Designer
« Reply #11 on: 22:22, 20 February 18 »
Okay, I got it to work. Here's what I did:

1. Make a folder called "Test Project" and put the following files into it:
  • CompilerCPC.exe
  • test.AGD
  • enginecpc.asm
2. Open Command Line (cmd)

3. In Command line, type the following:
Code: [Select]
cd [location_of_TEST_PROJECT_folder]
CompilerCPC test
Note: it says "test" not "test.AGD". If you type "test.AGD" CompilerCPC will look for "test.AGD.AGD" and upon not finding it, export a blank file+enginecpc.asm.

4. Open the resulting "test.asm" file. If you have a file called "test.AGD.asm" it's because you typed "CompilerCPC test.AGD" which won't work.

5. Select all the text in the .asm file and copy it (Control+C)

6. Open WinApe

7. On the Amstrad, type:
Code: [Select]
MEMORY 1999
8. In WinApe select Assembler>Show Assembler (or press F3)

9. Paste the code into the corresponding window and compile it (by pressing F9). It should compile with no errors.

10. Back in the Amstrad type:
Code: [Select]
CALL 2000
The resulting code should run.



Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 495
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 473
Re: Arcade Game Designer
« Reply #12 on: 22:53, 20 February 18 »
After fixing the Errors @arnoldemu pointed to, and rebuilding a x64 version with devcpp, I got it to work following @billamu post (i did it that way, too, but with unfixed compiler it did not work ...)

I got it work !

Now, lets flood the CPC with AGD games ! Jihaa

Attached my "fixed" x64 version of AGD_CPC Compiler.
Now, ASSembler Pros, maybe you can enhance/speed up the "enginecpc.asm" for all of us ?
« Last Edit: 22:56, 20 February 18 by SRS »

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.291
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2176
Re: Arcade Game Designer
« Reply #13 on: 10:54, 21 February 18 »
After fixing the Errors @arnoldemu pointed to, and rebuilding a x64 version with devcpp, I got it to work following @billamu post (i did it that way, too, but with unfixed compiler it did not work ...)

I got it work !

Now, lets flood the CPC with AGD games ! Jihaa

Attached my "fixed" x64 version of AGD_CPC Compiler.
Now, ASSembler Pros, maybe you can enhance/speed up the "enginecpc.asm" for all of us ?
I did the same as @SOS and @billamu but the AGD compiler always crashed. I loaded it up in visual studio ran the static code analysis on it, it reported those problems which I fixed (there were others but very minor) and it no longer crashed and I got output :)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline johnlobo

  • CPC464
  • **
  • Posts: 8
  • Country: es
  • Liked: 6
Re: Arcade Game Designer
« Reply #14 on: 12:28, 21 February 18 »
It works!!


 :D


Thank you very much everybody.


Regards.

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 657
  • Country: gb
  • Liked: 215
Re: Arcade Game Designer
« Reply #15 on: 19:45, 21 February 18 »
Nice to see this! Shame I have a Mac though...


Would be nice to see the instructions on the Wiki.

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 495
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 473
Re: Arcade Game Designer
« Reply #16 on: 21:02, 21 February 18 »
There is no free C Compiler for Console on MAC ?

As @Jonathan was very nice giving the Source to compile the Compiler above :)

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.936
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 781
Re: Arcade Game Designer
« Reply #17 on: 21:50, 21 February 18 »
Xcode is free and provides you gcc and g++ for command line.


I managed to compile the compiler (heh!) but crashes when processing a project file.


I’ll try to do some debugging.

Offline SRS

  • Supporter
  • 464 Plus
  • *
  • Posts: 495
  • Country: de
  • Schneider CPC464 - what else ?
  • Liked: 473
Re: Arcade Game Designer
« Reply #18 on: 22:08, 21 February 18 »
Thats cool !

Try my arnoldemu inspired source ?


Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.936
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 781
Re: Arcade Game Designer
« Reply #19 on: 23:08, 21 February 18 »
Yep!


Just tried it and it crashes too:


Code: [Select]
AGD Compiler for Amstrad CPC464 Version 0.4
(C) Jonathan Cauldwell February 2018
test1
test2
test3
test4
test5
Sourcename: test.agd
[1]    91575 abort      ../CompilerCPC_SRS test


I'll try to do some debugging tomorrow and get back to you guys.

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.936
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 781
Re: Arcade Game Designer
« Reply #20 on: 15:42, 22 February 18 »
I managed to get it working.


Most errors are due to buffer sizes. For example, on the void CreateSprites( void ) function, there's a variable named cByte, which is an array of ten chars.


A couple of lines below cBytes declaration, there's the following line "cByte[ 10 ] = ( cByte[ 4 ] << 1 ) & 170;" which actually accesses the 11th element of the array, when there's only ten, causing a crash.


I think that rewriting the code using C++ and the standard template library would make the code easier to read and less error prone.


You'll find attached my version of the source C file. Most probably there are still errors so I'd go for a rewrite.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.291
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2176
Re: Arcade Game Designer
« Reply #21 on: 15:51, 22 February 18 »
Nice. I used it briefly.

I got it to build an asm output for skeleton.agd and then I was happy. :)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline Jonathan.

  • CPC464
  • **
  • Posts: 23
    • The Arcade Game Designer Forums
  • Liked: 64
Re: Arcade Game Designer
« Reply #22 on: 23:31, 22 February 18 »
Thanks guys.

A couple of errors were hangovers from previous implementations that were overlooked and it seems a few debug lines were still in there.  I've put in the fixes and echoed them to the Next/Timex and Spectrum versions.  The buffer size of 32768 will looking at when I get a chance.

The engine could certainly be improved, I don't pretend to be a CPC expert.  But it works and has the functionality of the other versions, if perhaps not as efficient as it could be.

I still need to implement DEFINESOUND before I think about looking at a version for MSX machines.  A tool to extract data from games written with AGD 4.7 and generate .agd files is also on the to-do list.
« Last Edit: 23:32, 22 February 18 by Jonathan. »

Offline EgoTrip

  • 6128 Plus
  • ******
  • Posts: 1.039
  • Country: gl
    • http://egochip.blogspot.co.uk/
  • Liked: 645
Re: Arcade Game Designer
« Reply #23 on: 01:24, 23 February 18 »
It looks good, I certainly wish this existed back when I started using AGD. But now I have moved on to more advanced tools, it seems like it's a backwards step going back to AGD for me on the CPC.

However I definitely do recommend this to people to use AGD as a sketchpad for ideas or for beginners who want to get a functional game running with minimal effort.
EgoTrip&#39;s Stuff
EgoTrip's Stuff

Offline Jonathan.

  • CPC464
  • **
  • Posts: 23
    • The Arcade Game Designer Forums
  • Liked: 64
Re: Arcade Game Designer
« Reply #24 on: 01:31, 26 February 18 »
Snce my last post:


Kees Van Oss is making serious progress with an Acorn Atom conversion.  this is amazing work which could make a series of 6502 conversions possible!



https://www.youtube.com/watch?v=pRwtFTKOn0E


Meanwhile, I'm working on a tool to extract data from snapshots of dozens if not hundreds of Spectrum AGD games and generate new source files that could be converted to the CPC and other formats.