Skip to content

A Midwinter-inspired terrain engine for Acorn Archimedes

License

Notifications You must be signed in to change notification settings

arkiruthis/snowscape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snowscape

Description

A small terrain engine for Acorn Archimedes inspired by the Midwinter series of games by Mike Singleton and Maelstrom. These games never came out on the Acorn series of machines, so this was just a fun project to imagine what it might have looked like on the Archimedes utilizing it's slightly quirky 256-color palette. Written in C89 and ARM assembly. Utilizes the C89 dynamic array by Evan Teran.

I haven't looked fully at either the 68k or x86 DOS dissassembly for Midwinter, and aside from the articles in magazines of the midpoint displacement method for terrain generation, assume this to have little or no connection to how Maelstrom originally implemented the engine in Midwinter.

As per the license this software is released AS IS. I don't have the time to look through pull requests, etc., but please feel free to fork the project and play with it as you will. :)

Click on the image for a YouTube recording in Arculator
Click on the image for a YouTube recording in Arculator

QuickStart and Controls

Thanks to the amazing Archimedes Live! you can run a prebuilt version directly in the browser.

SnowScape A5000 Version (further draw distance)
SnowScape A3020 Version

Controls

LEFT CLICK - Move forwards
RIGHT CLICK - Move backwards
MOUSE - Move view
ESCAPE - Return to RISCOS

Known Issues

  • When you reach the edge of the terrain, you'll be abruptly reset to the starting position. TODO - like the original Midwinter, we could reset the camera and generate the terrain to match the next section you're in.
  • Performance could probably be improved by moving more C into ARM assembly... but it's worth playing the original Midwinter on a stock STFM or A500 as a reminder of the original framerate... 😜
  • Why is there a blue line at the bottom? Because when I draw there I get a stack heap corruption on exit. 😱 It'll be something trivial, it always is...

Building Prerequisites

  • RPCEmu or Arculator
  • Acorn C++ / DDE

Building

  1. Checkout the repo and copy (or ideally, symlink for ease of development) the Project folder into your hostfs folder for your emulator.
  2. Ensure the build tools are available. (i.e., run $HostFS::HostFS.$.AcornC_C++.!SetPaths)
  3. Open the Projects folder.
  4. Double-click the Makefile to generate the !MeshRenderer executable.
  5. Run the generated !Run script (which sets some environment variables) to launch.

Building for lower-end Archimedes (A3000/A3010/A3020)

Remove the A5000 define from the CC flags in the Makefile (i.e., the -DA5000 on the CCflags section near the top). This will use a smaller grid to render.

Running on Original Hardware

Use an emulator (Arculator, RPCEmu, ArchiEmu, etc.) to copy the Projects folder onto an ADF and either use that in a Gotek, or use it to prepare a floppy disk. This is to preserve the file types that are set up on HostFS so that they run correctly on native RISCOS.

Enabling Profiling

  1. Uncomment // #define TIMING_LOG 1 in /Projects/h/Render
  2. Uncomment | Run <Obey$Dir>.TimerMod in the /Projects/!Run script.
  3. Download TimerMod and unpack into in the /Projects folder.
  4. Rebuild and Run.

Scripts

  • The scripts folder contains a NodeJS script which is used to take the exported Archimedes palette (a list of RGB hex numbers) and generate a lookup table. It does this as a PNG first, because of the limited options, it doesn't always get the gradients looking nice, so we can tweak the table a bit before turning it into the binary lookup which is used by the engine in the /assets folder.

Grateful Thanks and Shoutouts

The Maelstrom team (particularly in memory of Mike Singleton), whos incredible games made a little me believe whole worlds could exist in a small home computer!

David Ruck for his superb TimerMod utility which is available from his site which made profiling many of the routines far easier.

The amazing Bitshifters team for always being generous with their knowledge and pushing the Archimedes and BBC Micro to it's limits with their amazing demos!

Tom Sneddon for helping me fix the CORS issue which means we can link to Archimedes Live! direct from here. Also check out b2, his amazing BBC Micro Emulator!

About

A Midwinter-inspired terrain engine for Acorn Archimedes

Resources

License

Stars

Watchers

Forks

Packages

No packages published