Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » JCS & Scripting

Warps are objects

Neobeo

JCF Member

Joined: Sep 2002

Posts: 409

Neobeo is an asset to this forumNeobeo is an asset to this forum

Dec 6, 2011, 09:40 AM
Neobeo is offline
Reply With Quote
Warps are objects

I really don't want to open a new thread for this, but I can't exactly find anything relevant on the forum. Basically, warps act as objects if and only if ShowAnim is set to 1 (otherwise it acts as an area). That is all.
__________________
<TABLE border=1><TR><TD>Facts:
Jazz Sprite Dynamite (JSD)
Tileset Extractor
Neobeo's Firetruck

</TD><TD>Myths:
Jazz Creation Station Plus (JCS+) - 10%
Coming soon - a dedicated server! - 25%
Jazz Sprite Dynamite v2 (JSDv2) - 2%
Another generic single-player level - 0%
</TD></TR></TABLE>
Jgke Jgke's Avatar

JCF Member

Joined: Sep 2006

Posts: 974

Jgke is an asset to this forumJgke is an asset to this forum

Dec 6, 2011, 09:45 AM
Jgke is offline
Reply With Quote
Woo, dropbox!
DoubleGJ DoubleGJ's Avatar

JCF Member

Joined: Sep 2002

Posts: 3,049

DoubleGJ has disabled reputation

Dec 8, 2011, 05:49 AM
DoubleGJ is offline
Reply With Quote
Wow, so simple yet so amazing.
__________________
"So unless I overwrote my heart with yours, I think not. But I might have." - Violet CLM

Two Games Joined releases:
Control / Splinter (twin singles)
|| Ballistic Bunny (EP)
||
Beyond (maxi-single)
|| Beyond: Remixed (remix EP)
|| Inner Monsters OST (mini-album)
||
Shadows (album)
minmay

JCF Member

Joined: Aug 2002

Posts: 1,186

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Dec 8, 2011, 06:50 AM
minmay is offline
Reply With Quote
(belts work on warp objects too, by the way)
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 867

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Dec 8, 2011, 07:52 AM
Seren is offline
Reply With Quote
Quote:
Originally Posted by minmay View Post
(belts work on warp objects too, by the way)
That's the first thing I checked too. Other properties of warp objects I just found and considered interesting are:
-Unlike typical warps they aren't ignored when nowall is on.
-In SP they actually spawn exactly at (30, -67) from the top-left corner of the warp event, then travel down until they reach a masked pixel, in case of which they stop. Their warping area is a rectangle, starting at approximately (-64, 24) and ending at approximately (0, 80), both relatively to the point the object stopped at.
-A loop made of a warp object and a corresponding warp target on the same tile is inescapable. jjk causes a life loss but the death animation doesn't get a chance to be played and therefore you don't die. And as mentioned before, jjnowall won't work. Although obviously, the game over screen will show up if you lose all your lives.
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
Neobeo

JCF Member

Joined: Sep 2002

Posts: 409

Neobeo is an asset to this forumNeobeo is an asset to this forum

Dec 8, 2011, 08:33 AM
Neobeo is offline
Reply With Quote
Quote:
Originally Posted by Sir Ementaler View Post
-In SP they actually spawn exactly at (30, -67) from the top-left corner of the warp event, then travel down until they reach a masked pixel, in case of which they stop. Their warping area is a rectangle, starting at approximately (-64, 24) and ending at approximately (0, 80), both relatively to the point the object stopped at.
Wow, did you do this by hand? Colour me impressed. The numbers are extremely accurate!

Anyway here's what really happens under the hood:
It starts at approximately (15 + x0, -16 - y0), and then the warp area is a circle with center at (-16 - x0, y0) relative to that masked pixel, with radius 32 (but not including boundary). This circle shape probably makes it useful if you want tests with weird shapes.

I'm still trying to investigate where (x0, y0) comes from yet, so far knowing nothing other than it tries to load a warp animation but goes wrong -- but I've seen at least 2 possible values: (0, 39), and the one you used which is (15, 51).

Edit: I should probably mention that I usually see (15, 51) when using JCS save+run, and (0, 39) if loading from the menu. I'm not sure if this is always the case though.
__________________
<TABLE border=1><TR><TD>Facts:
Jazz Sprite Dynamite (JSD)
Tileset Extractor
Neobeo's Firetruck

</TD><TD>Myths:
Jazz Creation Station Plus (JCS+) - 10%
Coming soon - a dedicated server! - 25%
Jazz Sprite Dynamite v2 (JSDv2) - 2%
Another generic single-player level - 0%
</TD></TR></TABLE>
Neobeo

JCF Member

Joined: Sep 2002

Posts: 409

Neobeo is an asset to this forumNeobeo is an asset to this forum

Dec 8, 2011, 03:23 PM
Neobeo is offline
Reply With Quote
Ok, so there are at least 3 possible values of (x0, y0), and it's fairly reproducible:
  • (0, 0): This happens if you go through the opening cinematics but never access the episodes list (e.g: anything in Party Mode). A consequence of this is that if you play play my test level (warp.j2l) from Party Mode, the warp is actually a bit higher than normal and it doesn't look as cool!
  • (0, 39): This happens if you open the episodes list at least once, even if you then press back.
  • (15, 51): This happens if you bypass the opening cinematics completely (e.g: JCS save+run, command line options)

Also, I made a small hack if you want to visualise where the warps are. It basically draws a pixel-perfect circle that represents the warp area, as long as ambient sound with sample 44 is placed somewhere on the level:
Code:
Patch JAZZ2.EXE v1.23 at address 0x13018
Old: 8A C8 33 C0 66 8B 43 34 C1 E0 03 0F BE C9 66 8B 90 C0 F9 54
New: 8B 0D B0 F8 54 00 3E 8B 0C CD C4 F9 54 00 0F BF 49 06 EB 19
The only drawback is this will also replace the special bonus warp animations (10, 20, 50, 100) with circles. Admittedly, it's not really difficult to fix that in place but then the patch will be a lot longer than 20 bytes.
__________________
<TABLE border=1><TR><TD>Facts:
Jazz Sprite Dynamite (JSD)
Tileset Extractor
Neobeo's Firetruck

</TD><TD>Myths:
Jazz Creation Station Plus (JCS+) - 10%
Coming soon - a dedicated server! - 25%
Jazz Sprite Dynamite v2 (JSDv2) - 2%
Another generic single-player level - 0%
</TD></TR></TABLE>
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,041

Violet CLM has disabled reputation

Dec 8, 2011, 04:23 PM
Violet CLM is offline
Reply With Quote
Putting aside people's bizarre unshared means of editing JJ2 without the original source code, the takeaway message is that nobody should try to do anything with this "discovery" because it's wildly variable?
__________________
Sean Sean's Avatar

JCF Member

Joined: Oct 2010

Posts: 720

Sean is a forum legendSean is a forum legend

Dec 8, 2011, 04:40 PM
Sean is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
the takeaway message is that nobody should try to do anything with this "discovery" because it's wildly variable?
Pssh. Ideas already forming in my head.
__________________
drop by my SoundCloud or something if you want, it's my life's pride
Vegito

JCF Member

Joined: Oct 2003

Posts: 2,861

Vegito is an asset to this forum

Dec 9, 2011, 10:16 AM
Vegito is offline
Reply With Quote
Quote:
Originally Posted by Sir Ementaler View Post
-A loop made of a warp object and a corresponding warp target on the same tile is inescapable. jjk causes a life loss but the death animation doesn't get a chance to be played and therefore you don't die. And as mentioned before, jjnowall won't work. Although obviously, the game over screen will show up if you lose all your lives.
I managed to escape by jumping out, you can double jump out or if you move to the right/left you can try to jump out .
__________________
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 867

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Dec 9, 2011, 11:17 AM
Seren is offline
Reply With Quote
You just placed it wrong. Try with warps placed this way:

__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
Sean Sean's Avatar

JCF Member

Joined: Oct 2010

Posts: 720

Sean is a forum legendSean is a forum legend

Dec 20, 2011, 07:35 PM
Sean is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
nobody should try to do anything with this "discovery" because it's wildly variable?
*ahem ahem*

While you're in the level, don't move. Then move after you've gotten bored.
__________________
drop by my SoundCloud or something if you want, it's my life's pride
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,041

Violet CLM has disabled reputation

Dec 20, 2011, 08:18 PM
Violet CLM is offline
Reply With Quote
Well, okay, sure, but that's the familiar case of coin warps with sprites. It's the numbers other than 10, 20, 50, and 100 that are wildly variable, because apparently they work differently depending on how you access the level.
__________________
Love & Thunder Love & Thunder's Avatar

JCF Member

Joined: Sep 2011

Posts: 1,101

Love & Thunder has disabled reputation

Dec 22, 2011, 03:56 PM
Love & Thunder is offline
Reply With Quote
Very interesting. This could revolutionise the way JJ2 levels are made!... Again!
__________________
minmay

JCF Member

Joined: Aug 2002

Posts: 1,186

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Aug 30, 2012, 02:48 PM
minmay is offline
Reply With Quote
I just had a level completely ruined by this: it doesn't appear to be possible to put a generator on these.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,041

Violet CLM has disabled reputation

Aug 30, 2012, 02:57 PM
Violet CLM is offline
Reply With Quote
How do you mean? I'd imagine trying to generate them would be like trying to generate bridges: kind of pointless, since they never get destroyed.
__________________
minmay

JCF Member

Joined: Aug 2002

Posts: 1,186

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Sep 1, 2012, 08:02 AM
minmay is offline
Reply With Quote
They never get destroyed, but they can be moved...
Seren Seren's Avatar

JCF Member

Joined: Feb 2010

Posts: 867

Seren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to allSeren is a name known to all

Sep 1, 2012, 10:36 AM
Seren is offline
Reply With Quote
You're revealing so little info about what you want to achieve that it's difficult to help you and I felt really discouraged to it. Let's say I'll try though. First off, Violet is right, warps don't get destroyed so creating a warp generator will give you almost the exact same effect as creating a warp. Another fact is that creating a warp object generator is perfectly possible with use of an MCE (although you will most likely have to edit your JCS.ini a bit). I'll upload an example level if you need one, just ask, it's nothing spectacular though since for aforementioned reasons it simply spawns one warp and does nothing else afterwards. If what you want to achieve is warp objects travelling through a part of the level from time to time you have to use a crate MCE instead, that is, a generator of crates containing warp objects. This also happens to be perfectly possible. If you need help at creating any of these or I didn't answer your question, specify it further. Feel free to move to private messages if you want to avoid discussing ideas in public.
__________________

I am an official JJ2+ programmer and this has been an official JJ2+ statement.
minmay

JCF Member

Joined: Aug 2002

Posts: 1,186

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Sep 2, 2012, 03:18 PM
minmay is offline
Reply With Quote
Yes, those are exactly what I tried. I could not get MCEs or crates to create any warps whatsoever, zones or objects. Sorry if I wasn't clear about that.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 11,041

Violet CLM has disabled reputation

Sep 2, 2012, 04:42 PM
Violet CLM is offline
Reply With Quote
0,0: Generator (Event=32)
1,0: MCE Event (Event=230, Delay Secs=1)
2,0: MCE Event (Event=x, Delay Secs=y, Initial Delay=0, [AddAnotherParameterInJcsDotIni]=1)
0,1: Belt Right
1,1: Belt Left

x: Warp ID
y: Number of coins needed

You'll also need another warp event somewhere in the level requiring the same number of coins so the sprite will get loaded, though it doesn't need to have ShowAnim set to 1. At a guess, the part that's tripping you up is that you need to add another parameter to MCE Event, since its bitfield doesn't stretch far enough to set ShowAnim otherwise.
__________________
minmay

JCF Member

Joined: Aug 2002

Posts: 1,186

minmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesomeminmay is immeasurably awesome

Sep 4, 2012, 01:35 PM
minmay is offline
Reply With Quote
I'm afraid it wasn't that part, and I don't know what part it was, because sure enough when I tried it again it worked fine. I wish I'd saved the version that didn't work because I have no idea what it was I did wrong, and was very confident in not having done anything wrong, if you hadn't guessed!
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 11:33 PM.