Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Who needs lagging fixed?, (is this in the right section?)
United States
Ziso
Posted: Apr 7 2007, 01:52 PM
Quote Post


Should I be concerned?
[*]

Group Icon
Group: Members
Posts: 992
Member No.: 3387
Joined: 2-March 07

Status: (0d) [--]


Ok, I have heard of a bunch of people having lag problems in they're games. So I will post up this helpful code for that matter.

For Gamemaker btw.

This code was made by Flipiberke, not me, so don't accuse me of copying his idea. This is in big font so that I can be sure you don't miss it.

This code goes in the step event of the enemies you want it for.

if (x > view_xview[0]-sprite_width) && (x < view_xview[0]+view_wview[0]+sprite_width)
{
if (activate == false) then hspeed := -1;
activate := true;
}
else
{
activate := false;
hspeed := false;
}

This code goes in the creation event of the enemies you want it for.

activate := false

This stops lag and also makes it so that enemies don't move unless in view. We don't want a bunch of enemies falling off cliffs before we get to them now do we?

This post has been edited by serebii911 on Apr 7 2007, 02:02 PM


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Uruguay
EDGE
Posted: Apr 7 2007, 02:00 PM
Quote Post


I'll be back...
[*][*]

Group Icon
Group: Members
Posts: 2775
Member No.: 2518
Joined: 18-August 06

Status: (0d) [--]


Thats a nice code but there are some that are better.


--------------------
"You've been playing Super Mario Sunshine. haven't you?"
~The Yoshi Army~Team 1-Up~MFGG Submissions~Ref~
PMEmail PosterMSN
Top
Unspecified
zzo38
Posted: Apr 7 2007, 08:12 PM
Quote Post


Registered user


Group Icon
Group: Members
Posts: 1621
Member No.: 2549
Joined: 21-August 06

Status: (0d) [--]


Don't use a lot of transparent sprites. Transparent makes the game slow.


--------------------
Access my web-site
Vonkeror: the new web-browser
Wikipedia user-page
My gopher site Forget Web 2.0. Now is the time for Gopher 2.0.
Furryscript!!

Member of Anti-Master-Balls

Message to the moderator: I don't want you to add the badges under my name anymore.
PMUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0410 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.53 ]