Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

Sonic: The Fated Hour - July 2009 Update


Recommended Posts

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

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

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

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

  • 2 weeks later...

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

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

Can't really be any worse than This now can it? :P

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

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

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

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...