Sep 29, 2020, 12:09 PM | |
JJ2 Source Code (partial)
Download here
The full JJ2 source code has never been released, but we do have access to a few files, even though we don't know where they came from. These are the files most useful to someone for AngelScript-writing purposes, dealing mostly with object (i.e. jjOBJ) setup, behavior, and interactions. If you want to slightly modify the behavior of some enemy, for example, it's helpful to know how it works already so you can change only the relevant bits. Keep in mind that these source files are for 1.22 or 1.23. They don't reflect any minor changes in 1.24 and they definitely don't reflect any changes in JJ2+: for example, the raven function in g_Ai.c still includes the bug where sometimes raven enemies would lock in place forever after returning from an attack. JJ2's original internal variable names are generally similar to what you're used to from JJ2+'s AngelScript API but do differ a bit. Here are some key points:
obj->xspeed=6*65536; obj->xacc=8192; This is equivalent to the following in AngelScript: obj.xSpeed=6; obj.xAcc=0.125; Keep this in mind when reviewing JJ2 code. Be prepared to divide various numbers by 65536 (0x10000 in hex) in your head to get numbers that look more like what you're expecting. |
«
Previous Thread
|
Next Thread
»
Thread Tools | |
|
|
All times are GMT -8. The time now is 03:43 PM.
Jazz2Online © 1999-INFINITY (Site Credits). Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats. Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Original site design by Ovi Demetrian. DrJones is the puppet master. Eat your lima beans, Johnny.