Thread: Project Carrot
View Single Post
Soulweaver

JCF Member

Joined: Aug 2007

Posts: 42

Soulweaver is an asset to this forum

May 10, 2013, 09:56 AM
Soulweaver is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
Zero speed layers are used from time to time for HUDish effects... look at e.g. Tomb Rabbit or Another Story, though those naturally assume a 640x480 resolution.
Hmm, I see, I'll need to look into those levels then. Can't do it right now as I traveled elsewhere for Mothers' Day and JJ2 doesn't apparently want to cooperate with Windows 8 on my lappy, but will do so on Monday.

E: I looked at the first level and I can see how it works, but now I need to understand why it works that way

Quote:
Originally Posted by Violet CLM View Post
Here's what deactivating does, using some very verbose names:
Code:
object.pointerToBehaviorFunction = NULL;
//The object is no longer is counted as active,
and its location in memory may be overwritten at any later time.
if (object.wasCreatedDirectlyFromTheLayer4EventMap()) {
    eventMap[object.xTileOfCreation, object.yTileOfCreation] = object.eventID;
    //e.g. 158 for a peach, whatever. For the most part this is
    //redundant, but it does mean that when an object created
    //directly from the event map changes event ID, e.g. a spring
    //crate changing into a green spring, that change will be
    //permanent even if the object is later deactivated.
    setEventMapBit(object.xTileOfCreation, object.yTileOfCreation, 11, false);
    //The event map, of course, is a series of thirty-two bit slots
    //for each tile in layer 4. The first eight bits are used for the
    //event ID. The next three are used for the difficulty and the
    //"Illuminate Surroundings" checkbox. The bit after that is
    //whether the the object created by the event at that tile
    //has already been created or not: setting it to false tells JJ2
    //that the next time that tile comes into active memory, the
    //object should be created, since it hasn't been created already.
}
That makes sense. I don't actually even store the event IDs currently anywhere after the objects have been spawned but doing something like this would make simulating the effect easier. (Also storing the event IDs and all would kinda make emulating MCEs easier; I'm kinda on the fence with them in that they allow for some special stuff not otherwise possible, but at the same time are essentially a large scale bug and not really a feature.)

E: (De)activation routines have been implemented.

Quote:
Originally Posted by Slaz View Post
I watched your YouTube video and like what you did so far. I'm not into coding, nor do I know how JJ2's physics work. But I can only encourage progress on projects such as this. A remake of JJ2 such as OpenJazz is for JJ1 would make dreams come true and stuff like that.

Perhaps consider talking to DJazz on these forums? And read through some of his findings he wrote on his WebJJ2 thread. I'm sure he has some interesting solutions on JJ2's physics that're reade to use!
Thanks Yeah, I checked some threads involving him, I suppose he could have useful information and insight on some aspects
__________________

Last edited by Soulweaver; May 14, 2013 at 07:12 AM.