Jump to content


Photo

Capacity of game maker


  • Please log in to reply
10 replies to this topic

#1 joao

joao

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 June 2012 - 06:12 AM

Well, Hi, im not a good english speaker, but i will do my best and im new (:.
Im creating a zombie game with a little of AI, i want to put in a room a LOT of zombies, the problem is that they ge game lag, when i see in administrator tasks the game use 25% of procesor and like 100mb of ram. Is possible to let the game use more ram and procesor to reduce lag? cause i think that game maker got a top of ram and procesor cause if the game lags is becouse im using all of my procesor and ram, but thats no true cause i got like 50 % of unused procesor and like 2000 mb ram free too. thanks
  • 0

#2 ZyklonMiraj

ZyklonMiraj

    GMC Member

  • GMC Member
  • 136 posts
  • Version:Unknown

Posted 13 June 2012 - 06:19 AM

Well, Hi, im not a good english speaker, but i will do my best and im new (:.
Im creating a zombie game with a little of AI, i want to put in a room a LOT of zombies, the problem is that they ge game lag, when i see in administrator tasks the game use 25% of procesor and like 100mb of ram. Is possible to let the game use more ram and procesor to reduce lag? cause i think that game maker got a top of ram and procesor cause if the game lags is becouse im using all of my procesor and ram, but thats no true cause i got like 50 % of unused procesor and like 2000 mb ram free too. thanks

Put the process priority to high in task manager.
To do this,go to task manager,select the application,right click it,press go to process,right click it,and set the process priority to high.
it wont do much though.So u could make views in the game and draw the zombies only if they are in the view,reduce draw events and try to use alarms instead of step event.
  • 2

#3 filulilus

filulilus

    GMC Member

  • GMC Member
  • 928 posts
  • Version:GM:Studio

Posted 13 June 2012 - 07:23 AM

ZyklonMiraj, your avatar? :blink:


On topic:
Changing the process priority is a bad ide, worst case, the computer could miss mouse and keyboard inputs.

You could look into deactiveting the instances that are not inside the view (with a slight margin).

instance_deactivate_all(1)
instance_activate_region(view_xview[0] - 32, view_yview[0] - 32, view_wview[0] + 64, view_hview[0] + 64, 1)

Edited by filulilus, 13 June 2012 - 07:24 AM.

  • 0

#4 ZyklonMiraj

ZyklonMiraj

    GMC Member

  • GMC Member
  • 136 posts
  • Version:Unknown

Posted 13 June 2012 - 07:33 AM

ZyklonMiraj, your avatar?

Lol,changed it.Knew some one would tell me.

Any ways,yeah,you should do what filulilus said.

Edited by ZyklonMiraj, 13 June 2012 - 07:43 AM.

  • 0

#5 filulilus

filulilus

    GMC Member

  • GMC Member
  • 928 posts
  • Version:GM:Studio

Posted 13 June 2012 - 08:03 AM

Lol,changed it.Knew some one would tell me.

I don't like to see a helpy helper get banned :tongue:
  • 0

#6 joao

joao

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 June 2012 - 06:40 PM

ZyklonMiraj, your avatar? :blink:


On topic:
Changing the process priority is a bad ide, worst case, the computer could miss mouse and keyboard inputs.

You could look into deactiveting the instances that are not inside the view (with a slight margin).

instance_deactivate_all(1)
instance_activate_region(view_xview[0] - 32, view_yview[0] - 32, view_wview[0] + 64, view_hview[0] + 64, 1)



i want to do a online game. this will cause me problems???
  • 0

#7 joao

joao

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 June 2012 - 06:51 PM


Well, Hi, im not a good english speaker, but i will do my best and im new (:.
Im creating a zombie game with a little of AI, i want to put in a room a LOT of zombies, the problem is that they ge game lag, when i see in administrator tasks the game use 25% of procesor and like 100mb of ram. Is possible to let the game use more ram and procesor to reduce lag? cause i think that game maker got a top of ram and procesor cause if the game lags is becouse im using all of my procesor and ram, but thats no true cause i got like 50 % of unused procesor and like 2000 mb ram free too. thanks

Put the process priority to high in task manager.
To do this,go to task manager,select the application,right click it,press go to process,right click it,and set the process priority to high.
it wont do much though.So u could make views in the game and draw the zombies only if they are in the view,reduce draw events and try to use alarms instead of step event.


i do that before i make this topic, in high and highest, and it still using only 100 mb ram and 25% procesor, in my pc i play games like crysis 2, assasin creed, silent hill V homecomming, etc..
so its strange, if i deactivate the instances and is online i think the others player will get on errors, in zombie AI i got a 3000 x 3000 image for each zombie to colide with player and follow if is colliding, is like the vision, and i got many zombies so canbe that a problem??? but im still thinkin if the game doesnt use a lot of memory or procesor, why is laging?
  • 0

#8 Katuko

Katuko

    GMC Member

  • GMC Member
  • 4887 posts

Posted 13 June 2012 - 08:09 PM

Why do you need an image that is twice the size of most normal screen resolutions for what I can only assume is a regular zombie enemy? And why would you use this, of all things, for collision checking!? There are functions for these things, you know. Look up "point_distance" and "collision_circle" and stop using such insane tactics at once.

The reason it's slow is A: that most graphics cards only handles individual textures up to 2048x2048 and B: that each pixel of that sprite is looped through and used in the collision check if you have "precise collision" ticked off.

And your other code might be a lag-inducing wreck as well, but I'm getting the feel that is the culprit right there.
  • 0

#9 joao

joao

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 June 2012 - 08:27 PM

Why do you need an image that is twice the size of most normal screen resolutions for what I can only assume is a regular zombie enemy? And why would you use this, of all things, for collision checking!? There are functions for these things, you know. Look up "point_distance" and "collision_circle" and stop using such insane tactics at once.

The reason it's slow is A: that most graphics cards only handles individual textures up to 2048x2048 and B: that each pixel of that sprite is looped through and used in the collision check if you have "precise collision" ticked off.

And your other code might be a lag-inducing wreck as well, but I'm getting the feel that is the culprit right there.

thanks, i will try a best way to check if the zombie see the player, the others code are like : if the zombie see player (IF VISION COLLIDE),

x += lengthdir_x(velocity,point_direction(x,y,other.x,other.y)
y += lengthdir_y(velocity,point_direction(x,y,other.x,other.y)

simple, i dont got draw functions or anithing else
  • 0

#10 Katuko

Katuko

    GMC Member

  • GMC Member
  • 4887 posts

Posted 13 June 2012 - 08:53 PM

Just a small redundancy there, but why check the direction twice? Why not use a temporary variable?

var dir;
dir = point_direction(x,y,other.x,other.y);
x += lengthdir_x(velocity,dir);
y += lengthdir_y(velocity,dir);

Saves you a function call.

Edited by Katuko, 13 June 2012 - 08:54 PM.

  • 0

#11 joao

joao

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 15 June 2012 - 02:15 AM

Just a small redundancy there, but why check the direction twice? Why not use a temporary variable?

var dir;
dir = point_direction(x,y,other.x,other.y);
x += lengthdir_x(velocity,dir);
y += lengthdir_y(velocity,dir);

Saves you a function call.

wow. why i didnt see that, now im going to reduce the lag cause the tri functions laging a lot, im working on vison of zombies already lets see what i can do
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users