The Daily Click ::. Forums ::. Klik Coding Help ::. Faking fast loops = lag?
 

Post Reply  Post Oekaki 
 

Posted By Message

»xerus



Registered
  28/06/2002
Points
  675

You've Been Circy'd!Game of the Week Winner
8th July, 2006 at 00:04:16 -

I was hoping one of you guys could help me out on this.

I'm working on a game and I wanted the enemies to have the ability to walk on backdrops, turn around when they hit a wall, and also turn around when they reach an edge of a platform, all that good stuff.

I found this tutorial: http://www.create-games.com/download.asp?id=5985

I followed that example and gave my enemy's a behavior that was pretty similar for moving. At first I tried doing fast loops but it seems it wouldn't work when I had more than 1 enemy on the screen. So instead of fast loops, I did the method in that tutorial and just duplicated events.

With 1 enemy in the frame I thought it was working pretty well, and it was doing everything I wanted it to. But I soon realized that putting a lot of enemies on the screen resulted in a severe framerate drop. When the object count reaches about 60, the game begins to slow down and then just goes to a crawl around 70 objects.

I'm pretty sure its because of the enemy behaviors that have the duplicated events.

My question for you is.... is there any way to make an intelligent platform enemy without using detectors, and not slow the game down to a crawl?

Thanks for readin'.

*edit: I'm using the retail version of MMF2.

Image Edited by the Author.

 
n/a

Werbad



Registered
  18/09/2002
Points
  235
8th July, 2006 at 07:27:38 -

I could do one but i need some webspace to host it on...

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
8th July, 2006 at 07:30:40 -

Uhh... www.rapidshare.de ?

 
Old member (~2004-2007).

Werbad



Registered
  18/09/2002
Points
  235
8th July, 2006 at 11:29:56 -

Converted an old MMF movement to MMF2, I don't if it's any faster than your current though...
http://rapidshare.de/files/25290014/ai.mfa.html
I don't use behaivors in this engine since i never really liked them...

 
n/a

»xerus



Registered
  28/06/2002
Points
  675

You've Been Circy'd!Game of the Week Winner
8th July, 2006 at 19:07:21 -

I dont know about the speed... but that one doesnt detect if the enemy is on the ground or not, and it doesnt work well if the speed is over 1.

 
n/a

»xerus



Registered
  28/06/2002
Points
  675

You've Been Circy'd!Game of the Week Winner
8th July, 2006 at 21:09:02 -

I guess that the performance hit wasnt actually from the enemies with fake fast loops, but the vast amount of backdrop objects I had in the frame. Replacing them with large quick backdrops solved the problem.

I didnt think backdrop objects put that much strain on runtime but I guess I was wrong. o_o

 
n/a
   

Post Reply



 



Advertisement

Worth A Click