Win3x.Org

Windows & DOS Community

Dos game development

Post Reply   Page 1 of 1  [ 10 posts ]
Author Message
Nikita
Post subject: Dos game development
Posted: 13 Jul 2021 21:37
Membre inscrit
Offline
 
Posts: 4
Joined: 13 Jul 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.


Top
Profile Quote
Deksor
Post subject: Re: Dos game development
Posted: 14 Jul 2021 19:04
Membre d'honneur
User avatar
Offline
 
Posts: 5250
Joined: 23 May 2011 13:33
Retro PC: 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 ?


Top
Profile Quote
Nikita
Post subject: Re: Dos game development
Posted: 14 Jul 2021 20:23
Membre inscrit
Offline
 
Posts: 4
Joined: 13 Jul 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.


Top
Profile Quote
Deksor
Post subject: Re: Dos game development
Posted: 14 Jul 2021 20:32
Membre d'honneur
User avatar
Offline
 
Posts: 5250
Joined: 23 May 2011 13:33
Retro PC: 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)


Top
Profile Quote
Nikita
Post subject: Re: Dos game development
Posted: 14 Jul 2021 21:25
Membre inscrit
Offline
 
Posts: 4
Joined: 13 Jul 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.


Top
Profile Quote
Deksor
Post subject: Re: Dos game development
Posted: 15 Jul 2021 10:27
Membre d'honneur
User avatar
Offline
 
Posts: 5250
Joined: 23 May 2011 13:33
Retro PC: 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
Quote:
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 ?


Top
Profile Quote
Nikita
Post subject: Re: Dos game development
Posted: 16 Jul 2021 19:30
Membre inscrit
Offline
 
Posts: 4
Joined: 13 Jul 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.


Top
Profile Quote
Joet BERNARD
Post subject: Re: Dos game development
Posted: 16 Jul 2021 22:27
Modérateur
User avatar
Offline
 
Posts: 2416
Joined: 19 Mar 2016 20:33
Retro PC: Compaq Presario 1926, Celeron 400 MHz, 192 Mo RAM
 
If the game is too fast, try using AT-SLOW

_________________

Accueil de mon Index de sites
Accueil de WINJOY (version "Theta" déployée | Iota en vue ?)
Collection ± à jour, en travaux 🚧⚠️🚧
Mon serveur Discord
KB835732


Top
Profile Quote
Deksor
Post subject: Re: Dos game development
Posted: 17 Jul 2021 02:22
Membre d'honneur
User avatar
Offline
 
Posts: 5250
Joined: 23 May 2011 13:33
Retro PC: 486DX 33 8mo SB Pro 2, P2 450 128mo Voodoo 2 SLI
 
What are the specs of your DOS machine ?


Top
Profile Quote
kitsune
Post subject: Re: Dos game development
Posted: 21 Nov 2021 21:45
Membre inscrit
Offline
 
Posts: 92
Joined: 12 Oct 2019 03:42
 
Nikita wrote: *  13 Jul 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


Top
Profile
Display: Sort by: Direction:
Post Reply   Page 1 of 1  [ 10 posts ]
Return to “Projets en cours”
Jump to: