LÖVE port

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
stamm
Neophyte
Posts: 3
Joined: 24-Feb-18 02:14

LÖVE port

Post by stamm » 7-Mar-18 15:43

My son and I have been exploring the dungeons again recently, and have moved from the Amiga version to DSB with Wine.

Wine is having problems going fullscreen, and as we are already designing our own dungeons I decided to try and port DSB to the Love engine. I've begun by making a main.lua file full of empty functions from https://dmwiki.atomas.com/wiki/DSB/Exposed_functions.

However, it is clear writing dsb_dungeon_view will take quite a bit longer than say dsb_bitmap_height!

Sophia, I saw you were hesitant to release the C source to DSB/ESB until you were finished as you didn't have time build it on other systems and also to retain some editorial control. Is there are any chance you could send me the C code or post it somewhere, I could translate it to Lua, keeping the base/ files compatible with the DSB C core while allowing it to run natively in Linux etc.? Otherwise do you have any advice for how I should approach the port?

User avatar
Sophia
Concise and Honest
Posts: 3909
Joined: 12-Sep-02 19:50
Location: Nowhere in particular
Contact:

Re: LÖVE port

Post by Sophia » 21-Mar-18 01:16

Sorry for the slow response, I've been pretty busy lately!

I'm not sure what kind of progress you've made on the Love port, but I've used Love somewhat so I'll share my own thoughts.

One main issue is going to be trying to trying to maintain some sort of binary compatibility when DSB is based pretty heavily on Allegro-- if you don't care about that, and don't mind that Love-DSB's savefiles won't be compatible with regular DSB, that becomes less of a problem.

The other thing about Love is that it's based on delta timing, without any way provided by the engine to set up a timer that ticks at fixed intervals. You can do this yourself without a lot of difficulty, but in my experiments with Love the timer was never smooth enough for my liking. Your mileage may vary, I guess. Admittedly this was quite a while ago, so maybe it's not an issue any more!

Of course, you'll still have to duplicate everything the DSB engine is doing under the hood, which is a pretty mighty task in itself, especially since I'll admit that DSB is not exactly a particularly well-written program.

Anyway, to be honest, DSB has kind of fallen off the radar for me so I'm not nearly as protective of it as I once was. If you're still interested in this, I'd have no problems sending you the source code-- as long as you understand that it's pretty idiosyncratic and messy and I'm not sure how much help I can provide you to get it to build.

User avatar
stamm
Neophyte
Posts: 3
Joined: 24-Feb-18 02:14

Re: LÖVE port

Post by stamm » 7-Apr-18 15:45

Well Tiggy just ate the last of the food, and the place is feeling a bit um .. enchanted .. but we've reached creature cavern!

Right now the savefile is just a script like dungeon.lua - ESB loads it OK. Hadn't considered binary compatibility but that would be great if possible. Recording/playback would be good too to check both versions do the same thing at the same time.

The timing is all wrong at the moment but I haven't been very careful so far. It may be useful to override the main loop to get things exactly right.

There are some things like how the first mummy alcove works that I may not be doing the correct way, my dsb_dungeon_view is full of magic numbers, and the less said about my blue haze the better. Lots of stuff I'm not sure about. So I think being able to read the C would help. Building it shouldn't be a problem.

So far I have a new data directory, a few new lua files and a couple of extra lines in system.lua (I think they are needed for lua 5.1). Also, there are still some scaling issues with love < 11. Do you know if I can post files on this forum, or would it be alright to push the project to gitlab or something? I don't usually use VC.

Anyway thanks for your help, and for creating such a perfect clone of this amazing game.

User avatar
Sophia
Concise and Honest
Posts: 3909
Joined: 12-Sep-02 19:50
Location: Nowhere in particular
Contact:

Re: LÖVE port

Post by Sophia » 10-Apr-18 23:30

I'd recommend using some sort of a repository, as it's probably easier and better overall.

I've uploaded the DSB code to github here: https://github.com/sparkletwist/DSB

Post Reply