Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> UM engine lag fix, a code by hello
United States
Ziso
Posted: May 5 2007, 10:43 AM
Quote Post


Should I be concerned?
[*]

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

Status: (0d) [--]


Hello gave me a sweet code for UM's engine that fixes everything!!!

Put this in Mario's step event

CODE
instance_activate_all();
instance_deactivate_region(view_xview[0],view_yview[0],view_wview[0],view_hview[0],false,true);
instance_activate_object(camera)
instance_activate_object(music)


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Finland
Ultramario
Posted: May 5 2007, 12:10 PM
Quote Post


Dan Dan Dan!
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 11240
Member No.: 2164
Joined: 9-June 06

Status: (0d) [--]


Another way is to put object like this (unless you have enemy object with a size of 8x8 or smaller).

Attached Image
Attached Image


--------------------
PMEmail PosterUsers WebsiteAOL
Top
United States
Ziso
Posted: May 5 2007, 12:14 PM
Quote Post


Should I be concerned?
[*]

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

Status: (0d) [--]


QUOTE (Ultramario @ May 5 2007, 01:10 PM)
Another way is to put object like this (unless you have enemy object with a size of 8x8 or smaller).

I have no clue what that means


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
Unspecified
Mariotroid
Posted: May 5 2007, 01:10 PM
Quote Post


What is love?
[*][*][*]

Group Icon
Group: Members
Posts: 4756
Member No.: 2334
Joined: 14-July 06

Status: (0d) [--]


Thanks for the tip.

EDIT: Tried it out, it works pretty well. Mario just seems to run a little too fast using this code.

This post has been edited by Mariotroid on May 5 2007, 01:24 PM


--------------------
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Grant
Posted: May 5 2007, 01:30 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


QUOTE (Mariotroid @ May 5 2007, 02:10 PM)
Thanks for the tip.

EDIT: Tried it out, it works pretty well. Mario just seems to run a little too fast using this code.

He probably runs fast only because the lag is gone.

I see what Ultramario means. Putting ground like that means there will be less ground objects; space is saved.

So the activate/deactivate thing doesn't cause any bugs with enemy starting points or anything? I guess it probably wouldn't.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
United States
Matthew9
Posted: May 8 2007, 10:44 AM
Quote Post


Please, call me 707.


Group Icon
Group: Members
Posts: 46
Member No.: 3663
Joined: 20-April 07

Status: (0d) [--]


Cool. It works really well, but may add some glitches. cool2.gif


--------------------
user posted image
707 is the name, 3D is the game.
PMUsers Website
Top
Unspecified
Morshu McPhereson
Posted: May 8 2007, 05:36 PM
Quote Post


Who's got the sweetest disposition?
[*]

Group Icon
Group: Members
Posts: 20184
Member No.: 685
Joined: 23-November 04

Status: (0d) [--]


No, Zisomek. You need to activate more objects like piper and Mario's death object.

EDIT: See below post for a better way of handing the object activation/deactivation.

This post has been edited by Mason on May 8 2007, 07:20 PM
PMEmail Poster
Top
Spain
The Damizean
Posted: May 8 2007, 07:04 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 73
Member No.: 3744
Joined: 8-May 07

Status: (0d) [--]


Hello there, fellow MFGGers:

There's a better way to handle the object activation. On my engines, I use a parent object called objParentDeactivable, wich is set as the parents for all the other parent kinds (Solid, Items, etc). This way, I only need to deactivate all objParentDeactivable, and then activate the region again.

Solves the problem of deactivating objects that the controller shouldn't and is a heck lot less of checks for the GM engine.

Here's the code:
CODE
instance_deactivate_object(objParentDeactivable);
instance_activate_region(view_xview-64, view_yview-64, view_wview+128, view_hview+128, true);


Hope this helps. Just try it out and decide wich works better.

-See ya!

Edit: Little typo on height activation area.

This post has been edited by The Damizean on May 8 2007, 07:33 PM


--------------------
Signature prototype
PMEmail Poster
Top
United States
Grant
Posted: May 8 2007, 07:06 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


QUOTE (The Damizean @ May 8 2007, 08:04 PM)
Hello there, fellow MFGGers:

There's a better way to handle the object activation. On my engines, I use a parent object called objParentDeactivable, wich is set as the parents for all the other parent kinds (Solid, Items, etc). This way, I only need to deactivate all objParentDeactivable, and then activate the region again.

Solves the problem of deactivating objects that the controller shouldn't and is a heck lot less of checks for the GM engine.

Here's the code:
CODE
instance_deactivate_object(objParentDeactivable);
instance_activate_region(view_xview-64, view_yview-64, view_wview+128, view_hview+64, true);


Hope this helps. Just try it out and decide wich works better.

-See ya!

That sounds like a really good idea. Seriously.

Welcome to MFGG! And great first post.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
Unspecified
Morshu McPhereson
Posted: May 8 2007, 07:20 PM
Quote Post


Who's got the sweetest disposition?
[*]

Group Icon
Group: Members
Posts: 20184
Member No.: 685
Joined: 23-November 04

Status: (0d) [--]


QUOTE (The Damizean @ May 8 2007, 07:04 PM)
Hello there, fellow MFGGers:

There's a better way to handle the object activation. On my engines, I use a parent object called objParentDeactivable, wich is set as the parents for all the other parent kinds (Solid, Items, etc). This way, I only need to deactivate all objParentDeactivable, and then activate the region again.

Solves the problem of deactivating objects that the controller shouldn't and is a heck lot less of checks for the GM engine.

Here's the code:
CODE
instance_deactivate_object(objParentDeactivable);
instance_activate_region(view_xview-64, view_yview-64, view_wview+128, view_hview+64, true);


Hope this helps. Just try it out and decide wich works better.

-See ya!

Haha, I'm an idiot for not thinking of that. Great idea. biggrin.gif
PMEmail Poster
Top
Portugal
Zenor
Posted: May 8 2007, 07:23 PM
Quote Post


           member                      title
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 483
Member No.: 3614
Joined: 14-April 07

Status: (0d) [--]


QUOTE (The Damizean @ May 8 2007, 07:04 PM)
Hello there, fellow MFGGers...

sorry by the off topic, but are you the same Damizean who did a bunch of 360° engines?


--------------------
user posted image
PMEmail PosterMSN
Top
Spain
The Damizean
Posted: May 8 2007, 07:24 PM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 73
Member No.: 3744
Joined: 8-May 07

Status: (0d) [--]


QUOTE (Victor TH @ May 8 2007, 07:23 PM)
sorry by the off topic, but are you the same Damizean who did a bunch of 360° engines?

Yep


--------------------
Signature prototype
PMEmail Poster
Top
Unspecified
cazallx
Posted: May 8 2007, 10:54 PM
Quote Post


New User


Group Icon
Group: Members
Posts: 7
Member No.: 2110
Joined: 19-May 06

Status: (0d) [--]


wall since you made the 360 sonic engine have you made an progress one it. on gmc you said you would update it soon but did not.
PMEmail Poster
Top
United States
Grant
Posted: May 8 2007, 10:59 PM
Quote Post


John Freeman said
[*][*][*][*][*]
[*][*][*]

Group Icon
Group: Members
Posts: 8260
Member No.: 2900
Joined: 31-October 06

Status: (0d) [--]


QUOTE (cazallx @ May 8 2007, 11:54 PM)
wall since you made the 360 sonic engine have you made an progress one it. on gmc you said you would update it soon but did not.

I don't mean to appear like a backseat moderator, but please stay on topic. You can private message (PM) him instead of replying here.


--------------------
user posted image

QUOTE (oh youtube trolls)
u guys r retarded hippocrates

QUOTE (Piemanthe3rd)
Pie is not random. I wish people would realize this.
PMEmail PosterUsers WebsiteAOLMSN
Top
Canada
MegaTailzChao
Posted: May 8 2007, 11:14 PM
Quote Post


So long, and thanks for all the fish.
[S][*][*][*][*]
[*][*]

Group Icon
Group: Site Staff
Posts: 15788
Member No.: 2267
Joined: 2-July 06

Status: (0d) [--]


Damizean, that is GENIOUS.

I'll be sure to use that code if I ever end up with laggy game.

I mean...God damn, that is great.


--------------------
user posted image
user posted imageuser posted image
PMEmail PosterMSN
Top
Spain
The Damizean
Posted: May 9 2007, 07:58 AM
Quote Post


Standard Member


Group Icon
Group: Members
Posts: 73
Member No.: 3744
Joined: 8-May 07

Status: (0d) [--]


You should use this even if you don't have any lag; as it'll make the engine handle less objects and with the processing power left you can use for other stuff, so... better safe than sorry. Anyway, it's not really that genious, just looking a little to the help anyone can realice this method is easier :e


--------------------
Signature prototype
PMEmail Poster
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.0998 ]   [ 14 queries used ]   [ GZIP Enabled ]   [ Server Load: 1.68 ]