micro(A)v11
#36
(07-29-2023, 07:07 PM)mnrvovrfc Wrote: The game you apparently didn't like was the one my friend failed to translate to micro(A).  Rolleyes

It's simply because it needs more LOC to give the illusion of animation. Such as pressing [9] key, the ship moves down the lane and the player sees all nine steps of it. Put a starry background and make it move as part of the illusion.

But it was meant to be a simple game. Not for some slob to steal it without making any modification to it except the "original author" comment at the top.

This was sort of based on another game which was about cars instead. Not really a race. But the "aliens" were drunk drivers determined to crash into the player's car. The player's car could move vertically in that other game but not very far ahead, it was sort of like the ship in Centipede. Also this was more or less like "Demolition Derby", my favorite Tandy Color Computer cartridge. Heart

If you are talking to me, I didn't like it because it didn't work. The digit keys didn't respond nor the shift keys???

And my code started from scratch trying to figure out what roquedrivel was trying to accomplish. So nobody let alone slobs was stealing noth'n. Big Grin

Check it out, I was just guessing at how it might have worked:
Code: (Select All)
_Title "roquedrivel Game" ' b+ 2023-07-28
DefLng A-Z ' make all variables long
Width 40
debug = 0 ' this is for checking things along the way
rightBoundary = 10
playerX = 5: playerY = 25: player$ = "A"
gateX = Rand(10): gateY = 25 - Rand(13): gate$ = "X" ' not installed yet
Dim As Long badX(1 To 4), badY(1 To 4) ' baddies locates
bad$ = "V"
GoSub ReassignBaddies
'If debug Then Sleep 'check progress
Do
    Cls ' then display current status
    For i = 1 To 25
        Locate i, 11: Print Chr$(179);
    Next
    Locate 12, 15: Print "Score:"; score
    For i = 1 To 4 ' draw baddies then move them unless a collision with player
        If playerX = badX(i) And playerY = badY(i) Then
            player$ = "*": score = score - 1
            Locate playerY, playerX: Print player$
            Sound 600, 4
        Else
            Locate badY(i), badX(i): Print bad$;
        End If
        If Rand(60) < 5 Then badY(i) = badY(i) + 1
        If badY(i) > 25 Then
            restart2:
            r = Rand&(10)
            For j = 1 To 4 ' find a new lane
                If j <> i Then
                    If badX(j) = r Then GoTo restart2 ' find another lane this one is used
                End If
            Next
            badX(i) = r: badY(i) = 1 ' give the bad(i) a new start
        End If
    Next
    Locate playerY, playerX: Print player$; ' wait for player to do something
    If player$ = "*" Then
        playerY = 25: player$ = "A"
        GoSub ReassignBaddies
    ElseIf playerY = 1 Then
        GoSub ReassignBaddies
        score = score + 1
        playerY = 25
    Else
        kh = _KeyHit
        If kh >= 48 And kh <= 57 Then ' digits 1 to 9, 0 = 10
            move = kh - 48
            If move = 0 Then move = 10
            If (playerY - move) < 1 Then Beep: GoTo skip
            For i = 1 To move
                For b = 1 To 4
                    If playerY - i = badY(b) And playerX = badX(b) Then Beep: GoTo skip
                Next
            Next
            playerY = playerY - move
            skip:
        ElseIf kh = 19200 Then ' left arrow
            If playerX - 1 < 1 Then Beep Else playerX = playerX - 1
        ElseIf kh = 19712 Then ' right arrow
            If playerX + 1 > rightBoundary Then Beep Else playerX = playerX + 1
        ElseIf kh = 27 Then
            End
        End If
    End If
    _Limit 30 ' loop 30 times a sec   2 secs = 60 frames
Loop
End

ReassignBaddies:
badX(1) = Rand&(10): badY(1) = 1
For i = 2 To 4 ' assign a lane
    restart:
    r = Rand&(10)
    For j = 1 To i - 1
        If badX(j) = r Then GoTo restart ' find another lane this one is used
    Next
    badX(i) = r: badY(i) = 1 ' give the baddies a place
    If debug Then Print i; badX(i); badY(i) ' check progress
Next
Return

Function Rand& (maxnum As Long) ' 1 to maxnum inclusive
    Rand& = Int(Rnd * maxnum + 1)
End Function

After I posted, I learn the ship was supposed to stay at bottom of screen, yikes!
b = b + ...
Reply


Messages In This Thread
micro(A)v11 - by aurel - 07-07-2023, 03:05 PM
RE: mAv11 - by mnrvovrfc - 07-07-2023, 06:52 PM
RE: mAv11 - by mnrvovrfc - 07-07-2023, 07:08 PM
RE: mAv11 - by aurel - 07-07-2023, 09:30 PM
RE: mAv11 - by aurel - 07-10-2023, 04:13 PM
RE: mAv11 - by aurel - 07-10-2023, 07:17 PM
RE: micro(A)v11 - by aurel - 07-12-2023, 05:03 PM
RE: micro(A)v11 - by aurel - 07-13-2023, 06:38 PM
RE: micro(A)v11 - by mnrvovrfc - 07-13-2023, 07:08 PM
RE: micro(A)v11 - by aurel - 07-15-2023, 04:27 PM
RE: micro(A)v11 - by aurel - 07-16-2023, 02:52 PM
RE: micro(A)v11 - by bplus - 07-16-2023, 03:56 PM
RE: micro(A)v11 - by aurel - 07-16-2023, 06:19 PM
RE: micro(A)v11 - by bplus - 07-16-2023, 06:39 PM
RE: micro(A)v11 - by mnrvovrfc - 07-16-2023, 07:34 PM
RE: micro(A)v11 - by aurel - 07-16-2023, 09:34 PM
RE: micro(A)v11 - by aurel - 07-16-2023, 09:42 PM
RE: micro(A)v11 - by aurel - 07-19-2023, 11:53 AM
RE: micro(A)v11 - by aurel - 07-21-2023, 06:38 AM
RE: micro(A)v11 - by mnrvovrfc - 07-21-2023, 06:45 AM
RE: micro(A)v11 - by aurel - 07-21-2023, 09:09 PM
RE: micro(A)v11 - by mnrvovrfc - 07-24-2023, 02:23 AM
RE: micro(A)v11 - by aurel - 07-24-2023, 07:00 AM
RE: micro(A)v11 - by aurel - 07-25-2023, 09:16 PM
RE: micro(A)v11 - by aurel - 07-26-2023, 05:30 PM
RE: micro(A)v11 - by aurel - 07-26-2023, 10:42 PM
RE: micro(A)v11 - by aurel - 07-27-2023, 09:55 AM
RE: micro(A)v11 - by mnrvovrfc - 07-28-2023, 02:29 AM
RE: micro(A)v11 - by mnrvovrfc - 07-28-2023, 07:42 AM
RE: micro(A)v11 - by aurel - 07-28-2023, 06:43 AM
RE: micro(A)v11 - by aurel - 07-28-2023, 09:38 AM
RE: micro(A)v11 - by mnrvovrfc - 07-28-2023, 05:59 PM
RE: micro(A)v11 - by aurel - 07-28-2023, 07:14 PM
RE: micro(A)v11 - by bplus - 07-29-2023, 03:09 PM
RE: micro(A)v11 - by mnrvovrfc - 07-29-2023, 07:07 PM
RE: micro(A)v11 - by bplus - 07-29-2023, 07:45 PM
RE: micro(A)v11 - by aurel - 07-29-2023, 09:30 PM
RE: micro(A)v11 - by aurel - 07-29-2023, 09:31 PM
RE: micro(A)v11 - by bplus - 07-29-2023, 09:53 PM
RE: micro(A)v11 - by mnrvovrfc - 07-29-2023, 10:10 PM
RE: micro(A)v11 - by aurel - 07-30-2023, 09:49 AM
RE: micro(A)v11 - by bplus - 07-30-2023, 02:35 PM
RE: micro(A)v11 - by aurel - 07-30-2023, 03:05 PM
RE: micro(A)v11 - by mnrvovrfc - 07-31-2023, 01:54 PM
RE: micro(A)v11 - by aurel - 07-31-2023, 02:10 PM
RE: micro(A)v11 - by mnrvovrfc - 07-31-2023, 02:39 PM
RE: micro(A)v11 - by aurel - 07-31-2023, 03:09 PM
RE: micro(A)v11 - by aurel - 07-31-2023, 03:10 PM
RE: micro(A)v11 - by mnrvovrfc - 08-01-2023, 03:12 PM
RE: micro(A)v11 - by bplus - 08-01-2023, 03:36 PM
RE: micro(A)v11 - by mnrvovrfc - 08-01-2023, 11:49 PM
RE: micro(A)v11 - by aurel - 08-02-2023, 08:21 AM
RE: micro(A)v11 - by mnrvovrfc - 08-08-2023, 03:59 AM
RE: micro(A)v11 - by aurel - 08-08-2023, 10:18 AM
RE: micro(A)v11 - by mnrvovrfc - 08-11-2023, 08:43 AM
RE: micro(A)v11 - by bplus - 08-11-2023, 09:17 AM
RE: micro(A)v11 - by aurel - 08-11-2023, 11:39 AM
RE: micro(A)v11 - by bplus - 08-11-2023, 01:19 PM
RE: micro(A)v11 - by aurel - 08-11-2023, 07:43 PM
RE: micro(A)v11 - by aurel - 08-11-2023, 10:41 PM
RE: micro(A)v11 - by aurel - 08-12-2023, 10:31 AM
RE: micro(A)v11 - by aurel - 08-12-2023, 10:36 AM
RE: micro(A)v11 - by aurel - 08-12-2023, 10:47 AM
RE: micro(A)v11 - by aurel - 08-12-2023, 10:49 AM
RE: micro(A)v11 - by mnrvovrfc - 08-12-2023, 12:18 PM
RE: micro(A)v11 - by bplus - 08-12-2023, 12:59 PM
RE: micro(A)v11 - by mnrvovrfc - 08-12-2023, 02:49 PM
RE: micro(A)v11 - by aurel - 08-12-2023, 07:14 PM
RE: micro(A)v11 - by bplus - 08-12-2023, 07:35 PM
RE: micro(A)v11 - by aurel - 08-12-2023, 09:02 PM
RE: micro(A)v11 - by mnrvovrfc - 08-14-2023, 04:43 PM
RE: micro(A)v11 - by aurel - 08-15-2023, 07:36 AM
RE: micro(A)v11 - by bplus - 08-15-2023, 12:42 PM
RE: micro(A)v11 - by aurel - 08-15-2023, 06:44 PM
RE: micro(A)v11 - by mnrvovrfc - 08-15-2023, 10:07 PM
RE: micro(A)v11 - by aurel - 08-16-2023, 06:51 AM
RE: micro(A)v11 - by aurel - 08-16-2023, 09:03 AM
RE: micro(A)v11 - by aurel - 08-20-2023, 10:54 AM
RE: micro(A)v11 - by mnrvovrfc - 08-20-2023, 01:23 PM
RE: micro(A)v11 - by aurel - 08-20-2023, 03:08 PM
RE: micro(A)v11 - by dbox - 08-20-2023, 03:46 PM
RE: micro(A)v11 - by mnrvovrfc - 08-20-2023, 04:19 PM
RE: micro(A)v11 - by aurel - 08-20-2023, 09:51 PM
RE: micro(A)v11 - by aurel - 08-25-2023, 01:47 PM
RE: micro(A)v11 - by aurel - 08-30-2023, 08:24 PM
RE: micro(A)v11 - by mnrvovrfc - 08-30-2023, 08:36 PM
RE: micro(A)v11 - by TerryRitchie - 08-30-2023, 09:18 PM
RE: micro(A)v11 - by aurel - 08-30-2023, 09:20 PM
RE: micro(A)v11 - by aurel - 08-31-2023, 07:40 PM
RE: micro(A)v11 - by aurel - 08-31-2023, 08:13 PM
RE: micro(A)v11 - by bplus - 08-31-2023, 09:14 PM



Users browsing this thread: 45 Guest(s)