Win3x.Org

Windows & DOS Community

Dos game development

Répondre   Page 1 sur 1  [ 10 messages ]
Auteur Message
Nikita
Sujet du message : Dos game development
Publié : 13 juil. 2021 21:37
Membre inscrit
Hors-ligne
 
Messages : 4
Inscription : 13 juil. 2021 21:18
 
Hello everyone.
Now I'm developing a DOS game. I'm using Allegro4.4 as a game library, and DJGPP as a compiler.
I'm working on Ubuntu 20.04.
The game runs well on Linux, but when I run it on Dosbox in Windows 10, it freezes or exits unexpectedly.
Anyone can help me? I'm so confused about this and wondering if I have to go on this job.
The screen resolution is 800 * 600, and this is a 2D RTS game.
I think it's because the game uses too much CPU and RAM when it loads and draws images. Furthermore, whereas standard resolution of DOS game is 320 * 240 or 640 * 480 it uses 800 * 600, I think this is another reason.
I tried to draw compiled images, but CPU and RAM usage increases, and it gets worse in Dosbox.


Haut
Profil Citer
Deksor
Sujet du message : Re: Dos game development
Publié : 14 juil. 2021 19:04
Membre d'honneur
Avatar de l’utilisateur
Hors-ligne
 
Messages : 5201
Inscription : 23 mai 2011 13:33
PC Rétro : 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
Some DOS games had the possibilty to use 800x600 res, but yes it's not the most standard res used by DOS games.
Actually none of the res you listed are the most used ones, most DOS games ran at 320x200 ;)
Unlike what you may think, this is still a 4:3 mode, it's just that the pixels aren't square.

I've never used Allegro by the way, but I don't think DOSBox should crash if the CPU usage is too high. Does DJGPP report any warning when compiling ? Do you have access to a real DOS computer ? Have you tried another emulator ?
When you run your game on Ubuntu, is it also using DOSBox or do you run it somehow natively ?


Haut
Profil Citer
Nikita
Sujet du message : Re: Dos game development
Publié : 14 juil. 2021 20:23
Membre inscrit
Hors-ligne
 
Messages : 4
Inscription : 13 juil. 2021 21:18
 
When I modified the code, I make 2 built binaries for both Ubuntu and Dos.
Ubuntu build runs well on real or VM Ubuntu.
Sometimes I test the build on a real Dos machine, and it runs well, but a little slow.
However, testing on real Dos is uncomfortable, so I wanted to do on Dosbox. But it always freezes there.
When I run it on Ubuntu(2 CPUs, 1GB RAM), it uses only 15 % of CPU and 4 % of RAM. But when it runs on Dosbox, it freezes as soon as started.


Haut
Profil Citer
Deksor
Sujet du message : Re: Dos game development
Publié : 14 juil. 2021 20:32
Membre d'honneur
Avatar de l’utilisateur
Hors-ligne
 
Messages : 5201
Inscription : 23 mai 2011 13:33
PC Rétro : 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
If it works on a real machine but not in Dosbox, then Dosbox is to blame. It's not an accurate emulator so it could crash for many reasons.


You could try with another build of Dosbox (Dosbox SVN, Dosbox-X, etc) or another, more accurate, emulator (PCem, 86box)


Haut
Profil Citer
Nikita
Sujet du message : Re: Dos game development
Publié : 14 juil. 2021 21:25
Membre inscrit
Hors-ligne
 
Messages : 4
Inscription : 13 juil. 2021 21:18
 
I tried using other emulators you mentioned, but the only one which can just run the game is Dosbox I'm using.
Others also start the game, but it freezes in first loading screen.
I attached the error string when dosbox is stopped due to sigsegv error.

Shutting down Allegro
Exiting due to signal SIGSEGV
General Protection Fault at eip=001765bb, error=000c
eax=00000000 ebx=0000002f ecx=00000000 edx=00000000 esi=00000000 edi=0036c07c
ebp=0036c058 esp=0036c050 program=C:\SEAS.EXE
cs: sel=00a7 base=00400000 limit=018effff
ds: sel=00af base=00400000 limit=018effff
es: sel=00b7 base=00400000 limit=018effff
fs: sel=00af base=00400000 limit=018effff
gs: sel=00bf base=00400000 limit=018effff
ss: sel=00af base=00400000 limit=018effff
App stack" [0036c2b0..002ec2b41] Exceptn stack: [002ec200..002ea2c0]

Call frame traceback EIPs:
0x001765bb
0x001762f3
0x0000adbd

Please let me know what kind of error it is.


Haut
Profil Citer
Deksor
Sujet du message : Re: Dos game development
Publié : 15 juil. 2021 10:27
Membre d'honneur
Avatar de l’utilisateur
Hors-ligne
 
Messages : 5201
Inscription : 23 mai 2011 13:33
PC Rétro : 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
Citation :
Exiting due to signal SIGSEGV
This seems to be a segmentation fault.

Maybe check your program for memory leaks or the use of a something in RAM that was already freed ?


Haut
Profil Citer
Nikita
Sujet du message : Re: Dos game development
Publié : 16 juil. 2021 19:30
Membre inscrit
Hors-ligne
 
Messages : 4
Inscription : 13 juil. 2021 21:18
 
Well, I tested in real DOS machine, but it runs really well and fast.
I don't know why DOSbox can't run it.


Haut
Profil Citer
Joet BERNARD
Sujet du message : Re: Dos game development
Publié : 16 juil. 2021 22:27
Membre inscrit
Avatar de l’utilisateur
Hors-ligne
 
Messages : 1727
Inscription : 19 mars 2016 20:33
PC Rétro : Pentium 4 1,5 GHz, 512 Mo de RAM, FX 5200
 
If the game is too fast, try using AT-SLOW

_________________

Accueil de mon Index de sites
Accueil de WINJOY (version "Eta" déployée)
Ma collection de matériel pas à jour...
Mon serveur Discord


Haut
Profil Citer
Deksor
Sujet du message : Re: Dos game development
Publié : 17 juil. 2021 02:22
Membre d'honneur
Avatar de l’utilisateur
Hors-ligne
 
Messages : 5201
Inscription : 23 mai 2011 13:33
PC Rétro : 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
What are the specs of your DOS machine ?


Haut
Profil Citer
kitsune
Sujet du message : Re: Dos game development
Publié : 21 nov. 2021 21:45
Membre inscrit
Hors-ligne
 
Messages : 46
Inscription : 12 oct. 2019 03:42
 
Nikita a écrit : *  13 juil. 2021 21:37
Hello everyone.
Now I'm developing a DOS game. I'm using Allegro4.4 as a game library, and DJGPP as a compiler.
I'm working on Ubuntu 20.04.
The game runs well on Linux, but when I run it on Dosbox in Windows 10, it freezes or exits unexpectedly.
Anyone can help me? I'm so confused about this and wondering if I have to go on this job.
The screen resolution is 800 * 600, and this is a 2D RTS game.
I think it's because the game uses too much CPU and RAM when it loads and draws images. Furthermore, whereas standard resolution of DOS game is 320 * 240 or 640 * 480 it uses 800 * 600, I think this is another reason.
I tried to draw compiled images, but CPU and RAM usage increases, and it gets worse in Dosbox.
Hi,
Something I don't understand that the last Allegro library for DOS seem to be the version 4.2.3, also have you tried to compile it directly in a DOS environment?
I advice to compile it and run it in a real MS-DOS environment before run it in Dosbox for compatibility issue.

You can use PCem or Qemu I think it's also good but maybe low for the Sound Blaster emulation.

_________________

Kitsune


Haut
Profil
Afficher : Trier par : Ordre :
Répondre   Page 1 sur 1  [ 10 messages ]
Revenir à « Projets en cours »
Aller :