What's new

Optimization Ideas?

  • Thread starter PCMasterRace
  • Start date
  • Views 341
Status
Not open for further replies.
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,453
Reaction score
1,462
Fixed*
 
Last edited:
S7 Pro

S7 Pro

Seasoned Member
Modder Programmer
Messages
2,511
Reaction score
1,599
It's hard to optimize your code if I don't know exactly what you have. I know you probably wouldn't post the source, but give me a little more of a description of what you're actually making?
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,453
Reaction score
1,462
It's hard to optimize your code if I don't know exactly what you have. I know you probably wouldn't post the source, but give me a little more of a description of what you're actually making?
I Don't really wanna go into detail about the game or give out the source but currently, there's about 4 small animations, one sprite sheet, and a handful of other art assets used for GUI and the likes, two scenes, 10 sounds and about 10 scripts.

There's really not a lot and as for the scripting, it's very minimal as it is only a small mobile game. Like I'm asking for tips, like typical ways of optimizing code, like what not to do when dealing with a slow processor/gpu(phone). My computer tends to run it perfectly so theoretically, it could just be the mousebutton function still running and getcomponent causing the lag.

I do have an OnGUI function doing something in half of the scripts if that's something I should look at? I'm using the Unity3D engine, I never mentioned that in the OP, like it could even be something in my build settings.
 
Last edited:
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,476
Reaction score
3,422
I Don't really wanna go into detail about the game or give out the source but currently, there's about 4 small animations, one sprite sheet, and a handful of other art assets used for GUI and the likes, two scenes, 10 sounds and about 10 scripts.

There's really not a lot and as for the scripting, it's very minimal as it is only a small mobile game. Like I'm asking for tips, like typical ways of optimizing code, like what not to do when dealing with a slow processor/gpu(phone). My computer tends to run it perfectly so theoretically, it could just be the mousebutton function still running and getcomponent causing the lag.

I do have an OnGUI function doing something in half of the scripts if that's something I should look at? I'm using the Unity3D engine, I never mentioned that in the OP, like it could even be something in my build settings.
Do you think it could be your system? Your game might be too demanding for your system :eek:.
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,453
Reaction score
1,462
Do you think it could be your system? Your game might be too demanding for your system :eek:.
The game is pretty small so it's obviously my mistake in the code somewhere. It's fine on my computer, just not my phone.
 
Last edited:
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,476
Reaction score
3,422
The game is pretty small so it's obviously my mistake in the code somewhere. It's fine on my computer, just not my phone.
Ah, well I believe you can optimize for mobile in the build settings.
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,453
Reaction score
1,462
Ah, well I believe you can optimize for mobile in the build settings.
It's pretty small in comparison to anything I've worked on in the past, although I haven't really done any mobile games in the past. So it has to be something in the code causing the issue. If you read over my posts, I've shown what I've used or tried thus far. I've tried messing with a build setting, there's not much optimization but rather, ways to reduce file size.
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,453
Reaction score
1,462
*Edit, didn't make much of an effect, saved a little - Actually, just used the profiler and it seems the script I use for scaling was running forever, stopping this after it's scaled should save a whole lot of work for the cpu/gpu

I've also compressed my textures. Looking at the profiler, here, I get huge CPU sprikes from overhead, any help?

txWwOHw.png
 
Last edited:
Status
Not open for further replies.
Top Bottom