• Hello, Guest! Welcome back, and be sure to check out this post for more info about the recent service interruption and migration.

3D Dungeon Crawler engine for 68K Macs

BacioiuC

Well-known member
Hi everyone!

As I mentioned in a few of my posts I'm looking to develop and release a couple of games for 68K Macs this year. This thread will serve as a purpose of documenting the journey, possibly asking for help regarding obscure 68K issues and keeping the community up to date (if interested) in my work. The end goal of this effort is to release a first person dungeon crawler (possibly a port of one of my other games) and make it available to anyone, who owns at least a Macintosh Plus, in both digital and physical form. And while I'm at it, I'm doing this shareware style because what the heck, might as well pretend it's the late 80's and early 90's :).


Featured in the video:

- early 3D Raycasting

- scrolling backgrounds

- sprite scaling and rendering

- sprite atlasing

So far the engine supports importing of levels (designed with a really crude editor I did a few months back - a new one is on my list), can render at about 10-15 frames/s on a 020 processor in real-time mode (and a tad more performance can and will be squeezed out of it) and has support for texture mapping (though it doesn't run at > 1 fps on anything bellow an 040). The plan going forward is to design a new level editor that can take into account sprite placement and details / cell, settle down on a battle system (real-time battles or turn-based on a separate screen) and implementing needed game mechanics (dialogue system, object interactions, quest, entities).

I'm targeting an 030 as a required processor but a Plus can run it at lower graphical details (same resolution but with pixel doubling and lower rendering distance). Color is supported but not fully for the first game, mostly to keep costs down and to make sure I can focus on delivering the best performance for your B&W Compact Macs. Attached a couple more screenshots. Here's a video showing rendering happening in real-time as opposed to 1 / frame.

As for the release date, I'm targeting July/August. Once the game is out and going, using the engine to develop other games should be a breeze (scrolling background + 3D sprites can used for a Stellar7 clone with a lot of ease). It will be released as shareware and made available on the forums (with permission), bbs's and itch.io as well as a fully physical release with a Box, manual and 800K disks (might end up having to partner with a distribution company for this). Source will be shipped with the game on-release with a pretty permissive license.

es2.png

es1.png

es3.jpg

 

BacioiuC

Well-known member
This is so cool.


Thanks :)! I've been playing a ton of games on SE/30 and I think it's due for some new releases!

Sweet!  Just like Bard's Tale.
Not really, more closer to Wolfenstein 3D. Bard's tale (at least the 1st one) renders 2D Image at various scales to mimic 3D depth. This engine actually does 3D rendering. The benefit of Bard's Tale is that it can render graphics really fast but it's constrained to a first person perspective and on a grid. The upside of my engine is that you can do non-grid based movement, different heights and even use rudimentary 3D models at the cost of performance. Bard's tale rendering method is something I plan to explore in the future myself for other games. 

This is an example of how Bard's stale graphics are done and stored:

http://ludumdare.com/compo/wp-content/uploads/2015/12/full-wallset-template.png

It basically splits the screen into different regions and uses different image for the left side, one for the middle and one for the right side in different layers to simulate depth.

 
Last edited by a moderator:

BacioiuC

Well-known member
Got a little bit of free time to get some more work done on the engine in the past two days and I managed to implement procedural dungeon generation and frustum culling so I can render dungeons at a pretty decent distance (although culling produces some rendering artifacts, that I plan to squish this weekend). Currently the level generates a map with a size of 80x80 tiles:




I've been also toying with a lot of shareware crawlers and after playing a few of them I've decided to overhaul the UI a bit and simplify the approach. In the next few weeks I'll try to lock down the combat system and the UI of the game - at least functionally. Performance is still good even on an SE, especially since I removed a lot of the background control clutter (message log, items list and more).

 
Last edited by a moderator:

BacioiuC

Well-known member
Thanks to @Crutch I managed to get Texture Mapping working on the game at a similar performance to the non-textured map version. Current status is as follows:

  • Raycasting and texture mapping
  • Two-Pass sprite rendering so they don't blend into the background and you can see all the details instead of just 1 color + what ever is rendered beneath
  • Dungeon generation using cellular automata for now.

These were the bare minimum requirements in order to move onto gameplay and game design. Up next, I can start working on the battle system and gameplay elements (puzzles, traps, interactables).








On the optimization front, there's still a lot of things to do. The game is horrendously slow on macs without an FPU. We're talking 4 times slower at least. One option is for non-fpu macs to have texture mapping disabled and detail quality reduced but I'll try to avoid this as much as possible. Re-writing some parts of the rendering loop in 68k assembly will help. I also plan on trying to move towards fixed-point math and to avoid relying on intensive math operations.

 
Last edited by a moderator:

BacioiuC

Well-known member
Right, I can't edit my last post but I wanted to share how much of an impact a little bit of polish does! I updated the default wall texture and added a background to center the UI controls.

IMG_1515.JPG

 

Byte Knight

Well-known member
Looks fantastic - looking forward to getting some playing time on my SE/30!

And CQ II BBS would love to host your shareware download when ready.

 
Last edited by a moderator:

BacioiuC

Well-known member
And CQ II BBS would love to host your shareware download when ready.
Woop woop! The thought that I'll upload it to BBS's for people to download the game gets me more excited than I should be. Thanks for the offer (and thanks for resetting my password a while back). 

 

Byte Knight

Well-known member
Woop woop! The thought that I'll upload it to BBS's for people to download the game gets me more excited than I should be. Thanks for the offer (and thanks for resetting my password a while back). 


No, I think your level of excitement is appropriate.  :lol:

 

Crutch

Well-known member
Hey this is looking great!  So glad the texture map optimizations work.  Yeah if you can eliminate every little piece of floating point math in the drawing loops you will get an amazing speedup on the non-FPU machines, good call to used the Fixed math routines.

 

BacioiuC

Well-known member
@Crutch I have a feeling I'll poke you later on for more help but what you did speed up things a ton!

For everyone else, AI (Pathfinding), the beginnings of the combat system and the animation framework for effects (attack, damage, interaction and transitions) has been completed! Latest video:



 

BacioiuC

Well-known member
A quick update on the status of the game:
  • Items have been implemented. So far the player can pickup Potions (restore health) and arrows (re-supply your quiver so you can use the bow)
  • Sprite sorting is done and sprites are sorted properly based on distance to the player
  • Stairs for going up and down between levels
  • Enemies now drop corpses (and items)
  • Weapons (Dagger, Sword, Bow) and spell casting effects have been implemented. Right now, switching between Sword and Bow is done using the S and B buttons on the side of the movement area. In the future, the S and B buttons will be replaced with < and > allowing you to toggle between the items available.
  • The animation system is completed, with player attacks having their own animations + critical animations.
What's left to do now is wrap up the list of usable items and start designing enemies and a bit of level design (traps, blockers, healing areas etc). As soon as I'm done with this I'll put an order for graphics from my artist and with a little bit of luck version 1.0 will be ready before November 2nd (the 4 year anniversary of the original game).

Here's a video showcasing the latest progress:
 
Top