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 Discussion / 'not enough memory'

Author
Message
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 02:25
i am only running a few bitmaps and 2d tiles and its moaning about not enough memory how can i clear the memory

Daedalus
Chris K
21
Years of Service
User Offline
Joined: 7th Oct 2003
Location: Lake Hylia
Posted: 14th Nov 2004 02:39
Why are you using bitmaps?

Use sprites, they're much quicker
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2004 18:15
delete bitmap
delete image

one of your "few bitmaps" could be 10000x5000 pixels for example, thats 200meg of ram for the image (1/5th gig), just what sizes are your images and what memory does your PC and video card have?

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 19:02
im having to load the bitmaps to make the sprites and my tiles are being made using 'load image'. the bitmaps are no bigger than 70*80. have 386 mb ram i can hardly see a few small bitmaps killing it. me video card is only 8mb. im using delete bitmap/image codes. ill stick the source on.



Daedalus

Attachments

Login to view attachments
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2004 19:25
the 8mb video card is probably the issue, you have 3mb just for the screen and the backbuffer, then you load the images and create a few hundred 3d models, they may be simple models (plains) but all the data for each of them has to live on the video card (about 400 bytes per plain), you can rapidly run out of storage, dx probably creates some buffers on the card for it`s own use as well, try running the same code at a lower res (don`t bother with changes to the actual code other than altering the resolution) if it then runs you know it`s the card to blame, new cards are cheap anyway and it`s the time of year to get things stuck onto your wishlist , maybe even a new PC?

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 19:59
lol ill give it a go my giving father stole my 32mb and need to save all me money for university next year lol

Daedalus
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 20:00
tried running it at 800*600*16 and did same and went to a white screen =S. I would have thought hiding the plains would reduce the amount of ememory needed vastly

Daedalus
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2004 22:33
tried 320x240?, cut down on the tilemap size?, at some point it should start working, hiding plains increases render speed, but they still have to be in memory in case you decide to show them again, can`t think of any other cause, the code looks normal enough.

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 14th Nov 2004 23:35
just makes it go all crazy and pixley. guess i just have to mod my code a bit

Daedalus
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 15th Nov 2004 02:37
so now it runs?, if it runs now (even if it looks crappy) then thats the problem, and if thats the case then all you have to do is take a Magnum to your GFX card and blow its GPU out (after removing it from the PC and getting a better card installed natch) .

Mentor.

PC1: P4 3ghz, 1gig mem, 3x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 16th Nov 2004 00:30
couldnt test to see if it gliched lol cos i couldnt see the go into the building lol. my card is interna, anyway which is worrying so no removale of chips damnit

Daedalus
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 16th Nov 2004 04:04
If you have an onboard video card you can still get a new one. Just get a PCI video card. They are not as fast at AGP cards, but it will still be much much better than your onboard card. If you don't have very much money look at Geforce 4 PCI cards, you can get them really cheap and they are decent enough for DB. If you have $100 to spend then go for a PCI GeforceFX 5200 128 MB. It would significantly improve the performance of your computer. What processor do you have?

Xander Moser - Bolt Software - Firewall
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 16th Nov 2004 04:25
1 ghz lol

Daedalus
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 16th Nov 2004 07:04
*dies*

That's the exact specs of the compoopers at my high school. Upgrade dude. Just get some cheap Geforce 2.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 16th Nov 2004 11:32
@ BDDP: ? 1 ghz is the processor speed, not the video card...and a Geforce 2 would not be worth the purchase.

@ Daedalus: a 1 ghz processor is not that terrible, I used a computer with that processor to create Firewall for the past year, before that I was using a computer with a Pentium II 300 mhz. But I did have a Geforce 2 in there, and a Geforce 4 in the 1 ghz machine.

Xander Moser - Bolt Software - Firewall
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 17th Nov 2004 00:10
my processor is fine not much difference between my system speed and my schools 3ghz. Damn graphics cards!

Daedalus
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 17th Nov 2004 00:12
would memblocks solve my problem? not sure what they i beleive they are kinda crazy arrays

Daedalus
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 17th Nov 2004 02:53
Memblocks are basically what you can use to bit-bash in DBC.

By bit-bash i mean mess around with a flew low-level things - like changing individual bytes of sound and stuff, so I doubt it would solve your problem...

ATM with your code, it's more hard-drive-access friendly - for example, all the images are loaded at the beginning. Instead, try only having an image in memory when you need it, and when you don't, straight away, go with the delete image!

(Note: I think you can texture an object with an image and then delete that image quite easily...)

Also, for your computer, "640x480x16" when you're making a darkbasic program would be more appropriate than "800x600x32" which is what I'm guessing you're using...

BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 18th Nov 2004 09:05
Bolt-He mentioned he had an 8mb graphics card, then he posted about his 1ghz processor. The only thing he has up from my school's PCs is that their PCs only have 64mb ram.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 18th Nov 2004 09:07 Edited at: 18th Nov 2004 10:07
WTF mate?

This isn't the thread I posted in. Sorry for the double post.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Underworld 1020
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 22nd Nov 2004 23:29
close out of allother programs
DaedalusX
21
Years of Service
User Offline
Joined: 10th Mar 2004
Location:
Posted: 24th Nov 2004 03:04
DB was only thing running

Daedalus
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 25th Nov 2004 15:25
Look out for viruses & trojans & ad-ware - badly written pieces of crap, not even including what they can do to your system...

[href]www.zonealarm.com[/href] - The best free firewall
AVG Anti-Virus - Look it up, I use Norton ATM
[href]www.lavasoft.de[/href] - Get Ad-Aware from here. Joint best anti-adware program, along with Spybot Search & Destroy
[ Although Norton says it gets rid of adware now, they haven't finished the definitions yet ]

Press Ctrl-Alt-Delete, (on 2000/XP click the Processes panel), and click-once and then hit End Task for anything that isn't:

WIN9x (95, 98, ME):

EXPLORER
SYSTRAY
(any Anti-Virus programs, e.g., CCAPP.EXE, CISVC.EXE, CCPROXY.EXE, )

(soz. g2g 2 skool. I'll finish this list later.)

Login to post a reply

Server time is: 2025-05-24 12:20:21
Your offset time is: 2025-05-24 12:20:21