acceptable memory usage?

Discussion and feedback on Construct 2

Post » Wed Mar 26, 2014 4:17 pm

What's an acceptable memory usage for a desktop game? I'm currently at around 35mb but i only have in around half the images the game will require.

I can probably still do some optimising but i'd like to know a realistic figure to stick to.

CPU is at about 8% and the game runs 60fps.
B
43
S
23
G
20
Posts: 735
Reputation: 12,027

Post » Thu Mar 27, 2014 12:47 am

You would almost never need to worry about memory usage for desktop games, with WebGL in C2 being very good with memory management, I doubt you will ever have over 2GB of assets on screen. :D

Most desktops have 4GB of ram, many have 8GB.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Mar 27, 2014 6:21 am

@Ethan - Actually I believe it doesn't use your typical memory ram; it uses vram. Once you get to ~150mbs or so you will notice a small "stutter" on the start of the layout. I have a bit of a super computer so I haven't figured out what's considered too much, but you probably don't want to go any higher than the 100-150 mb range.
B
40
S
12
G
1
Posts: 533
Reputation: 4,149

Post » Thu Mar 27, 2014 6:31 am

The entire game is stored (uncompressed?) in RAM, the current layout is also stored in VRAM (Video RAM of the graphic card). VRAM is usually much smaller than your computer's RAM, some people may have 4gb of VRAM others may have 512mb.
B
149
S
75
G
20
Posts: 1,791
Reputation: 22,695

Post » Thu Mar 27, 2014 8:30 am

The entire game is stored (uncompressed?) in RAM

1) Audio files are not supposed to be loaded into memory ahead of preload/play call
2) Audio files can be read "by name", so - by design - the game has no way to figure out in advance which files it would need to load. It actually works flawlessly, as I produced a game with 300Mb+ audio assets loaded this way
3) On a desktop game (NodeWebkit) the delay you might be experiencing upon startup, is caused by unpacking on the fly the contents of the zip file with game assets. Try unpacking the whole stuff to the app folder, delete package.nw, and compare the startup time - you'll be surprised ;-)
B
18
S
3
G
3
Posts: 83
Reputation: 3,736

Post » Thu Mar 27, 2014 9:34 am

VRAM you wouldn't even need to worry, most dedicated GPUs now have 1GB and thats plenty for storing onscreen objects. Intergrated GPU like on Intel or AMD APUs use system ram for vram so thats even less of a concern.

Go ahead and do your best.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Thu Mar 27, 2014 12:07 pm

<100mb memory usage will likely run on any desktop and even some high end mobiles.

If you're over 250mb of memory usage, I'd say you're doing something wrong with the design of your game.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,661

Post » Thu Mar 27, 2014 4:52 pm

@Ashley - all you need is one large image with an animation and you'r'e already there :)
B
40
S
12
G
1
Posts: 533
Reputation: 4,149

Post » Thu Mar 27, 2014 4:59 pm

@ome6a1717 - that is exactly what you should not do. See Remember not to waste your memory
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,661

Post » Thu Mar 27, 2014 5:30 pm

@Ashley

https://www.youtube.com/watch?v=FVaY6TTv8s8 If you scroll to 1:00 or so, how would we do something like this, then? (and btw, this is an example from the game you referenced in the "remember not to waste your memory" blog)
B
40
S
12
G
1
Posts: 533
Reputation: 4,149

Next

Return to Construct 2 General

Who is online

Users browsing this forum: mihirolover, Tjums and 14 guests