News:

Welcome to RetroCoders Community

Main Menu

Ski Slope by electricwalrus (2022)

Started by electricwalrus, Sep 12, 2022, 06:46 AM

Previous topic - Next topic

electricwalrus

Ski Slope by electricwalrus (2022)

This here is a simple basic game. I used to enjoy this game because it was so easy to make. Look! Check out the source code. Download link in the attachment.

' Standard Setup Routine
#lang "fblite"
Option GOSub
Randomize timer

' Ideal Screen Size
screen 17

' Welcome
Color 2
Print "Ski Slope Challange! By electricwalrus (2022)"
Print "Try to last on this slope as long as possible"
Print
Print "Use the arrow keys to move left and right down the slope"
Print
Print "Press any key to begin!"
Sleep

start:
Cls
score = 0
x = 40
player = 40
Print "Get Ready!"
sleep 1000,1
locate 25, 1
Do
    i = int(rnd*2)+1
    if i = 1 then 
        x = x - 1
        if x < 10 then x = 10
    end if
    if i = 2 then 
        x = x + 1
        if x > 70 then x = 70
    end if
    x2 = x - 10
    for a = 1 to x2: print " "; : Next
    Color 11: Print "*                *";
    if MultiKey(1) then end
    If multikey(75) then player = player - 1
    If multikey(77) then player = player + 1
    check = player - x
    if check < -8 then goto endgame
    if check > 7 then Goto endgame
    locate 25, player: color 10: Print "!!"
    sleep 30,1
    score = score + 1
loop

endgame:
Beep
sleep 1000,1

cls
Locate 1,1
Color 6
Print "You crashed on the ski-field!"
Print "Score: " & score
Print 
Color 15
Print "Try Again in 5 seconds"
sleep 5000,1
goto start

electricwalrus


electricwalrus


mysoft

hehehe  made a version of this game... (but as in form of rally), using pure BATCH some years ago :)

johnno56

I remember this evil game from "way back"! Simple concept. Stay within the 'flags' for as long as possible. Then, some twisted individual, decided to gradually reduce the distance between the 'flags'. If that was not bad enough, the speed was increased as well...!!  Evil game I tell you. Evil. I lost count of the number of times I tried to beat that game... then it dawned on me... 'it never ends'!!

Brilliant game. Evil. But brilliant... More please...

J

ps: Are we permitted to "tinker" with the code?
May your journey be free of incident.  Live long and prosper.

electricwalrus


johnno56

May your journey be free of incident.  Live long and prosper.

electricwalrus

The intention on programming this game was to show a simple code example of a simple game that I hope people can learn from and understand how it works. Tried to keep it as straight forward as possible.

johnno56

I had to increase the 'sleep' period within the main loop... 'Get Ready' popped up and before I had finished reading it... The Skier had already crashed... Changed the 'sleep 30,1' to 'sleep 100,1' and all was ok. Still a touch quick, but quite playable...

You did a good job in keeping it simple.. Ha... Even "I" could understand it... lol
May your journey be free of incident.  Live long and prosper.

electricwalrus


johnno56

I can remember when this game appeared many years ago...  What are you saying, Aurel?  Are you saying that... I am old? lol  Well... You are right... I can remember when Basic was created... I believe I was about to complete primary school at the time... lol
May your journey be free of incident.  Live long and prosper.

johnno56

8 bit? You were lucky. Throughout my primary and secondary (high school) education... No computers! At the end of my apprenticeship, in 1976, I actually purchased a programmable calculator... It would be another 3 years before I would build my first computer... Ah... Soldering irons! Wonderful invention!
May your journey be free of incident.  Live long and prosper.

johnno56

Yes, a kit. It was featured in a magazine, "Electronics Australia", in the late 70's

http://www.mjbauer.biz/DREAM6800.htm

I had just started working as a process worker assembling circuit boards and found the article in the magazine and figured, "Why not?"

Totally under-powered. 1K of ram. HEXDEC keypad input. Output to the antenna socket of a TV and saved to cassette. Sample program was a hobble photo copy... Took 45 minutes to enter a simple Pong-like game. No editing. No backspacing. Three, maybe four attempts, to get it to work. Poor photo-copy combined with typos were the main cause of failure. Saved to cassette at a 300 baud rate...

The following year I would tackle a larger kit project:

https://en.wikipedia.org/wiki/Dick_Smith_Super-80_Computer

This would be my final project. Price of 'ready made' computers were dropping in price quite quickly...
May your journey be free of incident.  Live long and prosper.

johnno56

As I mentioned before, using the HEX keypad took about 45 minutes to key in a simple pong game. I tried to look for the listing but I guess it may not have survived...

The second machine was a kit that I built. I think it was about 1981-82... It had 16K ram. Text only. I also paid for Basic on an eprom. I think it was based on Tiny Basic? The entire machine occupied a single motherboard. The keys were soldered directly to the motherboard. Interesting thing was the "keyboard" could be physically cut off the motherboard and connected via a ribbon cable. I left it attached...

That machine did not last very long... Oh, it ran really well, for a Basic machine... It did not come with a "case"... So, the computer would sit on top of the TV and shared the TV antenna socket... Until... the day my wife was dusting and the duster snagged some of the components and the computer fell off the TV... I did not have the skills to repair a cracked double-sided motherboard... RIP... *sniff*

My soldering iron still sits in the toolbox in the laundry cupboard...
May your journey be free of incident.  Live long and prosper.

johnno56

I used '95 and '98se before switching to XP in 2001. Used XP until I moved to Linux in 2005. I liked XP. I little more stable than '95 and '98. Oh, and those colour schemes... There were some real shockers! There are times that I actually miss XP... then I have another coffee and the feeling goes away... lol I cannot imagine using a machine with only 128mb of ram... But, back then, that was a lot...
May your journey be free of incident.  Live long and prosper.