• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Game slowdown on laptops - are my graphics to blame?

D

Dibidoolandas

Guest
So I'm very green when it comes to Game Maker (Studio), but I've been working on my platformer game for a while now and am starting to implement graphics. I've tested on a couple of other machines and they've performed well, however on 2 laptops that I tested the game just ran in slow motion. I don't think it has anything to do with memory leaks or anything like that because it was right out of the gate, but seemed like it might be tied to my parallaxing backgrounds.

I'll admit my background images are large and there's a lot of artwork, but the visual style of the game is important to me. Still, I might be just using stupidly large images. Here are a few examples of background images in my level:
http://i.imgur.com/llJsXGy.png
http://imgur.com/6a4YFh1
http://imgur.com/t0WiJCo

Suppose it could also be my parallax code, though I pulled that largely from someone on this site who had positive responses.

If you'd like to actually see the game, I can provide a link to the exe. Is there a better way to share the game? I'm sure DLing an exe might make some people nervous. The game is very much in progress so just expect it to be like swiss cheese if you see errors/crashes (you WILL see one if you die). Arrow keys, Z/X to jump/run-shoot. Anyways here's the link to the standalone exe.

https://1drv.ms/u/s!AiTPeNT5oR9jiYovFLTU9PCkKLddYA

Any help would be appreciated. Maybe those laptops just suck at running games? I know my wife's crappy one does, it can barely use the web.
 

GMWolf

aka fel666
It could be a la k of vram on the laptop.
Your textures to look very high res. Try reducing the resolution by 1/2 to see if that helps.

You should also use the profiler to find out which parts of you code are slow.
 
R

RealsLife

Guest
So I'm very green when it comes to Game Maker (Studio), but I've been working on my platformer game for a while now and am starting to implement graphics. I've tested on a couple of other machines and they've performed well, however on 2 laptops that I tested the game just ran in slow motion. I don't think it has anything to do with memory leaks or anything like that because it was right out of the gate, but seemed like it might be tied to my parallaxing backgrounds.

I'll admit my background images are large and there's a lot of artwork, but the visual style of the game is important to me. Still, I might be just using stupidly large images. Here are a few examples of background images in my level:
http://i.imgur.com/llJsXGy.png
http://imgur.com/6a4YFh1
http://imgur.com/t0WiJCo

Suppose it could also be my parallax code, though I pulled that largely from someone on this site who had positive responses.

If you'd like to actually see the game, I can provide a link to the exe. Is there a better way to share the game? I'm sure DLing an exe might make some people nervous. The game is very much in progress so just expect it to be like swiss cheese if you see errors/crashes (you WILL see one if you die). Arrow keys, Z/X to jump/run-shoot. Anyways here's the link to the standalone exe.

https://1drv.ms/u/s!AiTPeNT5oR9jiYovFLTU9PCkKLddYA

Any help would be appreciated. Maybe those laptops just suck at running games? I know my wife's crappy one does, it can barely use the web.
I don't know what your problem is :( but I finished the first level xD nice game bro.
 
D

Dibidoolandas

Guest
It could be a la k of vram on the laptop.
Your textures to look very high res. Try reducing the resolution by 1/2 to see if that helps.

You should also use the profiler to find out which parts of you code are slow.
Yeah, I'm wondering about something like VRAM, because I ran the game on a not-incredible PC without a discrete graphics card and it seemed to handle things just fine. Thanks for the tip about the profiler, I don't really know anything about it so I'll dig into it a bit. And yeah I was thinking about going half scale, I just didn't want to compromise the artwork. But I guess that's what optimization is all about.

And thanks RealsLife! Workin' on it.
 
D

Dibidoolandas

Guest
It could be a la k of vram on the laptop.
Your textures to look very high res. Try reducing the resolution by 1/2 to see if that helps.

You should also use the profiler to find out which parts of you code are slow.
Hey, follow-up question about backgrounds. If I were to scale them down to half-size, where would I artificially scale them back up to the correct scale? For instance my original clouds layer was 1920x530. I'm testing by duplicating this background and scaling it down to 1/2, at 960x265. Where do I then tell GML to draw this background at twice that scale? Should I change my draw_background() script to draw_background_ext() so that I have an xscale/yscale component and handle it there?

Thanks in advance.
 

Sabnock

Member
Nice looking game and it ran fine on my PC but that has a GTX 970 sli setup with 2GB Vram so is not a good benchmark for you.

Graphics and animation are beautiful but if it is a vram problem I can't see that a downscale in resolution will impact on them too much. definitely worth a try.

Do you have the tech specs for the laptops that it ran slow on?
 

Sabnock

Member
Couple of notes on the game.

- some animation to the octopi would great. i.e. they spread their tentacles out at the top of their jump
- in the menu system you have used the z key as the select and the enter key as the confirmation of the selection. this is a bit confusing and you should make all just use the Z key.
- you probably know this but when you fall from the moving platform the character doesn't reset back to a checkpoint or even the beginning and the game is not playable and needs restarting.
- why does the character change to a blank of himself when jumping?

this game is looking great so far and I really hope you finish it and I look forward to playing it.
 

GMWolf

aka fel666
Here are my tips on scaling graphics:
Scale by 1.68 lower than native. You end up with 1/2 the mem usage.

Use some shader like hq4x to avoid smudging. You may want to make it optional for lower end hardware.

Don't scale everything. Backgrounds are good to scale down, but items you have to recognize like the player, powerups, etc need higher detail as player will focus on them. If it the background looks too low res, play the game and see if you notice when you are not looking for resolution.

Sometimes you may need to scale to fit more textures on a single texture page.

Before scaling, make sure your drawing and texture pages are already optimized to reduce texture swaps. (Don't just turn up the texture size in global settings, that just makes things worse on old / mobile hardware).

One thing is for sure though, that blue background is unnecessarily large....
 
D

Dibidoolandas

Guest
Couple of notes on the game.

- some animation to the octopi would great. i.e. they spread their tentacles out at the top of their jump
- in the menu system you have used the z key as the select and the enter key as the confirmation of the selection. this is a bit confusing and you should make all just use the Z key.
- you probably know this but when you fall from the moving platform the character doesn't reset back to a checkpoint or even the beginning and the game is not playable and needs restarting.
- why does the character change to a blank of himself when jumping?

this game is looking great so far and I really hope you finish it and I look forward to playing it.
Thanks for the notes, particularly about animation. I'm in the process of switching things over to actual animations from the test sprites I was using, so things like the octopi are still FPO. That's why the character looks like a sketch when he jumps, I'm still working on that drawing and wanted to make sure the outline looked good before coloring. ;-)
And yeah I have to do little things like fix restarts and menu quality of life improvements. Right now things are just kind of 'good enough' to test. ;) Thanks for testing it!

Here are my tips on scaling graphics:
Scale by 1.68 lower than native. You end up with 1/2 the mem usage.

Use some shader like hq4x to avoid smudging. You may want to make it optional for lower end hardware.

Don't scale everything. Backgrounds are good to scale down, but items you have to recognize like the player, powerups, etc need higher detail as player will focus on them. If it the background looks too low res, play the game and see if you notice when you are not looking for resolution.

Sometimes you may need to scale to fit more textures on a single texture page.

Before scaling, make sure your drawing and texture pages are already optimized to reduce texture swaps. (Don't just turn up the texture size in global settings, that just makes things worse on old / mobile hardware).

One thing is for sure though, that blue background is unnecessarily large....
Thanks for all the info, lot of good stuff. I haven't played with texture pages really at all, though I know that's an optimization trick, so I'll have to look into it. I assumed that was sort of a late-dev process but I should probably start looking into it now.

Haven't used shaders before, I'll have to take a look at that. I'm interested to see how noticeable the downscaling is, hopefully not too bad.

Looks like I've got my homework cut out for me, thanks again for the advice.
 
D

Dibidoolandas

Guest
Nice looking game and it ran fine on my PC but that has a GTX 970 sli setup with 2GB Vram so is not a good benchmark for you.

Graphics and animation are beautiful but if it is a vram problem I can't see that a downscale in resolution will impact on them too much. definitely worth a try.

Do you have the tech specs for the laptops that it ran slow on?
Some more feedback on the laptop that it ran poorly on - it actually seems like a solid laptop, so that's concerning to me.
Intel i5-6200U CPU @ 2.30 GHz 2.40 GHz
8.00 GB RAM
64-bit Windows 10

Meanwhile I tested on some desktops at work that have 3.2 or so GHz processors and 8GB RAM it ran like a dream.
 
Top