Damizean Posted July 2, 2008 Report Share Posted July 2, 2008 Frenzy, the only way you can do a decent object management system is using grid spatial indexing and keep creating/destroying objects, so only the visible objects are active on runtime. Link to comment Share on other sites More sharing options...
Blue Frenzy Posted July 2, 2008 Report Share Posted July 2, 2008 I know, but that sux with moving objects like swings or moving platforms. Link to comment Share on other sites More sharing options...
Damizean Posted July 2, 2008 Report Share Posted July 2, 2008 Well, you CAN make exceptions Link to comment Share on other sites More sharing options...
Blue Frenzy Posted July 3, 2008 Report Share Posted July 3, 2008 Well, you CAN make exceptions I challenge you to implement that on the rainy level in sfa to reduce the slowdown, if works, i'll give you sex XD. Link to comment Share on other sites More sharing options...
Rael0505 Posted July 3, 2008 Report Share Posted July 3, 2008 That level never gave me any slowdowns Link to comment Share on other sites More sharing options...
Damizean Posted July 3, 2008 Report Share Posted July 3, 2008 I challenge you to implement that on the rainy level in sfa to reduce the slowdown, if works, i'll give you sex XD. I already implemented a simple version of spatial indexing, the job of getting the objects created as the frame scrolls its yours xD Link to comment Share on other sites More sharing options...
LarkSS Posted July 3, 2008 Report Share Posted July 3, 2008 Another method ( though I think dami's would be more functional ) is to replace objects that have constant collision checks or fastloops applied to them with less complex objects which store their position and data on them while they're offscreen. Upon reentering the screen, those objects can be replaced with the actual object itself. This way those complex objects are only at work on screen. This won't make an extreme difference if you have hundreds of those things though. =P Link to comment Share on other sites More sharing options...
DragonXVI Posted July 3, 2008 Report Share Posted July 3, 2008 There are a variety of sneaky things you could do for limiting objects before you try spacial partitioning or streaming. Continuing on from LarkSS's idea, If you're using common patterns (ie. for Rings in a circle of 8 rings) you could easily just use one object instead of 8, and when you approach the object, use code to generate 8 rings in a circle then destroy the object (A "Ring-Ring-Spawner" if you will. Not exactly efficient or pleasant, but a basic enough idea (Although doesn't solve the problem of mass-producing objects at run-time if you overuse it) Blaze is a Half-Life fan, halfway through the level there should be a long corridor and a nice big "LOADING" segment Link to comment Share on other sites More sharing options...
Blue Frenzy Posted July 3, 2008 Report Share Posted July 3, 2008 Another method ( though I think dami's would be more functional ) is to replace objects that have constant collision checks or fastloops applied to them with less complex objects which store their position and data on them while they're offscreen. Upon reentering the screen, those objects can be replaced with the actual object itself. This way those complex objects are only at work on screen. This won't make an extreme difference if you have hundreds of those things though. =P actually i dont think there are simplier objects. But what dami do is exactly what you do, but replacing the "simplier object" idea by an array with the position values. I already implemented a simple version of spatial indexing, the job of getting the objects created as the frame scrolls its yours xD I meant, do it XD Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 18, 2008 Author Report Share Posted July 18, 2008 Been a couple weeks since I last bumped this because with my computer problems still persisting work has been slow. Hopefully the new part I will be ordering shortly will either fix the problem or clarify what is wrong with the PC, so my problems may be coming to a close. Either way, the PC seems to work fine at night when it's cool, and I just thought I'd let you all know that I started a text file called "SAGE Todolist.txt". Make of that what you will. Link to comment Share on other sites More sharing options...
Slingerland Posted July 18, 2008 Report Share Posted July 18, 2008 Does it involve... ...killing Tails? Haha, just kiddin'. Good to hear that your problems are starting to subside. Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 18, 2008 Author Report Share Posted July 18, 2008 I'm hesitant building an actual game level, like one that's actually going to be in the final game, just yet. I need to force myself to knuckle down and finish Sonic's status menus before I can think about that, and then there's the beta... It may not be something that appears in the final game, but it'll be something. Link to comment Share on other sites More sharing options...
Rael0505 Posted July 19, 2008 Report Share Posted July 19, 2008 This makes me so giddy. Make sure there are gimmicks! Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 19, 2008 Author Report Share Posted July 19, 2008 Don't get your hopes up too high. I don't want to disappoint on accident. Link to comment Share on other sites More sharing options...
DragonXVI Posted July 19, 2008 Report Share Posted July 19, 2008 Can't really be any worse than This now can it? Link to comment Share on other sites More sharing options...
Streak Thunderstorm Posted July 19, 2008 Report Share Posted July 19, 2008 That was terrible. Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 19, 2008 Author Report Share Posted July 19, 2008 Can't really be any worse than This now can it? You'd be surprised. Link to comment Share on other sites More sharing options...
Rael0505 Posted July 19, 2008 Report Share Posted July 19, 2008 That was the most hilarious thing I've ever seen. Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 21, 2008 Author Report Share Posted July 21, 2008 I'm hesitant to show anything at this early phase, but... Link to comment Share on other sites More sharing options...
Blue Frenzy Posted July 21, 2008 Report Share Posted July 21, 2008 Can't really be any worse than This now can it? Im laughing like if i were drunken XD I'm hesitant to show anything at this early phase, but...[qimg]http://i203.photobucket.com/albums/aa30/BlazeHedgehog/sagedemo.jpg[/qimg] That's keeping a secret xD. Actually there is no much to see =/ i like to see backgrounds more than level tests. Waiting for more. Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 21, 2008 Author Report Share Posted July 21, 2008 Well, this is an actual level, and I am hoping to make it much bigger than the Christmas demo. It's just there's not much to show just yet. XD Link to comment Share on other sites More sharing options...
Rael0505 Posted July 22, 2008 Report Share Posted July 22, 2008 I'll be happy as long as this one has gimmicks in it. Link to comment Share on other sites More sharing options...
BlazeHedgehog Posted July 22, 2008 Author Report Share Posted July 22, 2008 Well, I'm not going to write anything new for this level (since it's a one-off), probably. I have a few things that TFH already had in it, but those are more... general level objects than they are actual level-unique gimmicks, but it's the first time you guys have seen them, probably. We'll see. Maybe I'll come up with something. Link to comment Share on other sites More sharing options...
Numbuh 214 Posted July 23, 2008 Report Share Posted July 23, 2008 Well, I've thought of an easy-ish way to palette-swap should you still need it. First, copy a rectangle from one sprite of the Sonic object so that all the colors you want to change at once (in this case, all the colors in Sonic's shoes) are encompassed. Then, create an active object. Clear the first frame and resize to 1 by x pixels long, x being how many colors you want to change at once. Next, paste the copied selection into another frame; extract each color and place it one pixel per color into the first. Order is up to you, but keep it consistent in the next step. (I recommend lightest on top to darkest on bottom, personally). Now delete the second frame and copy this into another animation (Walking, Running, Jumping...). At this point, take some new colors from wherever and make a new palette from that. Repeat as necessary. Now for the implementation. Rename the object and make it follow the frame if you want (I recommend this, but I'll assume you won't for the sake of example and refer to it as "Active"). Whether you choose to or not, right-click it and create another active object out of it (this is different from cloning; this object should be renamed, also; but I'll assume you use the name "Active 2"). This second object will be the palette Sonic is currently using. Go to the event editor and make an event with a sole "On loop" condition. (What you name it is up to you, but we'll use "loop" for the example.) Then make this event have the Sonic object "Animation > Replace Color". Once you're there, hit "Calculation" (like it was SO hard to figure out). When you get there, c/p the following: RGBAt("Active 2", 0, LoopIndex("loop"))[/CODE]and press Enter. Then, click "Calculation" again (WOW, that was unexpected!) and c/p this:[CODE]RGBAt("Active", 0, LoopIndex("loop"))[/CODE]You may think this looks nearly identical, and you're right. However, this tells MMF2, "Look for the colors on the palette object that changes with Sonic on the Sonic sprites and replace them with the colors on the other palette." BUT, there is [b]one crucial, important, vital step[/b] before you can swap. You must copy the action you just made (the replace color one) to the palette object that changes with Sonic so it can actually change with Sonic.That's it; now all you need to do is call it. When you want to change the color, tell the application to run "loop" this many times:[CODE]Y Bottom("Active")-Y Top("Active")[/CODE]This returns the height of the object (in case you want to make it modify more colors).Hope you could understand that. If not, PM me the source; I can implement it if you're having trouble. REMEMBER, the palette objects and loop are nameable, so replace my default names if you're not using them.EDIT: Whoops, forgot to tell you to change the animation of the first palette object and start the loop if you want to actually change the palette. But you probly woulda figured it out. Link to comment Share on other sites More sharing options...
Blue Frenzy Posted July 23, 2008 Report Share Posted July 23, 2008 Where does it say that he needs pallete help? Did I miss something? If it's on mmf2, contact me, I got the solution to that. Link to comment Share on other sites More sharing options...
Recommended Posts