The Daily Click ::. Forums ::. Klik Coding Help ::. Making an object that holds large Images...without chunks of memory eaten
 

Post Reply  Post Oekaki 
 

Posted By Message

Bartman



Registered
  03/01/2002
Points
  50

VIP Member
23rd August, 2006 at 14:19:27 -

I'm not going to talk about what I'm working on, however what I'd like to do is this:

Basically have three objects that have their own purposes

One would be a level
One would be colored areas that are impassable
One would alter the character's speed or something else.

I tried doing this with active objects, but the problem with 2000x2000 active objects is that they eat up like 100k of memory, and thats just...not good.

Is there some other thing I can use that wouldnt eat up resources? I'm not even sure if such a thing exists...

 
- Bartman

Deleted User
23rd August, 2006 at 14:42:14 -

No idea as im more of a TGF user, but maybe the Active Picture Object will work?

 

Bartman



Registered
  03/01/2002
Points
  50

VIP Member
23rd August, 2006 at 14:42:49 -

Actually, er...maybe it'd be a better idea to just make objects global instead of going through these other goofy shenanigans.

I still want to know if theres ways past this, but, lets just see...

 
- Bartman

deadeye



Registered
  22/07/2006
Points
  73
23rd August, 2006 at 15:40:56 -

I ran into this problem recently with my game. When I first made graphics, I made the whole level as one backdrop graphic. Then I put in the obstacles as active objects. It ran way too slow.

So I made the large backdrop into tiles, but I still had all the obstacles as actives. It still ran way too slow.

The only way I could get it to run at a normal rate was to make all of my non-moving, solid obstacles into backdrop obstacles. Walls, floors, etc. All of my moving platforms and jump-through platforms are still active objects. Now the speed is fine, and it runs like a dream.

MMF just can't handle a large amount of actives at once, even if you have a good computer. I'm sure the same is true if you have a single gigantic active object. What I learned from this: If it doesn't move, and it doesn't have any function other than to be "solid," make it into a backdrop tile.

If you want to alter the characters's speed (like on a conveyor or whatever), make a small, invisible active object and just lay it over the backdrop.

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
23rd August, 2006 at 15:54:44 -

Necropolis Rising's main overworld is one large frame that has the screens divided up into 320 x 200 backdrop "screens". Then what I did is have one large active object that goes over the whole world for the natural wall screen separators, houses, castle walls, and etc. Since there is still so much "empty" space where the guy and enemies can move around in, it runs just fine on my 500Mhz job. Most of the extra things put in the game like trees and etc are also active objects. It might sound like a memory hog, but honestly I haven't run into too many problems yet. And I'd guess I probably have about 200 actives tops for the whole shabang.

One good thing I've done is to have the enemies spawn when the necro gets close to an invisible active picture object instead of having them on the frame from the start. Maybe you could do something similar to save actives and memory from the get-go.


 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

deadeye



Registered
  22/07/2006
Points
  73
23rd August, 2006 at 16:53:55 -

Right now I have 180 actives in my level and it runs great. 28 of those are enemies.

Before changing my walls and floors over to backdrop objects, I had over 600 active objects. That's just way too many.

And the size of my level is 5376x416, which means the background image I had for my level originally was just as big. I really don't know what the hell I was thinking.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click