Crazy Boulders C edition

Post Reply
robrose
Posts: 1
Joined: Sun May 14, 2023 8:02 pm

File Download Crazy Boulders C edition

Post by robrose »

CrazyBoulders500x390.png
CrazyBoulders500x390.png (352.53 KiB) Viewed 4166 times

This is a Boulder Dash style game, tested with the r42 emulator.

Use the arrow keys or joystick to control the player.

Game play. Find the door to the next level within the time allotted, avoiding getting squashed by the boulders, while collecting enough diamonds to open the door.

The original version of Crazy Boulders by Dustan Strakl was programmed in Basic see https://www.8bitcoding.com/p/crazy-boulders.html.

8BitCoding has lots of useful information for people starting out programming the X16.

This C version is an exercise in writing a game in C using the cc65 compiler, the full c source code is available at https://github.com/robr345/CrazyBoulders.

This is my first game, it is also many years since last programming in C, so using Dustan's game design made it easer to concentrate on the coding while learning how game mechanics work.

The excellent libX16.lib by Chris Love provides functions vload and load_file to give the C equivalent of the basic commands VLOAD and LOAD.

#R42
CrazyBoulders.zip
(26.76 KiB) Downloaded 615 times
User avatar
desertfish
Posts: 1126
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Re: Crazy Boulders C edition

Post by desertfish »

Yay! There is no such thing as too many Boulderdash clones! :D
User avatar
DusanStrakl
Posts: 134
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Crazy Boulders C edition

Post by DusanStrakl »

Wow, very cool. Obviously I haven't been around here on the forum much so I only see this now.

Very well done. I am just starting with updating the original BASIC version to R43. I also moved my blog so you might want toi update you link to:
https://www.8bitcoding.com/p/crazy-boulders_16.html
Romulous
Posts: 2
Joined: Sun Jun 04, 2023 8:57 am

Re: Crazy Boulders C edition

Post by Romulous »

Does this support running from it's own directory ?
DOS"CD:CRAZYBOULDERS"
LOAD"CRAZYBOULDERS.BAS"
RUN
Loading screen works, but the first level is all numbers and garble.
User avatar
DusanStrakl
Posts: 134
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Crazy Boulders C edition

Post by DusanStrakl »

Romulous wrote: Sun Jun 04, 2023 9:53 am Does this support running from it's own directory ?
DOS"CD:CRAZYBOULDERS"
LOAD"CRAZYBOULDERS.BAS"
RUN
Loading screen works, but the first level is all numbers and garble.
It should work but I haven't updated the code to support latest version of Emulator, so it doesn't work yet. Hopefully today or tomorrow I will have some time and will post here in separate post.
Romulous
Posts: 2
Joined: Sun Jun 04, 2023 8:57 am

Re: Crazy Boulders C edition

Post by Romulous »

It works correctly in Linux using emulator version 43 by running it with:

Code: Select all

./x16emu -prg CRAZYBOULDERS/CRAZYBOULDERS.PRG -run -fsroot CRAZYBOULDERS
User avatar
DusanStrakl
Posts: 134
Joined: Sun Apr 26, 2020 9:15 pm
Location: Bay Area, California
Contact:

Re: Crazy Boulders C edition

Post by DusanStrakl »

I updated the source code, Basic program and tutorial yesterday so it should work on all platforms on R43 now. It even works on Web emulator.
Post Reply