Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Game is too slow, Help needed!

Author
Message
NiallAsString
14
Years of Service
User Offline
Joined: 22nd Feb 2012
Location:
Posted: 22nd Feb 2012 17:41
I am creating a 2D game for a college assignment consisting of a maze and moving sprites. I had a screen working perfectly and just how a wanted it to. I opened it up today in college and everything was slow. No code has been changed since the past time it was working. I have also tried running the program on different machines.

Has this happened to anyone else or does anyone know how to fix it?
Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 22nd Feb 2012 21:59
once u created sprite, you have to hide it and use "paste sprite" command instead.

sprite 1,0,0,1
hide sprite 1
set sprite 1,0,1
do
paste sprite 1,0,0
sync
loop

more 3d models .x/.obj and more foramts here:
[href]https://www.turbosquid.com/Search/Index.cfm?keyword=gogetax1&x=0&y=0[href]
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 22nd Feb 2012 22:40
Can you answer the following questions for me:

1) How many sprites are you using?
2) How large are the sprites?
3) What are the specs of your computer? (CPU, GPU, OS)
4) What are the specs of the computer at college? (CPU, GPU, OS)
5) Does the computer at college run in a VM (virtual machine)?

TheComet

SoftMotion3D
AGK Developer
20
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 23rd Feb 2012 18:37
Quote: " 2D game "

theres the problem...lol!

I'll give ya some pointers in using 2d so you dont go crazy

Stay Away from:
-line command (slow as hell!!)
-get image command (also slow and dont recommend using)
-paste command almost equaly slow. dont paste too many things or bye bye fps(framespersecond)

If your working with 2d and 2d only.....maby try play basic? it was designed to riffle through 2d graphics using a very low directx level.

Ashingda 27
18
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 25th Feb 2012 16:06
You can still go a bit lower level by using Advanced Sprites DLL but it takes more time getting used to that as well. Still there are alot of techniques to get faster fps using sprites with DBP.

JRNTexas
15
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 25th Feb 2012 21:50
Also stay away from changing font sizes and fonts. There are some Dlls for printing text to screen that are much faster, like D3D.
MarcoBruti
14
Years of Service
User Offline
Joined: 20th Nov 2011
Location: Caput Mundi
Posted: 25th Feb 2012 22:03
hi,
what kind of PC are you using?
I developed 5 games with DBPro, one is 3D, the other four are 2D, but we speed is good (30-50 fps) althought I use a lot of sprites, paste image commands as it were raining, a lot of scrolling backgrounds, point commands etc.
On a decent dual-core laptop, there are no problems. of course on my children's netbook (1GB RAM, Intel Atom), of course FPS<10.
Pls check it at http://darkbasicgames.altervista.org
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 27th Feb 2012 03:12 Edited at: 27th Feb 2012 03:13
I also have negligible performance loss drawing 2D hud over 3D environments. Probably 20-30 items on screen.
Although I'm certain the original poster is doing some more involved things like 2D animation.

It's true though some commands are just bad and should be avoided. Probably due to trade-offs with the 3D system.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Feb 2012 01:57
Quote: "If your working with 2d and 2d only.....maby try play basic? it was designed to riffle through 2d graphics using a very low directx level."


how about http://www.appgamekit.com/

meh...

@MarcoBruti
Quote: "On a decent dual-core laptop, there are no problems. of course on my children's netbook (1GB RAM, Intel Atom), of course FPS<10."


That's so sweet [the fact you make the games your kids play sweeeeeet!]

Login to post a reply

Server time is: 2026-07-10 08:48:21
Your offset time is: 2026-07-10 08:48:21