Developing for Dreamcast and PC simultaneously

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
cptnoremac
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Oct 05, 2019 8:31 am
Has liked: 0
Been liked: 0

Developing for Dreamcast and PC simultaneously

Post by cptnoremac » Sat Oct 05, 2019 9:07 am

Hi, all. I'm interested in making a Dreamcast game that requires the keyboard. However, since most Dreamcast owners don't have keyboards for them and I still want anyone to be able to play, I want to release a PC version as well.

My question is, what considerations do I have to keep in mind to save myself from porting nightmares in the future? Can I just focus on getting it to work on the Dreamcast and then easily drop it into Steam later, or is it more complicated than that?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5410
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 2 times
Been liked: 16 times
Contact:

Re: Developing for Dreamcast and PC simultaneously

Post by BlueCrab » Sat Oct 05, 2019 11:27 pm

Unfortunately, you're probably going to have to do porting work, no matter what route you take to developing on the Dreamcast and a PC. Other than old 1.2.x versions of SDL (which still work pretty poorly on the Dreamcast for anything complex), there's not much ready-made that takes away most of the porting work.

My approach was always to write my own little library which abstracted the system-dependent parts of my code.
cptnoremac
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Oct 05, 2019 8:31 am
Has liked: 0
Been liked: 0

Re: Developing for Dreamcast and PC simultaneously

Post by cptnoremac » Sun Oct 06, 2019 7:18 am

The game I want to make is a simple, 2D, single-screen game. On the order of Asteroids, say, with SNES-quality sprites and backgrounds. Of course it would need to run at 60fps. Do you think SDL would be capable enough for something like that?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5410
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has liked: 2 times
Been liked: 16 times
Contact:

Re: Developing for Dreamcast and PC simultaneously

Post by BlueCrab » Sun Oct 06, 2019 9:21 am

It could possibly be good enough, depending on how you write your code.

That said, as I said before, SDL is pretty bad on the Dreamcast (there are multiple different ports of it by different people, each with their own unique and possibly not well documented set of problems). Although it might end up being slightly more work, I'd recommend avoiding SDL if at all possible.
cptnoremac
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Oct 05, 2019 8:31 am
Has liked: 0
Been liked: 0

Re: Developing for Dreamcast and PC simultaneously

Post by cptnoremac » Sun Oct 06, 2019 12:17 pm

Thanks for the advice. I'll check back later in case anyone else wants to chime in as well.
User avatar
ThePerfectK
Insane DCEmu
Insane DCEmu
Posts: 127
Joined: Thu Apr 27, 2006 10:15 am
Has liked: 21 times
Been liked: 19 times

Re: Developing for Dreamcast and PC simultaneously

Post by ThePerfectK » Sun Oct 06, 2019 9:39 pm

On top of the many SDL dreamcast ports being incomplete or otherwise flawed, they are the old SDL, based off of SDL 1.3 (or earlier). SDL had a clean break with the release of SDL2, SDL 1.3 and SDL2 are incompatible and different technologies. SDL2 has already become the stardard, nobody uses SDL 1.3 for PC development anymore. It sticks around merely as legacy support, there is no real reason to use it. It's not actively maintained. SDl2's syntax, hardware acceleration, abstraction layers, etc are entirely different, the code is completely incompatible.

That said, if you want to do simultaneous development, the best approach is to make a PC act more like a dreamcast, not the other way around. A modern OpenGL programmable pipeline is flexible enough to have it behave much like the Dreamcast does, with palettes and all that, through shaders. That requires a lot of bespoke code for the PC port, however.
Still Thinking!~~
User avatar
Protofall
DCEmu Freak
DCEmu Freak
Posts: 64
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has liked: 12 times
Been liked: 10 times
Contact:

Re: Developing for Dreamcast and PC simultaneously

Post by Protofall » Sat Oct 12, 2019 6:25 am

For cross-platform releases I'd recommend Simulant. Projects cross-compile on Dreamcast, Windows, Linux and later on it will support Mac, Andriod, iOS and PSP. It can do both 3D and 2D. Its Discord channel is here: https://discord.gg/KAp5VU
These users liked the author Protofall for the post:
kazade
Moving Day: A clone of Dr Mario with 8-player support <https://dcemulation.org/phpBB/viewtopic ... 4&t=105389>
A recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
mrneo240
DCEmu Freak
DCEmu Freak
Posts: 73
Joined: Wed Mar 14, 2018 12:22 am
Has liked: 9 times
Been liked: 10 times

Re: Developing for Dreamcast and PC simultaneously

Post by mrneo240 » Sun Oct 13, 2019 9:56 pm

Definitely agree with writing a little abstraction framework.

Lately all my projects work simultaneously on pc and Dreamcast, and for a couple also on PSP. Same codebase running the same for all three. Develop on Windows and check on Dreamcast every so often, iteration is much faster.

https://cdn.discordapp.com/attachments/ ... _00099.mp4
kazade
Insane DCEmu
Insane DCEmu
Posts: 140
Joined: Tue May 02, 2017 3:11 pm
Has liked: 2 times
Been liked: 16 times

Re: Developing for Dreamcast and PC simultaneously

Post by kazade » Tue Oct 15, 2019 3:38 am

If you use GLdc and ALdc then you only need to special case input and window creation really. Alternatively like Protofall suggested, Simulant is my cross platform general purpose game engine, it's massively under development but it's easy to get up and running and building stuff for Windows, Linux and Dreamcast: https://simulant-engine.appspot.com
cptnoremac
DCEmu Newbie
DCEmu Newbie
Posts: 4
Joined: Sat Oct 05, 2019 8:31 am
Has liked: 0
Been liked: 0

Re: Developing for Dreamcast and PC simultaneously

Post by cptnoremac » Tue Oct 15, 2019 2:37 pm

Excellent. It's great to see there are some thoughtful tools out there.
User avatar
lerabot
Insane DCEmu
Insane DCEmu
Posts: 123
Joined: Sun Nov 01, 2015 8:25 pm
Has liked: 0
Been liked: 3 times

Re: Developing for Dreamcast and PC simultaneously

Post by lerabot » Fri Oct 25, 2019 5:24 am

I can only recommend GLdc. It's what I've been using for all my project. My projects are DC and PC compatible, using a mix of C, LUA and love2D to get the games running on PC. If you're doing 2D stuff, Love2D could be a good "renderer" for PC.

I haven't used Simulant personally but there's a bunch of people working with it and the Discord is very supportive.

Nevertheless if you're looking for people to speak with you can check out the Simulant discord!
User avatar
Ian Robinson
DCEmu Cool Newbie
DCEmu Cool Newbie
Posts: 14
Joined: Mon Mar 11, 2019 7:12 am
Has liked: 17 times
Been liked: 1 time

Re: Developing for Dreamcast and PC simultaneously

Post by Ian Robinson » Wed Oct 30, 2019 1:45 am

Hi, As Bluecrab said there are many ports all have some problems .. Big but a single screen game with snes grafix i dont see a problem with using sdl it might be old but it can do a game like that both on pc and dreamcast.. I tend to like using kos 1.1.9 with SDL that GPF fixed for CDDA and stereo it works very well not had a problem using it in my projects.. Now going back that old i would not Advise.. but it can be done.. The main port of SDL is fine it's when you start using the add on's like SDL_mixer and SDL_image you see problems with memory leaks.. Stick to base SDL 1.2 and it could do a game like that on both//// now your going to have to keep everything under 12 meg you could use CDDA as audio .. as long as all your assest are in a baked in romsdisk so loaded in memory not reading from the Gdrom.. That way the cdda can keep playing ...

Thats my take on it.. Used in the right way for simple thing's it's very good start/.. You can proto type the game on pc know it run on Dreamcast there's really nothing else like it..
Post Reply