It is currently Mon Oct 20, 2014 4:03 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Thu Nov 29, 2012 12:14 am 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Hi guys,

I'm currently helping Tony Thompson (author of TommyGun) to convert my game designer tool, AGD, to the PC. For those who don't know, AGD is a Spectrum program containing various editors - sprites, background graphics, screen layouts, sound and a script editor for the logic. The utility builds fast machine-code platformers, shoot-em-ups, puzzle games - whatever you want - which run independently of the utility. More info here: http://arcadegamedesigner.proboards.com/

As the editor is moving to the PC, there's no reason why it couldn't be amended to simultaneously produce games for other formats by using the same logic scripts, screen layouts, map etc - with perhaps just custom graphics and sounds for each format. To date, at least 10 games have been produced with the Spectrum version, and there's no reason why they couldn't be built for other 8-bit machines with this new PC tool!

With this in mind, I'm looking for games programmers who know their machines to help get this tool to build games for other formats. After all, there are already dozens of users. Imagine if they could just tick a box when they develop their next Spectrum game and simultaneously build a version for the Beeb/Oric/Whatever. Imagine how many more users we could get designing their own games and producing versions for formats they may never have considered programming for before! Maybe Acorn fans would like to produce a game for the Electron, and simultaneously produce one for the Spectrum while they're at it. Then perhaps with a few more graphics, produce versions for the C64 and CPC too! We'd have the ultimate 8-bit game creation tool.

There are two sides to the conversion process. There's an assembly language engine which includes the code to draw/manipulate sprites, read keys, play sounds, draw screens, test for collisions and all the usual gubbins. Then there's the C script compiler, although that won't take much modifying for other Z80-based machines and I can do that myself once the game engine is converted. Converting the script compiler to other CPUs shouldn't be terribly difficult but it will all really depend on how the engines are coded. However, it strikes me that once we have a script compiler for one 6502 format, it shouldn't be a big job to convert it to other 6502 machines...

Is anyone interested in converting/helping to convert these two programs to other formats? I'm prepared to have a go at the CPC myself if nobody comes forward (though I'd still appreciate advice from anyone who knows the format better!)


Top
 
PostPosted: Fri Nov 30, 2012 10:06 pm 
Offline
User avatar
 Profile

Joined: Thu Jan 20, 2011 4:24 pm
Posts: 57
Hi Jonathan,

sounds like an interesting project. If I understand it correct, the goal is to have a general kind of game program language which can be compiled for several platforms?
I'm willing to have a look if I can help you to create an Atom port.

Greetings
Kees


Top
 
PostPosted: Sun Dec 02, 2012 11:22 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
That's pretty much what Tony and I had in mind, a PC game designer which works across a number of classic platforms. Wherever possible, different machines should be able to share common source code, screen layouts etc. An Atom port would be very interesting!

I don't seem to be able to send a PM to give you my email address. If you send me your email address via my website (http://www.spanglefish.com/egghead/feedback.asp) I'll send you the fully commented Spectrum game engine and compiler.


Top
 
PostPosted: Mon Dec 03, 2012 10:19 am 
Offline
 Profile

Joined: Sat Sep 04, 2010 5:28 pm
Posts: 92
I'm up for it, if I can find some spare time (!)


Top
 
PostPosted: Tue Dec 04, 2012 10:27 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Cheers Kees, I've sent you an email. There may be things you can see which you'd want to do more efficiently or leave out altogether on the Atom, but let me know what you think.

Tautology, I've zipped up the game source and compiler and uploaded here: https://rapidshare.com/files/477149195/AGDAssembly.zip

The engine works by stepping through the sprite table, and for each one it calls the relevant user-written routine for that sprite type. Sprite type 0 is usually reserved for the player, so you'd normally write code to test keys and move the sprite up/down/left/right or jump. Other sprite types might have code to move enemies around the screen, or maybe drop a collectable bonus onto the screen. There are 8 events for different sprite types, and another 7 events which are called at other points in the game - initialising screens, when the player dies, every iteration of the game loop etc.

The Spectrum version of the editor has some built-in example sprite code templates for player controls and enemy sprite types, so I'll get those typed up in the next few days.

If anyone else wants to take a look and ask questions, please feel free. :)


Top
 
PostPosted: Thu Dec 13, 2012 9:06 am 
Offline
User avatar
 Profile

Joined: Sat Mar 26, 2011 3:01 pm
Posts: 263
Location: Kings Langley
How is this going, I did take a look, but go side tracked restarting my 6502 C+ compiler - again ;-)


Top
 
PostPosted: Thu Dec 20, 2012 9:57 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
I've fixed a few little bugs in the compiler:

in CR_PamB:

the line
if ( nNum >= GLOBALS )

was changed to
if ( nNum >= FIRST_VARIABLE )

in Compile:

directly above
case VAR_SCREEN:
case VAR_LIV:
case VAR_A:

these 4 cases were added:
case VAR_EDGET:
case VAR_EDGEB:
case VAR_EDGEL:
case VAR_EDGER:

In CR_Else:

directly below
nCurrent = nAddr3;

this line was added:
nNextLabel = nCurrent;

Tony has also made an adjustment to build event files individually, rather than all at once. So I've changed the label name generator to generate a unique label name for each event. Where label names were in the format l%05d, the first event now generates labels in the format a%05d, the second event b%05d and so on.

So the line in WriteLabel now reads:
sprintf( cLabel, "%c%05d", nEvent + 'a', nWhere >> 2 );

And NewLine looks like this:
sprintf( cLine, "\n%c%05d ", nEvent + 'a', nNextLabel >> 2 );

I've typed up some example event scripts for player controls, enemy movement and collectable object sprites.

The latest compiler, game engine and event scripts are all zipped up here:

http://rapidshare.com/files/3089128372/AGDAssembly.zip

You may want to rename the events from *.EVT to *.AGD if you want to test them.

Tony and I will be continuing to work on this over the holiday period. I'll be working on the CPC464 game engine, so feel free to ask questions or make suggestions.


Top
 
PostPosted: Sat Dec 22, 2012 11:55 am 
Offline
User avatar
 Profile

Joined: Thu Jan 20, 2011 4:24 pm
Posts: 57
Hi Jonathan,

just a quick status update.

The code of the game engine is for 1/3 converted to 6502 assembler but still has to be tested and optimized. I think the conversion is going well but sometimes I'm struggling with the Z80 code to understand how things work with constructions that are unknown for the 6502 like how the interrupts are working, exchanging registers and jump/branch instructions and Spectrum specific routines.

Hopefully I'm getting more time this vacation to continue the conversion.
I didn't have a look at the Spectrum sprite code templates yet, but will as soon as the conversion is done.

I do have a few questions:

    - In the screensynchronisation you toggle to the beeper bit. Is the beeper used for FX sounds and the AY sound for music?

    - Just a general Z80 code question, is this right?
    Code:
      ld ix,(objptr)      loads the value of variable objptr into ix
      ld ix,objptr        loads the address of variable objptr into ix

    - What happens with the A register if an EX command is executed?

    - Is the clock at 23672 only used for delay and screen synchronisation?

    - Why are you loading DE with a value just before an LDI command, isn't DE overwritten at executing the LDI command?
    Code:
         dobj
             inc hl          ; point to x.
         dobj0
             ld de,dispx     ; DE = dispx/dispy and will be overwritten
             ldi             ; DE = HL and HL = HL + 1?????
             ldi             ; DE = HL and HL = HL + 1?????
             ld de,65501     ; minus 35.
             add hl,de       ; point to image.
             jp sprite       ; draw this sprite.
Greetings
Kees


Top
 
PostPosted: Sat Dec 22, 2012 4:37 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Both beeper and AY are used for sound effects. Tony has suggested that we might provide a small library of sound effects for each machine, so the game designer can select the ones he wishes to use in his game. The Spectrum version has 2 sound commands, SOUND and BEEP. SOUND 3, for example, plays the third sound effect in the table. BEEP is a bit simpler, and just plays a "chirp" for the specified duration. Sound is one of the areas that won't translate terribly well from one format to another, so by all means tailor it to the Atom rather than trying to emulate the Spectrum's sound. :)

Yes, that's the correct meaning of the brackets. LD IX,1234 just puts 1234 into ix, whereas LD IX,(1234) loads ix with the 16-bit value at address 1234.

EX is the exchange instruction. EX AF,AF' swaps the accumulator and flags with the alternate set. EXX swaps registers BCDEHL with the equivalent registers in the alternate bank, and doesn't affect A or the flags.

The clock at 23672 is updated 50 times per second and as you say, is used for timing and screen synchronisation.

LDI copies a single byte from HL to DE, increments HL and DE, and decrements the BC pair. It's a single byte version of the block move instruction LDIR, which moves BC bytes from HL to DE. LDIR is only used once as a quick way to fill a buffer with a single byte value, which is why I set DE to HL+1. The byte at HL is then copied to the rest of the buffer on initialisation.


Top
 
PostPosted: Fri Dec 28, 2012 2:30 am 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Another quick update.

The PC AGD editor is almost ready for the Spectrum, and Tony really has done a cracking job on this. I'm playing around with a beta version and it's a pleasure to use, simplicity itself. We should have something to release very soon!

The CPC engine is about 20% done, the Amstrad's firmware is getting in the way slightly more than I anticipated, but I'm making progress. James McKay has posted on a couple of Dragon/CoCo forums to try and get a 6809 programmer interested in a Dragon conversion.

Meanwhile, game designers continue to use the Spectrum editor. Check out this preview of Alessandro Grussu's forthcoming AGD game. It does look rather good:

http://www.youtube.com/watch?feature=player_embedded&v=KsB__bf_if0


Top
 
PostPosted: Fri Dec 28, 2012 12:14 pm 
Offline
User avatar
 Profile

Joined: Thu Jan 20, 2011 4:24 pm
Posts: 57
JonathanC wrote:
James McKay has posted on a couple of Dragon/CoCo forums to try and get a 6809 programmer interested in a Dragon conversion.

Phill ......... looks like another challenge :lol: :lol:

Kees


Top
 
PostPosted: Sun Jan 13, 2013 12:25 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
We've been busy sorting out a few minor issues with the Spectrum engine and compiler, but we're now almost ready to roll. I've approached a couple of developers who've been responsible for some cracking games with the original Spectrum tool to see if they'd be interested in producing a demonstration game for the initial release.

As soon as the flaws have been ironed out, I'll release the latest version of the compiler. I'm having to resist the temptation to add extra functionality as we want to get this converted to work on other platforms!

Hopefully I'll be able to get back to working on the CPC engine soon.

Getting excited now...


Top
 
PostPosted: Wed Feb 20, 2013 11:03 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Another update...

While I was converting the engine over to the CPC, I thought I may as well convert the Spectrum's editor routines over to the Amstrad to test that the engine works. So I've effectively converted the whole Spectrum tool over to the CPC now! If anyone wants to have a play with the Amstrad version, the latest WiP snapshot is available here:

http://rapidshare.com/files/3430736278/AGD03.sna

Once I'm happy with it, we'll get the Amstrad version into the PC tool. It seems to be working well enough so far, but I may need to tweak a few things.

Speaking of the PC tool... The first version has now been released, admittedly with a few issues here and there. If anyone wants to take a look you should be able to find it here:

https://docs.google.com/file/d/0BwXFKYO5i1IleXR6UjBTZE93cVU/edit?usp=sharing


Top
 
PostPosted: Sun Feb 24, 2013 3:00 pm 
Offline
User avatar
 Profile

Joined: Thu Jan 20, 2011 4:24 pm
Posts: 57
JonathanC wrote:
Speaking of the PC tool... The first version has now been released, admittedly with a few issues here and there. If anyone wants to take a look you should be able to find it here:

https://docs.google.com/file/d/0BwXFKYO5i1IleXR6UjBTZE93cVU/edit?usp=sharing
Nice tool, will be a great help for graphic stuff.

When I close the program, I get every error 2x??
Attachment:
error.PNG [53.13 KiB]
Downloaded 89 times

I'm running Tommygun under Windows XP SP3.

Greetings
Kees


Top
 
PostPosted: Sun Apr 07, 2013 12:59 pm 
Offline
 Profile

Joined: Mon Oct 24, 2011 5:01 pm
Posts: 20
Yes, it seems a few people have had issues. There's a newer version here, so you could try this and see if it fixes the problem:

https://docs.google.com/file/d/0BwXFKYO5i1IlOE1PcFZ3LXVfVnc/edit?usp=sharing

There's also a thread on WoS where you'll find updates when they appear:

http://www.worldofspectrum.org/forums/showthread.php?t=42654

I'm pretty happy with the CPC version now, it seems to be behaving with no apparent bugs. Once I've had some feedback I'll put together the engine and compiler for the Amstrad.

Version 0.5 for the CPC is here:

http://rapidshare.com/files/3767639374/AGD05.sna
http://rapidshare.com/files/1641563146/AGD.DOC

Version 3.5 for the Spectrum:

http://rapidshare.com/files/3576406522/AGD%203.5.zip

There are 15 AGD titles now for the Spectrum, with several more games in development. This is one I'm quite looking forward to seeing:

http://www.youtube.com/watch?v=hojcrVOVM9o


Top
 
PostPosted: Sun Apr 07, 2013 4:24 pm 
Offline
User avatar
 Profile

Joined: Thu Jan 20, 2011 4:24 pm
Posts: 57
JonathanC wrote:
Yes, it seems a few people have had issues. There's a newer version here, so you could try this and see if it fixes the problem:

https://docs.google.com/file/d/0BwXFKYO5i1IlOE1PcFZ3LXVfVnc/edit?usp=sharing

There's also a thread on WoS where you'll find updates when they appear:

http://www.worldofspectrum.org/forums/showthread.php?t=42654

Ok, Ill try the newest version.

JonathanC wrote:
There are 15 AGD titles now for the Spectrum, with several more games in development. This is one I'm quite looking forward to seeing:

http://www.youtube.com/watch?v=hojcrVOVM9o

Yes, I think all the Gabriele Amor games are looking very good. Are his source codes available?

Greetings
Kees


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron