Ronald In The Maze (GX4000)

I’d like to share my first Amstrad GX4000 game, Ronald In The Maze:

RolandMazeGX4000.zip (467.8 KB)

Tested on Arnold and Retro Virtual Machine.

Dabzy

9 Likes

Ouuuh yeah , thanks

2 Likes

Nice! haha, I like the backstory :grinning_face: What did you use to make it?

Lol, the back story… Yeah, I had to keep the [sometimes] dreadful game plots of the era still going! :smiley:

Well, I made it with my own tools, unfinished at the minute, but I call it Ronald4000, it’s a BASIC->ASM compiler, which uses RASM to build the final cart…

As an example, here is a little Invaders game in it:

'  INVADERS  -  a simple little Space Invaders for the GX4000
'  Written in Ronald BASIC

'  Sprites (hardware, zero flicker):
'     slots 0..11 - the invader formation (4 x 3)
'     slot 12     - the player cannon
'     slot 13     - the player's bullet
'  Images (software, drawn once):
'     "bunker"    - three shield blocks along the bottom
'
'  Controls:  LEFT/RIGHT move,  FIRE shoots.
'  Clear the wave to win; let them reach you and it's game over.
'  FIRE plays again.

Mode 1
Ink 0, 0        ' black
Ink 1, 18       ' bright green (text + bunkers)
Ink 2, 6        ' red
Ink 3, 26       ' white
Border 0

Dim alive:Byte[12]

' bake + load the sprite patterns once (all 12 invaders share one pattern)
For i = 0 To 11
  LoadSprite "invader", i
Next
LoadSprite "player", 12
LoadSprite "bullet", 13

'  outer loop - one pass = one game, then restart on FIRE

Repeat

  ' ---- reset state ----
  For i = 0 To 11
    alive[i] = 1
  Next
  remaining = 12
  score = 0
  marchX = 0
  marchY = 0
  dir = 1           ' 1 = marching right, 0 = marching left
  tick = 0
  bAlive = 0
  px = 148
  py = 176
  gameover = 0
  won = 0

  Cls
  ' shields - software images, painted once; the sprites glide over them
  DrawImage "bunker", 40, 150
  DrawImage "bunker", 148, 150
  DrawImage "bunker", 256, 150
  Locate 1, 1
  Print "SCORE ", score, "   "

  ' place the formation and the cannon
  For i = 0 To 11
    row = i / 4
    col = i - row * 4
    Sprite i, 30 + col * 28 + marchX, 24 + row * 22 + marchY
  Next
  Sprite 12, px, py

  '  main game loop

Repeat
    Wait

    ' ---- move the cannon ----
    If JoyLeft  Then px = px - 3
    If JoyRight Then px = px + 3
    If px < 4   Then px = 4
    If px > 292 Then px = 292
    Sprite 12, px, py

    ' ---- fire (one shot at a time) ----
    If FireHit And bAlive = 0 Then
      bAlive = 1
      bx = px
      by = py - 8
    EndIf

    ' ---- update the bullet ----
    If bAlive = 1 Then
      by = by - 6
      If by <= 10 Then
        bAlive = 0
        SpriteHide 13
      Else
        Sprite 13, bx, by
        ' did it hit an invader?
        For i = 0 To 11
          If alive[i] = 1 Then
            If SpritePixelHit(13, i) Then
              alive[i] = 0
              SpriteHide i
              bAlive = 0
              SpriteHide 13
              score = score + 10
              remaining = remaining - 1
              Locate 1, 1
              Print "SCORE ", score, "   "
              Exit
            EndIf
          EndIf
        Next
      EndIf
    EndIf

    ' ---- march the formation on a timer (speeds up as they thin out) ----
    tick = tick + 1
    spd = 3 + remaining
    If tick >= spd Then
      tick = 0
      If dir = 1 Then
        marchX = marchX + 8
        If marchX >= 176 Then
          marchX = 176
          dir = 0
          marchY = marchY + 12
        EndIf
      Else
        If marchX <= 8 Then
          marchX = 0
          dir = 1
          marchY = marchY + 12
        Else
          marchX = marchX - 8
        EndIf
      EndIf
      ' reposition the living invaders
      For i = 0 To 11
        If alive[i] = 1 Then
          row = i / 4
          col = i - row * 4
          Sprite i, 30 + col * 28 + marchX, 24 + row * 22 + marchY
        EndIf
      Next
      ' they reached the cannon line?
      If marchY >= 92 Then gameover = 1
    EndIf

    ' ---- wave cleared? ----
    If remaining = 0 Then
      won = 1
      gameover = 1
    EndIf

  Until gameover = 1

  '  round over - clear the field, show the result

For i = 0 To 11
    SpriteHide i
  Next
  SpriteHide 12
  SpriteHide 13

  Locate 16, 12
  If won = 1 Then Print "YOU WIN!"
  If won = 0 Then Print "GAME OVER"
  Locate 12, 14
  Print "FIRE TO PLAY AGAIN"

  ' wait for a fresh FIRE press
  Repeat
    Wait
  Until FireHit

Until 0

And a screenie of the IDE, which has autocomplete, but not shown:

It has built in sprite and tilemap editors accessible on the left.

The tool is still unfinished, got quite a bit to work on… Its a bit of a side project to my main one, which, not to be spammy, is a BASIC language called BambooBasic (www.bamboobasic.org), I took a lot from that and implemented it into Ronald4000!

No formal date on when it will be done because Bamboo takes up a lot of my time, but, it will done!

Anyway, thanks for having a peek! :slight_smile:

Dabzy

4 Likes