The Daily Click ::. Forums ::. Klik Coding Help ::. Backdrops and maximum objects in a frame
 

Post Reply  Post Oekaki 
 

Posted By Message

]Alpha[



Registered
  19/09/2003
Points
  245
1st October, 2008 at 18:32:16 -

Hi guys.
Last time I asked you something on this forum, you helped me a lot, so I will bother you again, hoping to be helped this time too.

I have 2 problems :

1) I want to create a single level but with different backgrounds.
For example :
If a Global Value is setted to 1, then entering the level you have to see a sunny background.
But if you enter the same level and the Global value is setted to 2, then you have to see a rainy background.
Any ideas?

2) How many object can I put in a level before it will collapse?
Speaking of the previous example...
If the Global value is 1, I want black enemies in the level.
If the Global value is 2, I want white enemies in.
So, assuming that there are a lot of possible values, that would mean also a large amount of monsters in the level.
I will of course destroy each enemy I don't need in the level when it will be loaded, but still I'm not sure that's a good way to do it.
So how can I do it?

Thank you in advance!
Alpha

 
All that I see is the years...

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
1st October, 2008 at 19:03:25 -

Ummm the enemies can be one object, with different animations for each color, so u don't have to destroy them. But both ways are okay.

The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.

I don't for sure how many objects to crash, but when i set bout 2000 objects it lagged as hell.
Ill say round 500 is okay.

 
Code me a sausage!

]Alpha[



Registered
  19/09/2003
Points
  245
2nd October, 2008 at 08:46:41 -


Originally Posted by Don Luciano
Ummm the enemies can be one object, with different animations for each color, so u don't have to destroy them. But both ways are okay.

The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.

I don't for sure how many objects to crash, but when i set bout 2000 objects it lagged as hell.
Ill say round 500 is okay.



Thank you for the quick answer!

Well, I didn't think that way for the backgrounds but I suppose it would work great!
So thanks... I will try it!

Regarding the enemies, I tought about that trick too, but it couldn't work.
That's the problem :
First of all, each enemy has arleady at least 4 animations (stand, walking, attack and dying).
The second problem is that I have a lot of different enemies.
The game is a GDR and what I'm talking about is the fighting screen.
So when you enter the frame, the enemies you found will be different according to a global value stored in a file .INI

I was thinking that maybe I can solve the problem in this way :
Instead of having all the monsters in the fighting frame and just destroy the ones that I don't need at the start of the frame, I can just create an unplayable frame and put 1 copy of each monster I have in the game in it.
Then when the fighting frame starts, I just "create an object" from the unplayable frame.
Do you think it could work?
Or there are better solutions?

Thank you in advance!


 
All that I see is the years...

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
2nd October, 2008 at 10:30:34 -

Making two copies of each enemy (one black and one white) putting all black ones in a qualifier and then all white ones in a different qualifier then destroying one set at the start of the frame strikes me as the best way. Since it's only at the start they'll exist you won't get any lag from it.

 
Image
http://bfollington.tumblr.com

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
2nd October, 2008 at 11:42:24 -

Yeah that's a good way, the other way can still be to have more animations.

4 animations per global. So every global should be 0,4,8,12:.. not 12345678

If pressed left (animation walking, let's say walking is animation 2)
Set animation value to (global)+ 2.

So the animations (1, 2*, 3, 4), (5,6*,7,8 ) etc...

I don't know if u get what i mean... but its fairly easy since there is no need for additionall events or objects.


Image Edited by the Author.

Well it's up to you to choose how u want to do it, since both ways are okay. But if u are using a lot of global values, over 10-20, this way could be better while loading.
There is also another way, u can create enemies. So u put each enemy: set not created at start, u set little objects(shrooms) where enemies should be. then based on the global value.
Pick one of shrooms, create enemy relative to shroom, destroy that shroom.
This event will go on until there are no shrooms left, u can even set alt values to shrooms or use different objects, to set different enemies.

THEN
Count no of shroom = 0
loading complete!


Image Edited by the Author.

Image Edited by the Author.

 
Code me a sausage!

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
2nd October, 2008 at 13:15:09 -


Originally Posted by Don Luciano
The Background is easy just make an active object with all the backgrounds, choose which. paste it as background and destry the active object.
That's it.



That's pretty cool I never thought of that, thanks!

 
--

"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!

]Alpha[



Registered
  19/09/2003
Points
  245
2nd October, 2008 at 14:28:43 -


Originally Posted by Don Luciano
There is also another way, u can create enemies. So u put each enemy: set not created at start, u set little objects(shrooms) where enemies should be. then based on the global value.
Pick one of shrooms, create enemy relative to shroom, destroy that shroom.
This event will go on until there are no shrooms left, u can even set alt values to shrooms or use different objects, to set different enemies.

THEN
Count no of shroom = 0
loading complete!



Interesting!
That could be a good way to solve my problem.
How can I set "not created at start" ?
I don't see this command anywhere.
P.S. I don't have MMF2

 
All that I see is the years...

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
2nd October, 2008 at 17:04:10 -

If you use the picture object to load a picture as your background you can even change the background at runtime.

 
.

]Alpha[



Registered
  19/09/2003
Points
  245
2nd October, 2008 at 17:06:57 -


Originally Posted by AndyUK
If you use the picture object to load a picture as your background you can even change the background at runtime.



Good to know!
Actually I don't need to do something like that, but never say never

P.S. Would the picture object create any lag?
Paste an active object into background and destroy it, is something that cause no lag, but have a 640x480 picture object on screen does?


 
All that I see is the years...

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
2nd October, 2008 at 17:27:13 -

well doing anything creates lag,
but i used one in lil' pirate along with 8 active picture objects that scrolled without any noticeable slowdown. It's not anything to worry about.

 
.

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
2nd October, 2008 at 17:41:32 -

Interesting!
That could be a good way to solve my problem.
How can I set "not created at start" ?
I don't see this command anywhere.
P.S. I don't have MMF2

I don't know, i only worked in mmf2, where it is in object properites.
U can destroy all on start using an event. Then start the placement.

 
Code me a sausage!

]Alpha[



Registered
  19/09/2003
Points
  245
2nd October, 2008 at 18:12:39 -

@Don Luciano :
Thank you very much.
Probably there's no such thing on MMF1.5
What a pity!
Maybe I should move on to MMF2 but I tried it and I found it much less friendly (for example I hate how MMF2 shows the propriety window of an object).
Plus the picture editor is really bad. Isn't it?


Originally Posted by AndyUK
well doing anything creates lag,
but i used one in lil' pirate along with 8 active picture objects that scrolled without any noticeable slowdown. It's not anything to worry about.



Well, I will download lil' pirate just to see how it looks
Thank you!


 
All that I see is the years...

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
2nd October, 2008 at 22:33:47 -


Originally Posted by AndyUK
If you use the picture object to load a picture as your background you can even change the background at runtime.



Yeah, but you'd need external files right? I want to try to avoid doing that if possible.

 
--

"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!

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
2nd October, 2008 at 22:36:31 -

yeah you need to load files externally i think.

 
.
   

Post Reply



 



Advertisement

Worth A Click