PDA

View Full Version : JJ2+ v5.12 (last updated 20 August, 2023)


Pages : [1] 2 3 4 5 6 7

Violet CLM
Jan 28, 2013, 10:58 PM
JJ2+ v5.12
(last updated August 2023)

<hr>Download the installer from
Jazz2Online (https://get.jj2.plus) or ModDB (https://www.moddb.com/mods/jazz-jackrabbit-2-plus/downloads/august-2023-release-512)
Or get JJ2+ bundled for free when you buy Jazz 2 from GOG.com (https://buy.jazz2online.com) (<a href="https://gog.jj2.plus/">this page</a> explains how to enable it with GOG.com])
<hr>

JJ2+ is a patch, with a lot of fixes for bugs and lots of new features, both clientside and serverside. For those of you who like to read readmes before downloading files, find the readme here. (https://docs.jj2.plus) Or scroll down to Latest Changes (https://docs.jj2.plus/plus-readme.html#latestchanges) for a list of new features and bug fixes.

One major JJ2+ feature is the implementation of the AngelScript scripting language, which allows you to write your own scripts that manipulate various parts of the game and are run either by specific levels or by multiplayer servers. Read about how to use AngelScript here. (https://docs.jj2.plus/plus-angelscript.html)

Note that in order to use JJ2+, you will need a registered copy of Jazz Jackrabbit 2, version <em>1.23 or 1.24</em>. If one of the splash screens shown when starting up the game says "LK Avalon," that is additionally not a compatible version of the game.

http://www.jazz2online.com/jj2plus/img/newplus13small.png (http://www.jazz2online.com/jj2plus/img/newplus13.png)http://www.jazz2online.com/jj2plus/img/newplus12small.png (http://www.jazz2online.com/jj2plus/img/newplus12.png)http://www.jazz2online.com/jj2plus/img/newplus08small.png (http://www.jazz2online.com/jj2plus/img/newplus08.png)http://www.jazz2online.com/jj2plus/img/newplus09small.png (http://www.jazz2online.com/jj2plus/img/newplus09.png)http://www.jazz2online.com/jj2plus/img/newplus10small.png (http://www.jazz2online.com/jj2plus/img/newplus10.png)http://www.jazz2online.com/jj2plus/img/newplus11small.png (http://www.jazz2online.com/jj2plus/img/newplus11.png)http://www.jazz2online.com/jj2plus/img/newplus03small.png (http://www.jazz2online.com/jj2plus/img/newplus03.png)http://www.jazz2online.com/jj2plus/img/newplus06small.png (http://www.jazz2online.com/jj2plus/img/newplus06.png)http://www.jazz2online.com/jj2plus/img/newplus07small.png (http://www.jazz2online.com/jj2plus/img/newplus07.png)

If you are having trouble with the latest version, report the problem in this thread! General discussion of JJ2+ is fine in this thread too. For less urgent bug reports or suggestions, please visit our dedicated issue tracker instead (https://www.jazz2online.com/jcf/forumdisplay.php?f=49).

<!--Amongst various other features, JJ2+ adds a lot of new tools for level designers, allowing for more freedom and flexibility in their work. To use those, you need to update your JCS.ini file with the following lines where appropriate.

2=Hurt |+|Modifier |Hurt | |Up:1|Down:1|Left:1|Right:1
5=Slide |+|Modifier |Slide | |Strength:2
17=Area End Of Level |+|Area |End |Area |Secret:1|Fast:1|TextID:4|Offset:4
18=Area Warp EOL |+|Area |End |Warp |Empty:1|Fast:1|TextID:4|Offset:4
24=Limit X Scroll |+|Modifier |Limit |Xscroll|Left:10|Width:10
26=Area Warp Secret |+|Area |Warp |Secret |Coins:10|TextID:4|Offset:4
31=Multiplayer Level Start |+|StartPos |MP |Start |Team:2
32=Lori Level Start |+|StartPos |Lori |Start
52=Bomb Crate |+|Goodies |Bomb |Crate |ExtraEvent:8|NumEvent:4|RandomFly:1|NoBomb:1
54=Bouncer Ammo+15 |+|Ammo |Gun2 |Am+15 |Weapon:3
59=Airboard |+|Object |Air |Board |Delay Secs:5
89=Extra Time |+|Goodies |Extra |Time |Seconds:7
91=Hor Red Spring |+|Spring |H-Red |Spring |Empty:2|Keep Y-Speed:1|Delay:4|Reverse:1
92=Hor Green Spring |+|Spring |H-Green|Spring |Empty:2|Keep Y-Speed:1|Delay:4|Reverse:1
93=Hor Blue Spring |+|Spring |H-Blue |Spring |Empty:2|Keep Y-Speed:1|Delay:4|Reverse:1
94=Morph Into Bird |-|Morph |Bird |Morph |Flip: 1
95=Trigger Crate |+|Trigger |Trig |Crate |TriggerID:5|off:1|switch:1
148=Steady Light |+|Light |Steady |Light |Type:3|Size:7
149=Pulse Light |+|Light |Pulse |Light |Speed:8|Sync:4|Type:3|Size:5
192=Gem Ring |+|Gem |Gem |Ring |Length:5|Speed:5|Event:8
198=Rocket Turtle |-|Boss |Rock |Turt |EndText:4|Velocity:6|Angle:3
206=Sucker Tube |+|Object |Suck | |X-Speed:-7|Y-Speed:-7|Trig Sample:1|BecomeNoclip:1|Noclip Only:1|WaitTime:3
207=Text |+|Trigger |Text | |TextID:8|Vanish:1|AngelScript:1|Offset:8
208=Water Level |+|Scenery |Water | |Height (Tiles):8|Instant:1|Lighting:2
216=Generator |+|Generator |Gene- |rator |Event:8|Delay Secs:8|Initial Delay:1
230=Warp |+|Area |Warp | |ID:8|Coins:8|SetLap:1|ShowAnim:1|Fast:1
236=Butterfly |-|Enemy |Butter |Fly |Velocity:6|Angle:3
238=Snow |-|Scenery |Snow |Particles|Intensity:2|Outdoors:1|Off:1|Type:2
242=Path |-|Area |Path | |Velocity:6|Angle:3|Relative:1|RandRev:1|WaitTime: 3
245=No Fire Zone |+|Area |No Fire|Zone |Set To:2|Var:2
255=MCE Event |+|Area |MCE |Event |Event:8|Delay Secs:8|Initial Delay:1
-->

Here (http://www.jazz2online.com/jj2plus/old/) you can find older versions, mainly for testing purposes. JJ2+ is distributed under the MIT license (https://opensource.org/licenses/MIT).
<a href="https://www.moddb.com/mods/jazz-jackrabbit-2-plus/downloads/august-2023-release-512" title="Download August 2023 Release (5.12) - Mod DB" target="_blank"><img src="https://button.moddb.com/download/medium/257689.png" alt="August 2023 Release (5.12)" /></a>

Stijn
Jan 29, 2013, 12:24 AM
Be sure to check out the newly included example levels, and prepare to be amazed ;)

Obi1mcd
Jan 29, 2013, 12:57 AM
This is awesome in SO many ways.

snzspeed
Jan 29, 2013, 01:09 AM
mieli = puhallettu

(finnish for mind = blown) :)

Sean
Jan 29, 2013, 01:16 AM
I...

I need a new pair of pants.

I think I must contest the addition of instant warps though, the delay has become an integral part of the play experience.

Superjazz
Jan 29, 2013, 01:25 AM
CeeJay's seal of approval.

Jerrythabest
Jan 29, 2013, 04:03 AM
So, it's been more than 6 months since the code got transferred... but here it is! We didn't make it before Christmas, not even in 2012, but then finally it's a relief this thing is out now. I hope you all like what we've made of this.

Now on with the next release =) I hope we can make that release as awesome as this one is.

I esspecially liked this quote!
By the way: I've just read the old JJ2+ thread (which caused me actual physical pain) and it seems we've pretty much covered all feasible feature requests people made! Of course, AngelScript is the answer to about half of those.

Foly
Jan 29, 2013, 04:08 AM
Awesome! It's really nice to see that people are still working on jj2 and succeeding in it :)

Stijn
Jan 29, 2013, 04:10 AM
I think I must contest the addition of instant warps though, the delay has become an integral part of the play experience.
That's why it's optional. Only if the "Fast" parameter is set to 1 you'll be warped instantly.

Jerrythabest
Jan 29, 2013, 04:15 AM
In fact, there are little things that break oder clients. The only incompatibilities we introduced are new features that require everyone to run the latest version to work properly. For example, enscripted levels will not work with older clients and thus require /latestversiononly and /plusonly to be ON.

Nonomu198
Jan 29, 2013, 04:25 AM
kudos

snzspeed
Jan 29, 2013, 04:41 AM
I just finished playing all the example levels and oh boy, that was some mindblowing shit. I especially love the player timers and that example level with carrotus with that falling devan. fucking amazing!

Jerrythabest
Jan 29, 2013, 04:55 AM
I think we can call that level "The mother of all example levels". It's really unbelievable what has become possible now. That level blew my mind, too.

Vladan345
Jan 29, 2013, 05:34 AM
can someone help me?I dont know how to instal jj2+ latest version? XD

Jerrythabest
Jan 29, 2013, 05:53 AM
Please read this (http://www.jazz2online.com/jj2plus/plus-readme.html#installation). It basically comes down to downloading the zip file (see first post) and extracting it entirely into your Jazz 2 folder. If you did not have Plus before, open Plusifier.exe and point it to Jazz2.exe to generate a Jazz2+.exe. Then run that, and you're good to go.

ShadowGPW
Jan 29, 2013, 05:59 AM
3D Support? How funky!

Any Nvidia 3D vision algorithms build in? Or using the DX 11.1 algorithms?

Jerrythabest
Jan 29, 2013, 06:09 AM
Nope, you don't need all that fancy stuff. It just works by splitting the screen in half, providing a left-eye view and a right-eye view, and letting the 3D TV do the magic to get each view into the correct eye. This also means you don't need an Nvidia card. Or a DX 11.1 enabled card. Or hell, you don't need a video card at all.

cooba
Jan 29, 2013, 06:25 AM
Or hell, you don't need a video card at all.True JJ2 spirit!

ShadowGPW
Jan 29, 2013, 06:32 AM
But... but... but.. now i can't use my shutter glasses ... ;(

(I always run on software mode in JJ2 ;-) )

FawFul
Jan 29, 2013, 07:17 AM
really love it! Regenerating destructable blocks, pallette swaps, coloured water, music change, everyone must get this!

2 requests:

1: make a ready up as team command
2: autostart if everyone is ready

Violet CLM
Jan 29, 2013, 08:13 AM
I updated plus.dll in plus.zip so that the "Read Plus Readme..." option in the Help menu points to plus-readme.html, instead of the no-longer-updated plus-readme.txt. <em>This is the only change to the file</em> and <em>there are <strong>no</strong> gameplay incompatibilities</em> between the new version and last night's. So, up to you.

Jerrythabest
Jan 29, 2013, 10:34 AM
Looks like that was the only real "fail" with this release. Have been hosting the Plus Release Server all day without any trouble.


EDIT: and just as I type that I recieve two bugreports. <strike>There is a potential crash in /3d TAB</strike>, and /me uses socket IDs where it should use player IDs.


EDIT2: I now realise the TAB crash is actually an old bug showing up in a new place: just don't use translucent tiles in textured backgrounds. This bug has been around since forever (I can replicate it with vanilla JJ2 by pressing F3 in the same level).

GoldRabbit
Jan 29, 2013, 10:39 AM
This is everything I could've ever asked for, and then some more. A lot more. Colour me very, very impressed. Thanks a lot guys.

PurpleJazz
Jan 29, 2013, 11:56 AM
Reporting a bug: TNT is no longer able to destroy blocks at all - regardless of the Weapon parameter used in the JCS event. I'm not sure if I've got everything set up correctly so it could just be me, but I think it would be worth looking into as this will obviously break a whole load of levels if this is not the case.

A little less serious, but the Game Over function also appears to be broken. If I select Yes on the Continue screen, it'll say something like "could not find level or tileset for BUST A MOVE.j2l", and the game crashes.

Jerrythabest
Jan 29, 2013, 12:08 PM
Funny, I can't reproduce either of those here. Though I do remember seeing the latter sometime long ago. I have no clue where it came from.

Superjazz
Jan 29, 2013, 12:25 PM
Found another bug: Whenever you first play multiplayer online(join any server or start one), and after go play singleplayer without restarting JJ2, you will be unable to receive any damage by objects or enemies. For now a restart helps whenever you want to play single- after multiplayer luckily.

Jerrythabest
Jan 29, 2013, 12:34 PM
Found another bug: Whenever you first play multiplayer online(join any server or start one), and after go play singleplayer without restarting JJ2, you will be unable to receive any damage by objects or enemies. For now a restart helps whenever you want to play single- after multiplayer luckily.

Are you sure it is any server and not a specific game mode or level? I can't seem to reproduce this one either.

Superjazz
Jan 29, 2013, 12:44 PM
Okay, apparently it's not just any server or any circumstance. I tried reproducing it by first running jj2, visiting zeal alpha for a second, then went to sp, but I could receive damage normally. Afterwards, I restarted jj2, visited Zeal Duels 1 without even spectating off, and after the same bug happened again.

EDIT: Okay I guess I figured it out; Whenever the game is stopped you won't receive any damage in multiplayer, and logically neither in single-player. While Zeal Alpha had a game running>it left on the game 'started' for me, meanwhile ZD1 had a game stopped, resulting in my client having itself in stopped-mode. So simply what needs to be done is to have the game 'on' by default in single-player without having the option to stop it from the menus either which is possible now.

EDIT2: There are also more menu-commands that can be abused in single-player such as 'Reset Game' to restore all your health. Actually in my opinion all the multiplayer-commands should be disabled for single-player, even if they can be just considered as alternatives for jjcheats.

Toni_
Jan 29, 2013, 01:06 PM
Bug number 1:

You still can't destroy the tile with blaster if it's straight above you. This should be fixed.

http://img687.imageshack.us/img687/5142/64822281.png

Bug number 2:

While playing plusJCSFun.j2l, I warped somewhere and felt in pit I think. This is what I got in chatlog.

[[Tuesday, January 29, 2013 at 22:39:48]]
**Current level: "JJ2+ JCS FunPak" - PlusJCSFun.j2l
**Next level: PlusJCSFun
**Game Mode: Battle
**Custom Mode: OFF
[22:40:17] *** you killed yourself
[22:40:17] *** you killed yourself
[22:40:17] *** you killed yourself
[22:40:17] *** you killed yourself
[22:40:18] *** you killed yourself
[22:40:18] *** you killed yourself
[22:40:18] *** you killed yourself
[22:40:18] *** you killed yourself
[22:40:18] *** you killed yourself
[22:40:19] *** you killed yourself

Bug number 3

While playing plusEnscripted, when I had to destroy 20 lizards to continue, this happened:

http://img132.imageshack.us/img132/9605/78189516.png



Thanks for making all new functions and stuffs. It will improve everything in JJ2.

Superjazz
Jan 29, 2013, 01:09 PM
Request about /ready command; Add alternative command or option for receiving full fastfire along with the command. I and many other players used to always prefer GMR function without fastfire, since it makes me waste ammo easier in multiplayer.

Seren
Jan 29, 2013, 01:10 PM
A little less serious, but the Game Over function also appears to be broken. If I select Yes on the Continue screen, it'll say something like "could not find level or tileset for BUST A MOVE.j2l", and the game crashes.
Afaik this is an old bug that used to happen to all levels run by Save & Run, until one of older JJ2+ releases fixed it. I checked it and it doesn't seem to have returned with this release though.

Edit: Ah, however, at least according to Trey, it occurs in plusEnscripted.j2l if you use Save & Run, so possibly also some other but not all levels.

GoldRabbit
Jan 29, 2013, 01:12 PM
The game over screen forces hosts to restart their server during coop.

The laser shield doesn't seem to work for some reason, when the host (I) tried using it, no beam would come out, when a client tried using it, he got kicked off. That happened in PlusTimerEx.j2l.

The platform section right after the falling Devan sequence is buggy, as the platform doesn't return when you die (again, in a coop server). This isn't really related to JJ2+ rather than the angelscript itself.

Jerrythabest
Jan 29, 2013, 01:12 PM
Okay, apparently it's not just any server or any circumstance. I tried reproducing it by first running jj2, visiting zeal alpha for a second, then went to sp, but I could receive damage normally. Afterwards, I restarted jj2, visited Zeal Duels 1 without even spectating off, and after the same bug happened again.

EDIT: Okay I guess I figured it out; Whenever the game is stopped you won't receive any damage in multiplayer, and logically neither in single-player. While Zeal Alpha had a game running>it left on the game 'started' for me, meanwhile ZD1 had a game stopped, resulting in my client having itself in stopped-mode. So simply what needs to be done is to have the game 'on' by default in single-player without having the option to stop it from the menus either which is possible now.

EDIT2: There are also more menu-commands that can be abused in single-player such as 'Reset Game' to restore all your health. Actually in my opinion all the multiplayer-commands should be disabled for single-player, even if they can be just considered as alternatives for jjcheats.

Thanks for the details. I wonder how this bug got caused, the concept of stopped games is nothing new. Good thing though that the menus actually allow the game to get started again.

The menu commands in single player stuff is still some 'work in progress' actually. Things like Next Level don't work very well in offline games for whatever reason, and the bulk of Game Options just doesn't work offline.

I will look into this one. Expect it fixed in the next release.

Request about /ready command; Add alternative command or option for receiving full fastfire along with the command. I and many other players used to always prefer GMR function without fastfire, since it makes me waste ammo easier in multiplayer.
We've had discussion about including Fast Fire in /ready. In fact, it was a last-minute change (or at least a last week change) to include that. I think an (optional) argument to the command or something like '/readyff' would be a good option for this. (I've also seen someone asking for including a coin increase with /ready. I think that has a smaller chance of making it in because the amount of coins would be arbitrarily chosen at best.)

The game over screen forces hosts to restart their server during coop.

The platform section right after the falling Devan sequence is buggy, as the platform doesn't return when you die (again, in a coop server). This isn't really related to JJ2+ rather than the angelscript itself.I must admit we did little testing in online coop. As has been with any previous release of Plus (as far as I know at least), online coop is a feature that 'just works' without supporting all the rediculous things we can achieve in levels nowadays. Might get fixed someday if someone gets a "Eureka!" moment and comes with a cure.


The laser shield doesn't seem to work for some reason, when the host (I) tried using it, no beam would come out, when a client tried using it, he got kicked off. That happened in PlusTimerEx.j2l.This level only works offline. It's the anti-cheat features kicking in there. For the other shields, this be fixed by adding Shield events to the level. The laser shield is still a no-go in servers.

Violet CLM
Jan 29, 2013, 01:34 PM
The platform section right after the falling Devan sequence is buggy, as the platform doesn't return when you die (again, in a coop server). This isn't really related to JJ2+ rather than the angelscript itself.
It's a single player (or local play coop) level; it's not designed to be played online.

Jerrythabest
Jan 29, 2013, 01:34 PM
Edit: Ah, however, at least according to Trey, it occurs in plusEnscripted.j2l if you use Save & Run, so possibly also some other but not all levels.

I'll put this one on the list too.

GoldRabbit
Jan 29, 2013, 01:54 PM
Thanks everyone for answering so quickly, that's dedication. I have a suggestion, though it's quite minor.

The Slide event (which is amazing to finally see work, I remember posting in 2006 or something about it being broken) should have a parameter to designate the sliding distance (in tiles, or something). I almost didn't notice it at first, because the distance was quite small.

Also, what happened to the preview with vertical flipping? I won't mention the one with the numbers 1-9, since I suppose that wasn't official.

minmay
Jan 29, 2013, 01:54 PM
The fireball gun seems to not destroy destruct blocks if you fire it fast enough (i.e. while running). Pretty evident in the Survivor level. Also, I love the Worms references

cooba
Jan 29, 2013, 02:00 PM
Also, I love the Worms referencesThanks! I couldn't remember the exact messages, so I just opened the Worms Armageddon exe in a text editor (thanks for the advice, Torkell) and searched for them.

Jerrythabest
Jan 29, 2013, 02:12 PM
The fireball gun seems to not destroy destruct blocks if you fire it fast enough (i.e. while running). Pretty evident in the Survivor level. Also, I love the Worms references

I think this one's gonna be very difficult (if not impossible) to fix. I'd like to see it as a good reason to stop running sometimes.

The Slide event (which is amazing to finally see work, I remember posting in 2006 or something about it being broken) should have a parameter to designate the sliding distance (in tiles, or something). I almost didn't notice it at first, because the distance was quite small.I thought of that myself too. Will see what's possible.

Also, what happened to the preview with vertical flipping? I won't mention the one with the numbers 1-9, since I suppose that wasn't official.The number one was indeed unofficial. No idea what that was about. The vertically flipped tile was real but it's one of those few features that didn't make it in just because they were causing too much trouble while we were having so many other awesome ideas. The implementation is half way through, though. So we may get there eventually.

minmay
Jan 29, 2013, 02:15 PM
Oh also this is amazing and stuff

Violet CLM
Jan 29, 2013, 02:43 PM
Afaik this is an old bug that used to happen to all levels run by Save & Run, until one of older JJ2+ releases fixed it. I checked it and it doesn't seem to have returned with this release though.

Edit: Ah, however, at least according to Trey, it occurs in plusEnscripted.j2l if you use Save & Run, so possibly also some other but not all levels.
IIRC this is a matter of filename length, like if the .j2l filename is too long it ends up bleeding into another string? Something like that. It's an old, old bug.

EDIT: Can those who are experiencing troubles with TNT not destroying destruct scenery share their plus.ini settings for ExtendedTNT and TNTDamage? I don't know if that's related to the problem, but it seems the most sensible place to start looking.

EDIT2: <a href="http://www.moddb.com/mods/jazz-jackrabbit-2-plus">We're on Mod DB!</a>

Seren
Jan 29, 2013, 04:12 PM
Oh. That would make sense. I assume it might have never been fixed then and I just coincidentally started using short level names around the time of the last Plus release.

Crazy Rabbit
Jan 29, 2013, 11:19 PM
AngelScript really gave a lot of new features. My big big thumbs up and full C for the new JJ2+!

DanZeal
Jan 30, 2013, 02:34 AM
Thank you for -servername !

cooba
Jan 30, 2013, 04:59 AM
Please remove /bestpony, the last thing JJ2 needs is this crap.

Jerrythabest
Jan 30, 2013, 05:04 AM
/bestpony The one KEEPING IT!

Foly
Jan 30, 2013, 07:32 AM
/bestpony |c|o|o|b|a

Anyway, i got a question about AngelScript:
I want to convert an integer to a string, do i need to write my own function for this or is there already a function to do this? I've searched the internet and i did found some functions, but they didn't work so i guess they aren't implanted here.

Violet CLM
Jan 30, 2013, 10:26 AM
Right now you have to write your own function, yes. It was mentioned once or twice as an idea but ended up falling through the cracks. Sorry.

Jerrythabest
Jan 30, 2013, 10:36 AM
I think we could use more of those general-use functions in the API.

minmay
Jan 30, 2013, 03:02 PM
Are there still plans for a "JCS+" or has that been superseded by WebJCS?

GoldRabbit
Jan 30, 2013, 03:18 PM
A suggestion (that I also made on the server) should be that if a level using angelscript needs multiple music tracks, they all should be downloaded along with the level and j2as.

Love & Thunder
Jan 30, 2013, 04:46 PM
I found a bug in plusJCSFun: If you die, the timer at the beginning of the level doesn't restart, so it is impossible to progress in the level. I did find a way to get the timer to start again, though: type JJK until you reach the "Continue?" screen, and select "Yes".

Jerrythabest
Jan 31, 2013, 01:33 AM
That's probably a j2as bug specific for the level. I figure it isn't hard to fix, but the priority is close to 0 :p


About the downloading music stuff, this is a known issue. The same applies to palettes/tilesets (AngelScript allows you to load the palette from a different tileset). This is a rather difficult thing to fix since it's close to impossible to know which files are needed beforehand, but I guess eventually a 'download on demand' feature could solve this. But it's not easy to make such a thing (and we need to make it secure).

burnout92
Jan 31, 2013, 01:59 AM
This patch will works with TSF?

Foly
Jan 31, 2013, 02:11 AM
This patch will works with TSF?

Yes it does.

burnout92
Jan 31, 2013, 02:31 AM
Yes it does.

That's great!

Crazy Rabbit
Jan 31, 2013, 03:26 AM
Shall AngelScript support custom sounds and sprites in future updates of JJ2+?

Jerrythabest
Jan 31, 2013, 03:43 AM
We've come up with that idea during development too, but it suffers from the same problem as I explained in the previous post: it's virtually impossible to let clients download such script-dependent files. So it would only work if both the server and all clients already have the respective sounds and sprites in their Jazz folder.

Theoretically, this would be possible in offline games. But it would probably take so much time to get working correctly that we'd rather spend that time on more broadly applicable features.

As can be seen in, for example, plusSurvivor, you can use existing sprites and sounds to create new objects in your levels. And as can be seen in plusEnscripted, it's possible to react according to any STATE that an object may be in by writing code for it. This way, it is in fact possible to script your own enemies or other special objects. Hell, if you've got way too much spare time you could even write a complete AI that uses the Jazz/Spaz/Lori sprites and have that running around in the level and shooting at players passing by. It's possible if you're willing to write a seriously huge script for it.

Violet CLM
Jan 31, 2013, 08:33 AM
This is a rather difficult thing to fix since it's close to impossible to know which files are needed beforehand, but I guess eventually a 'download on demand' feature could solve this.
It's not all that hard if you're willing to put a little extra burden on the level designer and have them manually create a jjRequiredFilenames list or something. AS wouldn't need to know whether a given file was music, or sprites, or a palette, or what, just that it was required for the level. The only problem is that we don't have any code to work from for sending <em>variable</em> numbers of files to a client -- right now servers will send at most one .j2l, at most one .j2t, at most one .j2as, and at most one (skippable) music file. Adding a non-constant number of extra files would be a bit trickier, and the thing is, tools to make custom sprites for JJ2 don't even <em>exist</em> right now, so why bother?

FawFul
Jan 31, 2013, 11:18 AM
It's not all that hard if you're willing to put a little extra burden on the level designer and have them manually create a jjRequiredFilenames list or something. AS wouldn't need to know whether a given file was music, or sprites, or a palette, or what, just that it was required for the level. The only problem is that we don't have any code to work from for sending <em>variable</em> numbers of files to a client -- right now servers will send at most one .j2l, at most one .j2t, at most one .j2as, and at most one (skippable) music file. Adding a non-constant number of extra files would be a bit trickier, and the thing is, tools to make custom sprites for JJ2 don't even <em>exist</em> right now, so why bother?

Well maybe not custom, but it is already possible to change current sprites: There is Jazz Sprite dynamite. that edits sprites in the Anims.j2a file. It's a bit hard to use but works perfectly. I think what zoro maybe means is to copy the Anims.j2a file from a server.

Proof of 2 quite changeable examples:
http://www.jazz2online.com/downloads/6648/sonic-jj2/
and
http://www.mediafire.com/?rdkiwihcxyd6yc0

Jerrythabest
Jan 31, 2013, 12:04 PM
I figure if we truly were to implement this, the easiest solution would be to use some already-existing file format like GIF. Plenty of tools can make those, they are indexed (i.e. use a 256-color palette), they are small, their file format is easy (http://www.w3.org/Graphics/GIF/spec-gif89a.txt) (not to mention there's probably a free library for loading them) and they may include multiple images in one file.

Violet CLM
Jan 31, 2013, 12:05 PM
Granted. The thing is, you'd <em>never</em> want to transfer an entire anims.j2a file for an individual level. It's enormous, and 90% of it would be redundant. You'd want smaller custom .j2a files with only the <em>new</em> sprites contained in them.

Partially ninja'd by Jerry... keep in mind that sprites contain more information than the raw frame images (http://www.jazz2online.com/wiki/index.php?J2A_File_Format).

Jerrythabest
Jan 31, 2013, 12:20 PM
In that case I figure we could either search or make a simple tool to enter "Comment Extension" blocks into the GIF file. See Chapter 24 on page 17 (http://www.w3.org/Graphics/GIF/spec-gif89a.txt).

struct CommentExtension{
char extensionIntroducer = 0x21;
char commentLabel = 0xFE;
char dataSize;
char[dataSize] data;
char blockTerminator = 0x00;
}

Then we can just define the extra information in the comment data. (Reading the thing myself the second time, this would void the spec since it "should not be used to store control information for custom processing". The Application Extension block is an alternative.)

Slaz
Feb 1, 2013, 07:43 AM
Could any of you dev's try to find a way to disable 'double buffering' with DirectDraw for the next Plus release? You know, the Windows 8 issue that's still going on.

While triple buffering can be turned off in JJ2 using the -notriple flag, double buffering appears to be hardcoded..

I hope Microsoft will come up with a DDraw fix someday, but until then, all old DDraw based games have to be played single buffer to prevent severe performance loss!

DarkShadow
Feb 1, 2013, 09:07 AM
I approve.

It's cool seeing the continued work and activity. Great work! :)

minmay
Feb 1, 2013, 02:03 PM
Would it be easy to add the capability to set the position of a layer with an auto speed? Right now, to change a layer's auto speed without an abrupt "jump" you have to wait until certain render frames, and the gap between those frames is often several seconds.

That's a real question, not just a feature request, I honestly have no idea how this is handled internally (as you can see in mingfpack19.j2l).

Example: I'm remaking the first level of Episodic Ground Force Pack Episode 1, and I want the deadly clouds at the top to slowly move downwards when Sudden Death activates. If I just set the layer's auto Y speed to -1, they will appear to jump across (or off) the level, which is obviously not what I want.
I'm aware that this breaks if someone pauses, fortunately you can't do that in multiplayer anymore in the latest Plus...right?

Setting a pixel offest for each layer would also work, of course, and a lot more versatile, but it might be too slow to call that every frame?

djazz
Feb 1, 2013, 02:47 PM
Awesome! So much stuff to play with.. :D
Works great on Linux too :)


In the JJ2+ readme: jumpSpeed is misspelled.. should be jumpStrength.


Some AngelScript questions...


(SOLVED) Is there a way to change how fast a player can run (speed)? I can change how high the player can jump (sortof with jumpStrength, you can still run and reach higher).
Edit: This code seem to work:void limitSpeed(float speed) {
if (p.xSpeed > speed) {
p.xSpeed = speed;
} else if (p.xSpeed < -speed) {
p.xSpeed = -speed;
}
}

I tried to run a command using jjChat() in the onLevelLoad (as server), and it says "Error: Commands cannot be used while level is cycling".

Can I store custom variables for players? Or must I make my own array with player-info/objects?
Can I make the blaster have a limited set of ammo, like the other weapons?

I want to make a player fire the laser beam (with a recharge delay) without shield, possible? Think Quake3-style, or any game with a sniper.

Can I use fireball as one player and pepper spray as another player in the same server?

Can I limit the rate the player is allowed to fire a bullet (not faster than current fastfire delay, for example), no matter how fast the player is smashing the fire-key?

I want ice/tnt to heal teammates only, how can I do that with AS? I can to that with negative TNT damage and friendlyfire, but that also heals nearby teammates.

Can I disable a special move, like uppercut/superjump?

(SOLVED) I want some players to have different max-healths, in a class-based gamemode I'm making (TF2).
Edit: I call this function from a switch-statement in the onPlayer-function, with the desired maxHealth: void limitHealth(int maxHealth) {
if (p.health > maxHealth) {
p.health = maxHealth;
}
}


Can i make the TNT delay longer?


Scripting JJ2 is awesome! :D

Violet CLM
Feb 1, 2013, 03:40 PM
minmay: Planned, but not yet implemented. We ran into some trouble with layer drawing code and haven't resolved it so far.

Works great on Linux too
Yeah, I think I figured out what your problem was before.
I tried to run a command using jjChat() in the onLevelLoad (as server), and it says "Error: Commands cannot be used while level is cycling".
I'm... not sure what you want me to say here. The error is a true statement.
Can I store custom variables for players? Or must I make my own array with player-info/objects?
The latter, I reckon.
Can I make the blaster have a limited set of ammo, like the other weapons?
Probably. Do something like <code>void onPlayer() { p.score = p.ammo[1]; }</code> and you'll see that blaster does in fact have an ammo count, it's just that it gets reset to 100 every time it hits 0. You can hack something together from there, though it'll still <em>display</em> as infinity.
I want to make a player fire the laser beam (with a recharge delay) without shield, possible? Think Quake3-style, or any game with a sniper.
Something like <code>jjObjects[jjAddObject(OBJECT::LASER, p.xPos, p.yPos, p.playerID, CREATOR::PLAYER)].direction = p.direction;</code> should work, though it won't show up online.
Can I use fireball as one player and pepper spray as another player in the same server?
No.
Can I limit the rate the player is allowed to fire a bullet (not faster than current fastfire delay, for example), no matter how fast the player is smashing the fire-key?
You could try turning noFire on and off a lot, I guess? You'd have to hack together a bullet-was-fired detection by comparing ammo count or something, though; this isn't something we have basic support for yet.
I want ice/tnt to heal teammates only, how can I do that with AS? I can to that with negative TNT damage and friendlyfire, but that also heals nearby teammates.
Not AS-related, nor otherwise supported AFAIK.
Can I disable a special move, like uppercut/superjump?
Not yet.
I want some players to have different max-healths, in a class-based gamemode I'm making (TF2).
<code>if (p.health > #) p.health = #;</code>
Can i make the TNT delay longer?
Almost certainly. Just find the right jjOBJ and then find the right property to edit.

burnout92
Feb 1, 2013, 11:19 PM
Why not support the TSF: LK Avalon release of this patch? Because I wanted him to try the patch, because I have the normal TSF: LK Avalon release was bored. Can we solve the problem in some way?

cooba
Feb 2, 2013, 01:41 AM
I tried to run a command using jjChat() in the onLevelLoad (as server), and it says "Error: Commands cannot be used while level is cycling".I'm... not sure what you want me to say here. The error is a true statement.Can't believe I haven't thought of this before, but something like onFirstTick() would be ideal for this purpose (and other purposes).

Toni_
Feb 2, 2013, 04:10 AM
I want some players to have different max-healths, in a class-based gamemode I'm making (TF2).

First do:
/starthealth 1
/maxhealth 7,
then, for every class, put a warp after start pos, to sucker tube, where you place some +1 carrots. Depends of how much health do you want class to have.

Jgke
Feb 2, 2013, 04:20 AM
First do:
/starthealth 1
/maxhealth 7,
then, for every class, put a warp after start pos, to sucker tube, where you place some +1 carrots. Depends of how much health do you want class to have.

What if there would be carrots in the level? How can you determine how much exactly can a player heal? ;)

Stijn
Feb 2, 2013, 04:24 AM
Have one local trigger per class, read status of trigger to determine max health for the player.

Seren
Feb 2, 2013, 05:08 AM
Guys, Violet already answered that question and Djazz adjusted his script accordingly. :p
The only thing that could be improved is changing carrots into some other object temporarily so that they can't be taken when a player is on full health. That is also possible and not too difficult to script afaict.

cooba
Feb 2, 2013, 05:31 AM
Question: is it possible to manually bring back/STATE::KILL an object that is STATE::<!>DEACTIVATE?

EDIT: Found a workaround for what I want to do, but the above would still be cool to have somehow.

Jerrythabest
Feb 2, 2013, 11:26 AM
Can't believe I haven't thought of this before, but something like onFirstTick() would be ideal for this purpose (and other purposes).

In fact, it's used in plusSurvivor.j2as.

plusSurvivor uses the following:
bool isLoaded = false;
void onMain(){
if(!isLoaded){
isLoaded = true;
//jjChat your commands here
}
}

But I figure this shorter version would work equally well:
void onMain(){
if (jjGameTicks == 0){
//jjChat your commands here
}
}


Can I disable a special move, like uppercut/superjump?
You can disable Spazz's doublejump withvoid onPlayer(){
p.alreadyDoubleJumped = true;
}

I wonder whether Players have a STATE just like other objects. In that case, access to that could be really powerful.

GLaDOS
Feb 2, 2013, 01:23 PM
Amazing update! Great job Violet, Jerry and all the others who contributed to this new version. I am really enjoying the functionality AngelScript adds and looking forward to possibilities that future extensions to the scripting API will bring.

I am aware of this being the first iteration of J2AS, though I do have a few suggestions to make:
If players lack the same kind of "STATE" field that objects have, the ability to access player animations could be useful for detecting these states, as a sort of workaround.
Also, being able to use the numpad for switching weapons would be very useful, not only for alternate key configurations, but also as a sort of 8-directional input to be used with scripting.
Finally, functions to send/receive custom UDP packets from scripts would allow for proper server/client synchronization without having to use hacks such as positions or bullets to encode data to be sent to the server, but I guess this could turn to be somewhat complicated to implement properly. If that is the case, please do not consider this too much of a top priority request and focus on the more important stuff first (mainly bugfixes).

Anyway, keep up the great work!

Jerrythabest
Feb 3, 2013, 12:40 AM
Well, I'd consider the lack of packet functions in AngelScript a major factor. The only reason it's not in there right now is because it's really difficult to pull off. But it must happen someday!

cooba
Feb 3, 2013, 03:00 AM
But I figure this shorter version would work equally well:
void onMain(){
if (jjGameTicks == 0){
//jjChat your commands here
}
}jjGameTicks needs to equal 1, not 0, but otherwise this works perfectly.

FawFul
Feb 3, 2013, 03:32 AM
Not sure if mentioned already, but i tried Sir elementalers Day/Night script today and i couldn't last in jj2 for longer than 2 minute. fps dropped to 3 at a certain point with shortly an access violation after. Now i wanted to know what was going on, and apparently jj2 eats more and more memory over time. You start of with like 10mb memory usage for jj2. and in less than 2 minute that turns into 600mb and it just keeps raising till it's too much to handle probably. I think this memory usage raising is a major bug and should be fixed as soon as possible. With this script it actually raised around 8mb per second..

cooba
Feb 3, 2013, 03:36 AM
Not sure if mentioned already, but i tried Sir elementalers Day/Night script today and i couldn't last in jj2 for longer than 2 minutes. fps dropped to 3 at a certain point with shortly an access violation after. Now i wanted to know what was going on, and apparently jj2 eats more and more memory over time. You start of with like 10mb memory usage for jj2. and in less than 2 minutes that turns into 600mb and it just keeps raising till it's too much to handle probably. I think this memory usage raising is a major bug and should be fixed as soon as possible.This has been already fixed in the upcoming patch and will be released in the coming days.

djazz
Feb 3, 2013, 12:49 PM
I made a blade gun, that the player can steer/control by moving.
Demo: http://www.youtube.com/watch?v=Qr8pahz-QTs

<iframe width="640" height="480" src="http://www.youtube.com/embed/Qr8pahz-QTs" frameborder="0" allowfullscreen></iframe>

http://i.imgur.com/FduPNmo.png

Violet CLM
Feb 3, 2013, 01:01 PM
That is remarkably similar to what I was thinking would be cool for the blade gun, minus the not working online very well. EDIT: Oh, wait, now I see the trigger scenery. Never mind.

djazz
Feb 3, 2013, 01:20 PM
This works very well in online-mode, as long as all the players have the same speed for all clients, as all clients do the same calculation.

GLaDOS
Feb 3, 2013, 11:17 PM
Well, I'd consider the lack of packet functions in AngelScript a major factor. The only reason it's not in there right now is because it's really difficult to pull off. But it must happen someday!

Okay, that is understandable. A good alternative for now could be a "/s" command prefix that hides console messages for the following command, such as jjChat("/s trigger 2 on") for using triggers as global variables without spamming the console.

Jerrythabest
Feb 3, 2013, 11:31 PM
This works very well in online-mode, as long as all the players have the same speed for all clients, as all clients do the same calculation.
I think it's just as good as the Bouncer, then. Looks awesome!

Also kudos to Stijn for the snippet DB!

Okay, that is understandable. A good alternative for now could be a "/s" command prefix that hides console messages for the following command, such as jjChat("/s trigger 2 on") for using triggers as global variables without spamming the console.
Silencing the commands would be nice, but sadly due to the structure of the code it would require quite some work. Maybe we need to expose the features through the API directly, so you wouldn't need to rely on commands.

GLaDOS
Feb 4, 2013, 12:55 AM
Silencing the commands would be nice, but sadly due to the structure of the code it would require quite some work. Maybe we need to expose the features through the API directly, so you wouldn't need to rely on commands.

While I do not know exactly how the code works internally, couldn't this be solved through a bool that the /s command would set for the duration of the executed command that would be checked by the console output function and suppress its output if true?


Meh, I wish I could contribute better than just suggesting rough means of implementation based on speculations around the source code... :p

Jerrythabest
Feb 4, 2013, 01:14 AM
Hmm, I first thought of having such a bool and passing it on with the commands, but indeed a more quick-and-dirty approach would be to have a global bool to silence the system messages altogether while executing the command. Let's see.

GLaDOS
Feb 4, 2013, 01:27 AM
It could be a temporary solution until someone is willing to help out with adapting all commands to take and respect a silence parameter. :p

DennisKainz
Feb 4, 2013, 01:42 AM
I really shouldn't have doubted you developers. I never thought I'd see so much progress in so little time. I saw butterflies following paths, timers for completing tasks, lizard ambushes, poisonous water flows, drivable platforms, timed out bonus stages, weather and daytime changing in a single level, a new boss, immortal skeletons, scrolling rooms ... I thought I'd have not seen any of these until year 2019. Instead, it's all here, already.

I feel so ashamed for doubting you admin/developers and your good intentions towards JJ2.

Besides, I can't understand a thing of this Angel Script thing. The only thing I managed to do is making the job seat in a Hotel level spawn food on the tables.

Jerrythabest
Feb 4, 2013, 05:47 AM
well, I'd say the food thing is a very nice start for a script :)

GLaDOS
Feb 4, 2013, 08:29 AM
Sorry for the scripting feature request spam (maybe you guys just so happen to need someone to implement all of this missing AS stuff), but are we going to see some multiplayer related getter functions anytime soon? Things like checking for started/stopped game, pregame and timelimit, as well as some form of /reset detection would be immensely helpful for creating custom game modes (which is what I am currently doing).

Violet CLM
Feb 4, 2013, 10:57 AM
S(maybe you guys just so happen to need someone to implement all of this missing AS stuff)
when we add new coders to the project, they disappear. it's a worrisome pattern.

anyway the answer to your question is yes, and soon.

GLaDOS
Feb 4, 2013, 11:04 AM
Ow... let's hope the project won't die out due to sudden mass-inactivity among the devs.
Anyway, thank you very much for listening to the suggestions. As always, great job; I'm eagerly looking forward to the next release!

djazz
Feb 4, 2013, 11:13 AM
Some show-off! :D
Sorry for the lag burst at 5:00, I just don't know what went wrong 9_6

<iframe width="640" height="480" src="http://www.youtube.com/embed/8iEqnQC0-tU" frameborder="0" allowfullscreen></iframe>

burnout92
Feb 4, 2013, 11:58 AM
Might be a question? How to insert mp3 or wav music for a level? Because i saw the mp3 and wav support JJ2+.

Violet CLM
Feb 4, 2013, 12:02 PM
Same as .s3m, .mod, .xm, etc. Just put the music file in the same folder as JJ2 and then type the filename in "Music file" in JCS or jjMusicLoad, depending on where you're doing this.

burnout92
Feb 4, 2013, 12:23 PM
Thanks for your help. Patch was very good anyway. Maybe it's better play with this amazingly good game on online. In addition, I would like to wish good luck to the patch development. Fixes the single player mode or just the multi player mode? :)

Violet CLM
Feb 4, 2013, 04:55 PM
New release!
As ever, <a href="http://www.jazz2online.com/jj2plus/plus.zip">click here to download.</a>

http://www.jazz2online.com/jj2plus/newplus04small.png (http://media.moddb.com/images/downloads/1/51/50826/newplus04.png)

This is <em>not</em> intended to be an enormous, game-changing update like last week's. The main point of this release is to plug two memory leaks, one that was our fault (well, mostly mine) and one that existed from JJ2's beginning but became a lot more problematic when AngelScript started invoking it a lot. We also fixed several other bugs, added some new settings, and added a handful of global multiplayer-oriented properties to AngelScript, but the big news probably is the memory leak plugging. Or maybe not? <a href="http://www.jazz2online.com/jj2plus/plus-readme.html#lc020413">You can find the full list of changes here.</a>

(<del>Don't expect the next release so soon unless there's something obviously wrong with this one, which we really hope there isn't.</del> <ins>LOLNOPE</ins> There are some big things we want to add, and that takes time.)

cooba
Feb 5, 2013, 02:52 AM
Bump for the JCF frontpage...

Superjazz
Feb 5, 2013, 04:01 AM
The ready-start feature is broken somehow:

[14:18:06] -t3>CJ: /readystart on
[14:18:06] *** -t3>CJ is READY!
[14:18:08] -t3>CJ: /readystart off
[14:18:08] *** -t3>CJ is READY!

It worked fine in my own server, but once Zeal servers got updated, I couldn't toggle the feature on/off as a remote admin in any case, it only displayed the ready-text above(without getting me ready of course.)

DanZeal set the feature to default to true in plus.inis. However, the zeal servers themselves also have /idleserver on by default, whenever started/restarted. This mode seems to break the feature for the players because the game counts the non-spectated idleserver as a player participating, so until the server types /ready as well, the game won't start. However toggling idleserver off/on once in each zd seemed to fix the problem, because it made the server hide itself from the playerlist and it finally didn't count as a participant. Typing /ready as a server didn't work anymore.

Anyway, it's not a very urgent fix as logical.

MrAlextov
Feb 5, 2013, 06:47 AM
Please. Do you can fix that bug when running JJ2+ in wine that usually when cycling level it crashes?

DennisKainz
Feb 5, 2013, 06:58 AM
From now on I will only download Angel Scripted levels!

You can make hail from a little ball sprite and the Ice Bullet object, make the whole room turn red when you get hurt, set the maximum weapons to 10, set the Tuf Turt's health to 32 ... the possibilities are unlimited!

Violet CLM
Feb 5, 2013, 01:35 PM
<a href="http://www.jazz2online.com/jj2plus/plus.zip">Build 2013-02-05, the minorest of minor updates!</a>
Fixed bug in the <code>/readystart</code> command where the server would not consider itself idle if it began hosting in Idle Server mode.
Fixed bug of the <code>/cstop</code> command's countdown being reinterpreted as a <code>/cstart</code> countdown if the game ends (e.g. by someone making a score) before the countdown runs out.
Fixed bug where remote admins would be falsely announced as ready instead of receiving an error if the <code>/ready</code> command wasn't typed correctly.
All changes are server-side, so if you literally never host, you don't strictly need this update (though you might as well). Now, for serious, no more bugs please.

minmay
Feb 5, 2013, 05:52 PM
Please. Do you can fix that bug when running JJ2+ in wine that usually when cycling level it crashes?
Every Wine crash I've discovered goes away if you remove bass.dll (delete/rename/move it, whatever) and disable the chatlogger.

GLaDOS
Feb 6, 2013, 12:16 AM
Please. Do you can fix that bug when running JJ2+ in wine that usually when cycling level it crashes?

This (http://www.jazz2online.com/jcf/showpost.php?p=467466&postcount=10) is the solution I am using, works perfectly for me. It seems to be some combination of TSF/Plus/Bass code that Wine just doesn't like very much.

cooba
Feb 6, 2013, 04:09 AM
TNT is no longer able to destroy blocks at allI've got this identified: this is true, but only in TSF.

Sorry for not looking into this two updates earlier, or something. v:7v

DennisKainz
Feb 6, 2013, 04:29 AM
I'm eager to upload some levels made with JJ2+ and AngelScript, but I'm still blocked because of my spam uploads. I sent a message to 3 of the admins, but I got no response yet.

Which is the procedure to follow if I want to be able to upload levels again?

Stijn
Feb 6, 2013, 04:31 AM
The procedure is to wait until one of the admins replies to your PM

Jerrythabest
Feb 6, 2013, 12:25 PM
I've got this identified: this is true, but only in TSF.

Sorry for not looking into this two updates earlier, or something. v:7v

Huh. How the heck did we break that? Funny how things that work precisely the same in 1.23 and 1.24 from the outside, turn out to work differently inside. Sigh.

Violet CLM
Feb 6, 2013, 12:29 PM
Huh. How the heck did we break that?
startup.cpp, line 6984 would be my guess.

Jerrythabest
Feb 6, 2013, 02:36 PM
Yes, fixed. Change the 0x24 to 0x20.

plunK
Feb 6, 2013, 03:12 PM
This is absolutely amazing. I'm definitely going to look into making some cool AngelScript codes.

Anyways, suggestions:

-the Ability for JCS to load and run through JJ2+
-the Abiltiy to create new coloured gems, with customizable gem values
-keep being awesome

minmay
Feb 6, 2013, 07:24 PM
-the Ability for JCS to load and run through JJ2+
Assuming you're using Plusifier rather than manually injecting the DLL every time (eech!) you can just name the result Jazz2.exe. JCS will use it then, as will things like CaptainCook. Renaming the original Jazz2.exe to, say, Jazz2notplus.exe, won't break anything.

Random idea: onTrigger function. As in, call it when the trigger is turned on (but not for remaining on). Maybe split into onTriggerOn (call when turned on), onTriggerOff (call when turned off), onTriggerSwitch (any change). You can imitate this with existing capabilities of course but it's a bit cumbersome and I'm worried about checking too many conditionals every frame (what if we go up to 256 trigger IDs some day?), though I suppose that probably isn't a concern nowadays.

minmay
Feb 6, 2013, 10:12 PM
There is a major regression in the latest update. Applying a palette in a level with many animated tiles can cause a crash. This does not occur with the Jan 28 version. The behavior seems to be random, but it usually happened within 70 calls in the level I was using.

Demonstration (http://www.cowmuffins.net/stuff/___tests.zip)
___test.j2l almost always crashes, ___test2.j2l never crashed (it has most animated tiles removed). Removing the destruct scenery events from the animated tiles did not change anything, but removing the tiles did. Editing jjPalette directly is not the culprit either (tried a new one, didn't help).

Maybe a bug tracker of some sort would be a good idea?

Jerrythabest
Feb 7, 2013, 01:06 AM
Weirdest. Bug. Ever. It doesn't really crash, it just hangs at the palette.apply() call.

DennisKainz
Feb 7, 2013, 01:20 AM
if with "hangs" you mean that it breaks, the call is "jjPalette.apply()" as far as I remember.

Unless with "palette" you meant the generic use of this word...

Jerrythabest
Feb 7, 2013, 01:27 AM
I did mean to say "jjPalette.apply()". But it doesn't matter much, either way it hangs on the apply() method in the jjPAL class.

I've found the line of code that causes this. Let's see what we can do about it.


EDIT: For now, a workaround to avoid the problem is to use 8-bit color mode in problematic levels. This way you can continue building your level while we prepare a patch ;)

Seren
Feb 7, 2013, 01:50 AM
Random idea: onTrigger function. As in, call it when the trigger is turned on (but not for remaining on). Maybe split into onTriggerOn (call when turned on), onTriggerOff (call when turned off), onTriggerSwitch (any change). You can imitate this with existing capabilities of course but it's a bit cumbersome and I'm worried about checking too many conditionals every frame (what if we go up to 256 trigger IDs some day?), though I suppose that probably isn't a concern nowadays.
I'm pretty sure that JJ2 doesn't contain onTrigger() itself, so to add it, JJ2+ would just have to check for those "too many conditionals every frame" on its own and it wouldn't be any faster. However, it's worth noting that there's no reason this would be slow at all, as all you have to do is check current trigger state (JJ2 array) and previous trigger state (custom array you should update manually) for every trigger. So, check state of two booleans in a for() loop that repeats 32 (or, in your "some day" scenario, 256) times. By my estimation, this won't slow the game down by more than 1.0*10<sup>-20</sup> fps. In other words: it's not cumbersome, it gives your script approximately up to 6 more lines, and you shouldn't worry about speed issues, there's no way this would slow the game down.

Slaz
Feb 7, 2013, 02:05 AM
Wakeman curiously clicked a checkbox back in '98..
Only to see the results almost 15 years later! :p

JJ2+, play old levels the way they're meant to be played.. 8D

http://img829.imageshack.us/img829/7396/pluseluminate.png

Jerrythabest
Feb 7, 2013, 03:30 AM
I'm pretty sure that JJ2 doesn't contain onTrigger() itself, so to add it, JJ2+ would just have to check for those "too many conditionals every frame" on its own and it wouldn't be any faster. However, it's worth noting that there's no reason this would be slow at all, as all you have to do is check current trigger state (JJ2 array) and previous trigger state (custom array you should update manually) for every trigger. So, check state of two booleans in a for() loop that repeats 32 (or, in your "some day" scenario, 256) times. By my estimation, this won't slow the game down by more than 1.0*10<sup>-20</sup> fps. In other words: it's not cumbersome, it gives your script approximately up to 6 more lines, and you shouldn't worry about speed issues, there's no way this would slow the game down.

In fact I think we can do this roughly the same way as with the Text events: when they get activated, we call a specific AngelScript function. That wouldn't require checking all triggers every gametick. This is a planned feature, we just haven't gotten to the point of implementing it.

Seren
Feb 7, 2013, 07:51 AM
the Abiltiy to create new coloured gems, with customizable gem values
I was testing in hope to find a variable that does it already. I failed, but to those curious what happens if you set var[0] to -4672:
http://img836.imageshack.us/img836/5543/need1up.png

minmay
Feb 7, 2013, 08:15 AM
Weirdest. Bug. Ever. It doesn't really crash, it just hangs at the palette.apply() call.
For me sometimes it would outright close, actually (sometimes it would just hang, too). Should have mentioned that. Hey, it was 12 minutes after midnight.

And yeah, it's not game-breaking, not like palettes ever affect gameplay to my knowledge :P

Jerrythabest
Feb 7, 2013, 09:37 AM
Yea, I've seen it doing that too. It just disappears into nowhere.

Shelly
Feb 7, 2013, 06:42 PM
I am so glad to see that Get Me R was finally implemented into JJ2+!, Good job and see you in the next one c:

Toni_
Feb 8, 2013, 04:12 AM
^ there's a bug, like in GMR v4.0. If you jump on spring, and press type /ready while you are in the air, you will jump above the base. If you're in a sucker tube and type /ready, you will move from the base, like it's one tile sucker tube.

There's still one bug, like in previous versions. Not sure if it's possible to fix, and how, but do your best! If you put warp target above the vine, this will happen:

http://img195.imageshack.us/img195/5256/warpbc.png

Violet CLM
Feb 8, 2013, 04:06 PM
Both easy enough to fix, although I've always been attached to the second one, so I don't really want to...

minmay
Feb 8, 2013, 08:52 PM
I've always been attached to the second one
ditto, i hear ya bro :lori:

Grytolle
Feb 9, 2013, 10:07 AM
That should stay!

Seren
Feb 11, 2013, 01:30 AM
Add OBJECT::ENEMYBULLET=20.

Turns out it's used by all sorts of hazardous projectiles spawned by SP enemies. Dragons' breathe, Monkeys' bananas, Witch's spell, Devan's gun bullets, Devil Devan's fireball, etc.

cooba
Feb 11, 2013, 01:36 AM
Objects <= 20 are given special treatment as bullets, so it's on the list, but the problem is that it doesn't have any defined properties at _all_. And since you can't currently set an object's behavior function in AS, allowing people to create it wouldn't do any good.(emphasis on "currently", probably)

GLaDOS
Feb 13, 2013, 04:31 AM
Add OBJECT::ENEMYBULLET=20.

Turns out it's used by all sorts of hazardous projectiles spawned by SP enemies. Dragons' breathe, Monkeys' bananas, Witch's spell, Devan's gun bullets, Devil Devan's fireball, etc.

Object 20 is not only used by enemy projectiles, pepper spray bullets also use it, which would make it even more useful to get proper access to.
I assume the "behavior function" Violet mentioned refers to a function pointer inside the object structure that is called every tick. If that is the case, wouldn't it be sufficient to find all suitable functions from the various object types that use it and assign an enumerator to each of them? Then, just give the AS API a property of that enum with setter/getter functions that automatically convert from enum values to function pointers and back.

Seren
Feb 13, 2013, 04:48 AM
Object 20 is not only used by enemy projectiles, pepper spray bullets also use it, which would make it even more useful to get proper access to.
Oh, you're right. I had assumed pepper spray uses the same eventID as fireball.

But hey, that's not all! Object 20 is also used by the shock wave created by RF missiles. That'll cause trouble with naming it properly.

Violet CLM
Feb 13, 2013, 12:08 PM
I assume the "behavior function" Violet mentioned refers to a function pointer inside the object structure that is called every tick. If that is the case, wouldn't it be sufficient to find all suitable functions from the various object types that use it and assign an enumerator to each of them? Then, just give the AS API a property of that enum with setter/getter functions that automatically convert from enum values to function pointers and back.
All correct, but there are a lot of them. We're figuring out how best to handle the behavior issue, floating around various approaches.


Out of curiosity -- what would people like to know about what we're doing? There was a while where we were posting teaser pictures on J2O, until people started complaining there were too many of them and other stuff like that. Now we're mostly silent except for occasional reassurances like "we know about this" or "we'll think of something." Are either of those options preferable? (With pictures presumably not on the J2O front page anymore.) Or full on development blogs? Keep in mind that I'm not saying we'll necessarily do what the majority support, but it would be nice to have some sense of where people stand on this issue.

GLaDOS
Feb 13, 2013, 12:39 PM
So, I've been running into another problem... I need to set a bunch of tiles (the same pattern several times across the level, but independently controlled) in a foreground layer, but the "tile cache" is getting in the way. Is it technically possible to add the option to allocate additional tile cache entries that jjTileSet() will then use?
Perhaps adding a function like jjAddTileCacheEntry(uint8 layer, int xWord, int y) would be the most convenient way to do it. It would copy the cache entry into a newly allocated one and change the cache reference of the tile to the new entry. That is, if it is possible to increase the tile cache's size, either dynamically whenever the function is called, or, if that is not possible, by a predefined maximum number when loading the level.

EDIT in response to Violet:
A development blog with relatively condensed info about upcoming features would be nice (along with maybe a bug tracker and some place for suggesting stuff :p ), if it doesn't take away too much time from actual development.

DennisKainz
Feb 13, 2013, 12:58 PM
This of JJ2 PLUS with AngelScript is a great occasion for unfinished episodes like "Jazz Unleashed", "Tomb Rabbit 2" and "Dreamscape" to REALLY amaze us when finished!

Stijn
Feb 13, 2013, 01:24 PM
I don't think those will ever be finished

cooba
Feb 13, 2013, 01:28 PM
Well, Dreamscape might.

GLaDOS
Feb 14, 2013, 03:50 AM
Quick question, does setting p.xOrg and p.yOrg have any effect in multiplayer at all? It doesn't seem like they work for me, the player just respawns at the MP Start / Jazz Start event.

Grytolle
Feb 14, 2013, 05:21 AM
And not the same spawn pos as the previous time?

GLaDOS
Feb 14, 2013, 06:09 AM
The xOrg/yOrg variables seem to reset themselves to the usual start pos event on death. If you meant that I might have set the spawn point to the same position as the Start Pos event, that is not the case.

On an unrelated note, is the dev team considering adding access to the player input bitfield? (PlayerStruct + 0x584 if I recall correctly, at least for TSF)
It's one of these things that would allow for some very interesting gimmicks in scripted levels.

(on an even less related note, perhaps I should move my suggestion/implementation spam into a dedicated thread to make more space for bug reports/help requests/compliments in this thread, I have many more to make and I would really like to contribute to JJ2+'s script API)

Violet CLM
Feb 14, 2013, 10:47 AM
Quick question, does setting p.xOrg and p.yOrg have any effect in multiplayer at all? It doesn't seem like they work for me, the player just respawns at the MP Start / Jazz Start event.
They were a pretty last-minute addition to the API, so I don't really know -- the description in the .html doc may not even be correct -- if that's the behavior you're getting, that's probably what happens.
On an unrelated note, is the dev team considering adding access to the player input bitfield? (PlayerStruct + 0x584 if I recall correctly, at least for TSF)
It's one of these things that would allow for some very interesting gimmicks in scripted levels.
Controller input is definitely something that should be exposed to AngelScript somehow; we just need to figure out the most helpful way of doing that, first.
(on an even less related note, perhaps I should move my suggestion/implementation spam into a dedicated thread to make more space for bug reports/help requests/compliments in this thread, I have many more to make and I would really like to contribute to JJ2+'s script API)
No, that's what this thread is for.

GLaDOS
Feb 14, 2013, 12:18 PM
They were a pretty last-minute addition to the API, so I don't really know -- the description in the .html doc may not even be correct -- if that's the behavior you're getting, that's probably what happens.
I guess they only work with SP checkpoints, then. The reason I asked is because I thought I might have been doing something wrong (forgetting to call some function or w/e). Currently working around it using warping, it's not really an issue; it could at most be a bit confusing to newcomers to JJ2+ scripting.

Controller input is definitely something that should be exposed to AngelScript somehow; we just need to figure out the most helpful way of doing that, first.
An int/enum with bit values would give the most control/efficiency while a bitwise set/get function pair would be the easiest to use. Perhaps both could be implemented? There are already quite a few things that can be achieved in multiple ways using both properties and helper functions.

No, that's what this thread is for.
Okay then. It just sometimes felt like a few posts were left unread because all different kinds of posts are mixed into one thread, with different discussions going on at once.

------

Unrelated edit:
Is there any reason why the invincibility variable of jjPLAYER objects other than the local players cannot be read? It would be pretty useful to at least have read access to the blinktime of other players.

Violet CLM
Feb 16, 2013, 09:38 PM
Is there any reason why the invincibility variable of jjPLAYER objects other than the local players cannot be read? It would be pretty useful to at least have read access to the blinktime of other players.
Two-part answer:
1) Invincibility and blinktime are separate properties, the one of which is exposed to AngelScript and the other of which is not.
2) Player objects have far, far more properties than you see in AngelScript, not all of which are of much use; the current collection was chosen somewhat haphazardly, and we're figuring out which ones shouldn't have been left out as we go along.

GLaDOS
Feb 17, 2013, 02:06 AM
Two-part answer:
1) Invincibility and blinktime are separate properties, the one of which is exposed to AngelScript and the other of which is not.
That's interesting, I didn't know that was the case.


2) Player objects have far, far more properties than you see in AngelScript, not all of which are of much use; the current collection was chosen somewhat haphazardly, and we're figuring out which ones shouldn't have been left out as we go along.
With the enormous size of the player structure, having to leave out a lot of the properties is understandable. I just hope that the properties/functions that are being suggested will eventually be added to the API.

Edit:
calm down and sit on your ass
Seriously? I asked about opening a separate thread for my suggestions in case this thread was spammed by me with suggestions too much, and I offered to help out with improving JJ2+'s AngelScript API (C++er here), but it does not seem like anyone of the dev team is interested in letting me help. Now the only way to contribute is for me to suggest features and their implementations in this thread, the reason I am posting so many in such a short time is because I am working on a relatively large multiplayer project using AS right now. So, instead of tolerating or at least ignoring the fact that someone here is trying to help the developer team make the AS API more feature-complete despite not being part of the team, this kind of complaint is the response I get?
Receiving random unbased hate from members who stay anonymous is easily one of the most demotivating things about posting on JCF; this is a case of complete anonymity just making things much worse.

Edit 2: Above rant on reputation is now invalid; reputation system has since been improved. Doesn't make the person who gave it to me less of an idiot though.

Foly
Feb 20, 2013, 11:28 AM
I've looked to the apple's objType property and i found some usefull stuff some of you might want to know and some of you might already know:

objType value: Behaviour
0: Hurt + Blocks Bullets
1: Hurt + Destroy
2: Hurt + Destroy
3: Untakable
4: Untakable (Goes here when eaten)
5: Eatable (Normal State)
6: Not able to change to this state
7: Untakable
8: Blocks bullets
9 - 14: Untakable

Untakable: The player can't take this and doesn't interact with it.
Hurt: The player get's hurt by the apple.
Blocks Bullets: Bullets are destroyed by the apple (all hail the mighty apple).
Destroy: Object gets destroyed when a player touches it.

Also, the apple can still be shot down with tnt (unless its in a masked tile) but not with normal blaster bullets (unless objType is 5).

I don't know if these changes in objType work with other objects (it probably will with other fruits). The use of this is to let the apple be a dummy object where you can change behaviour of it: i.e. make a throwable bomb that doesn't hurt the player when touched.

cooba
Feb 20, 2013, 12:01 PM
This does explain some of this stuff blur wrote:
typedef enum oooTYPES {
oNORMAL, oPLAYERBULLET, oENEMYBULLET, oPARTICLE, oEXPLOSION, oPICKUP, oWAITPICKUP, oHURT, oSPECIAL, oDYING, oSPECIALDONE, oSELFCOLLISION, oTYPES=15, oENEMY=16, oTRIGGERTNT=32, oALWAYSACTIVE=64
} oooTYPES;

I don't know if these changes in objType work with other objects (it probably will with other fruits).Absolutely. For example, most enemies use oNORMAL+oTRIGGERTNT+oENEMY for their objType.

Violet CLM
Feb 20, 2013, 12:13 PM
I know one of them -- possibly oSELFCOLLISION -- is what's used by turtle shells to determine whether an object should be bounced off of or not. oSPECIAL is a tricky one that means that the object has potentially unique behavior in response to a) being hit by a bullet or b) being collided with a player, behavior which must be defined separately for each oSPECIAL object. oTRIGGERTNT does what it sounds like; oALWAYSACTIVE means the object isn't deactivated when it's more than ~30 tiles away from the player in single player. oPARTICLE, oWAITPICKUP, oHURT, oDYING, and oSPECIALDONE I know less about.

Meanwhile, I know nothing at all about "doesHurt," and have only a limited understanding of "noHit."

minmay
Feb 20, 2013, 07:16 PM
oALWAYSACTIVE means the object isn't deactivated when it's more than ~30 tiles away from the player in single player.
Out of curiosity, are there any objects that actually have this?

Violet CLM
Feb 20, 2013, 07:32 PM
for (uint8 i = 1; i < 255; ++i)
if (jjObjectPresets[i].objType & 64 == 64)
jjPrint(formatInt(i, "1"));
Rotating Rock, Bridge, and all the shootable pole events. Not sure why bridges mustn't get deactivated, but the others are pretty intuitive.

cooba
Feb 20, 2013, 11:54 PM
Also, Bees, for no reason at all.

minmay
Feb 22, 2013, 11:48 PM
Hahaha, is that why the Hocus levels had to leave Bees off of some of the spikes?

Violet CLM
Feb 23, 2013, 09:41 AM
Too many objects, yea.

Jett
Feb 25, 2013, 03:29 PM
Here are my new suggestions for plus.

Ability to stand on walls, aka sideways gravity or sticky feet
Mute all, meaning both sound and music with one click

minmay
Feb 25, 2013, 09:10 PM
Going to go ahead and ask this here.

Could users be given access to at least some BASS functions? Not sure which ones are too big a security risk, but I'm particularly interested in BASS_ChannelSetPosition, BASS_ChannelSetAttribute, and BASS_SetConfig (only to set buffer length).

I ask because I'd like to have levels with "dynamic" sound or music. For example, smoothly switching to different music when overtime starts, or Sudden Death in the EGFP update (I SWEAR I AM DOING THIS).

Or, for an example that almost anyone can do, playing ambient noise depending on the player's location in a level - splashing waves that get louder as they get closer to the water, sparking noises near those electric...things in Tubelectric, etc. The Ambient Sound event can only handle so much.

Of course if it's too dangerous or not cool enough or BASS was incorporated into JJ2+ in a way that makes this non-trivial to add, I totally get that, no sweat

(you're sure you still want to allow feature requests in this thread? =P)

Violet CLM
Feb 25, 2013, 09:32 PM
Ability to stand on walls, aka sideways gravity or sticky feet
Complexity far outweighs utility, sorry. Reverse gravity is essentially finding a lot of values to change the signs of; sideways gravity takes a lot more thought and I don't see anyone ever using it.
Mute all, meaning both sound and music with one click
I really don't think two separate menu options (assuming that's what you're talking about) is an insurmountable hurdle to user enjoyment.

Could users be given access to at least some BASS functions? Not sure which ones are too big a security risk, but I'm particularly interested in BASS_ChannelSetPosition, BASS_ChannelSetAttribute, and BASS_SetConfig (only to set buffer length).
Only replying to this because I'm posting anyway; I know absolutely nothing about BASS, but cooba and Torkell seem to know more, so hopefully we'll have some internal discussion of this.
Or, for an example that almost anyone can do, playing ambient noise depending on the player's location in a level - splashing waves that get louder as they get closer to the water, sparking noises near those electric...things in Tubelectric, etc. The Ambient Sound event can only handle so much.
The jjSample AngelScript function has parameters for position and volume, so I think that one's already covered, yes?
(you're sure you still want to allow feature requests in this thread? =P)
Of course! Keeping in mind we're not guaranteed not to ignore certain requests.

cooba
Feb 25, 2013, 11:27 PM
Mute all, meaning both sound and music with one clickI really don't think two separate menu options (assuming that's what you're talking about) is an insurmountable hurdle to user enjoyment.I did think this would be a pretty handy option to have, since I rarely mute only music/sound but not the other, and -nosound is impossible to turn off in-game.

minmay
Feb 25, 2013, 11:28 PM
The jjSample AngelScript function has parameters for position and volume, so I think that one's already covered, yes?
Well, I was thinking of using custom sound effects - the way I was thinking of using it, they'd each be a channel or two in a MO3, and I'd adjust the volume based on the player's position. (Definitely not thinking of using multiple files here - in fact one reason I wanted access to ChannelSetPosition was to switch between several similar themes in the same module and not need to store the samples multiple times by spreading those themes across several files.)

Of course, support for user-provided sound effects may not actually be desirable at all.

Jerrythabest
Feb 26, 2013, 05:23 AM
minmay, once I finish my current workings (to the Plus dev team known as the "hellfunction"), I will look into BASS. I've scrolled through its API already some week ago. Doesn't look all that difficult.

Seren
Feb 28, 2013, 11:33 AM
Info about noHit:
It appears to be a property used only by objects whose objType&oTYPES==oNORMAL (so in numbers, objType&15==0). It handles those objects' interactions with players' bullets. The way it works reminds objType.

0=on collision with a bullet decrease own energy and destroy the bullet unless it's fireball
1=ignore all bullets
2=destroy bullets except for pepper spray
3=destroy bullets except for pepper spray and fireball (it can also execute special actions if they're defined for the object)
+4=cause ricochet
+8=treat freezer bullets as regular bullets (if off, the object will always get frozen by freezer bullets)
+16=don't get pushed back by TNT

That's all there is to it, no object uses values higher than 31 and it doesn't seem they would cause any different effects.

Violet CLM
Feb 28, 2013, 12:30 PM
Oh, awesome. I think the pepper spray thing might be a mistake that I introduced?, but otherwise, that's great to know.

Seren
Feb 28, 2013, 01:01 PM
Oh, it looks like that's true. Objects treat pepper spray as a normal bullet in vanilla JJ2 but apparently not in the latest Plus release.

minmay
Feb 28, 2013, 05:38 PM
If you break survivor28 I'm gonna be so mad

Jett
Mar 1, 2013, 12:31 PM
Some, or a lot actually, music files don't work with plus, specifically 669 modules

sonicnathan 1
Mar 8, 2013, 01:36 AM
Great job. I look forward to seeing what the community is going to do with these new additions.

Seren
Mar 8, 2013, 05:50 AM
It's annoying that division by 0 causes an error even in case of floats. I found a workaround for declaring infinity (<code>const float INFINITY=1.0e+39;</code>), but, besides the fact it looks ugly, there are cases when division by 0 is more appropriate or shortens code, and I still didn't find a way to declare a NaN if I can't use <code>0.0/0.0</code>.
I don't know if it can be fixed but I would be thankful if it were taken care of.

Stijn
Mar 8, 2013, 06:42 AM
...when would you ever want to divide by zero? What should the result of such a division be? Even if the result of a division by zero was infinity (it isn't), how would you use the concept of "infinity" in a scripting context?

Seren
Mar 8, 2013, 07:04 AM
it isn't
Oh, I do realize it isn't in math, but C++, which I believe AS is based on, does return infinity on division by 0. Floats can also keep positive and negative zero and the sign of infinity depends on the sign of zero (which is basically the only difference between +0 and -0). Usually, infinity is declared as <code>1.0/0.0</code>, minus infinity as <code>-1.0/0.0</code> and NaN as <code>0.0/0.0</code>. Division by ±infinity returns ±0 (and this part actually works correctly in AS). There are various forms of use for infinity and NaN. Or so I assume, because if there weren't, floats wouldn't be able to store them, right? Personally, I'm using them for min(), max(), mean() and median(), each of which is meant to have 2 or more arguments, and declaring them as <code>double min(double x1,double x2,double x3=INFINITY,double x4=INFINITY,...)</code> or <code>double mean(double x1,double x2,double x3=NaN,double x4=NaN,...)</code> was the best idea I was able to come up with.

Also, infinity, minus infinity and NaN work just fine in comparisons.

GLaDOS
Mar 8, 2013, 10:03 AM
Oh, I do realize it isn't in math, but C++, which I believe AS is based on, does return infinity on division by 0.
This is implementation-dependent. I get a floating point exception when trying to perform a division by zero, using GCC.

Personally, I'm using them for min(), max(), mean() and median(), each of which is meant to have 2 or more arguments, and declaring them as <code>double min(double x1,double x2,double x3=INFINITY,double x4=INFINITY,...)</code> or <code>double mean(double x1,double x2,double x3=NaN,double x4=NaN,...)</code> was the best idea I was able to come up with.
AS allows function overloading, meaning you can have multiple functions with the same name only separated by their parameter types or counts. For example, you can do something like this: double minGeneric(array< double > numbers) // Weird spacing because JCF insists on parsing HTML even within code tags
[ algorithm goes here ]

double min(double x1, double x2)
{
return minGeneric({x1, x2});
}
double min(double x1, double x2, double x3)
...
double min(double x1, double x2, double x3, double x4)
...
Not sure if the code is going to work exactly like that, it's been a while since I actually did something with AngelScript.

Seren
Mar 8, 2013, 10:35 AM
Oh I know about that, I had considered this option too, but, to be honest, I dislike it. It just doesn't look good and adds many additional lines. I really feel default arguments are aesthetically better in this case. And they work too, at least in case of min(), max() and median(), because mean() won't work so well with infinity and I didn't find a way to get NaN yet. Edit: Oh wait, I can get it by multiplying 0 by infinity. Cool.

Violet CLM
Mar 8, 2013, 10:44 AM
These are things to take up with AngelCode, not with us.

Seren
Mar 8, 2013, 11:00 AM
Ow, that's what I was worried about. And even worse, I just found out AS returns true in <code>NaN==0</code> comparison, so it's more or less useless (you might think this means it's actually 0 rather than NaN, but then I doubt formatFloat() would return "-1.#IND"). While whether division by 0 is useful or not is arguable, NaN being equal to 0 is certainly something that should get fixed, since it's a value that's supposed to return false even in <code>NaN==NaN</code>. I'll try to get in touch with whoever is in charge of AS.

Jerrythabest
Mar 8, 2013, 12:11 PM
Isn't it easier to write a min() function that takes an array as its argument? Then you could just do this (untested code, have never worked with AS arrays myself):
double min(array&lt;double&gt; &amp;arr){
arr.sortAsc();
return arr[0];
}

Violet CLM
Mar 9, 2013, 12:08 AM
I'll try to get in touch with whoever is in charge of AS.
<a href="http://www.gamedev.net/forum/49-angelcode/">Go here</a> and post a topic. In my experience, Andreas is relatively quick to respond (taking into account timezone differences) and quite understanding.

I notice that AngelScipt got another release on Tuesday. We should probably remember to incorporate that, if for no other reason than those sexy binary literals.

Quintocle
Mar 17, 2013, 09:20 PM
It would be nice if Limit X Scroll had an Instant parameter for instantaneously scrolling to the specified targets upon activation.

Violet CLM
Mar 17, 2013, 11:08 PM
It actually can't. There's no room in the bitfield for any more parameters.

Quintocle
Mar 18, 2013, 10:50 AM
Unfortunate.

cooba
Mar 18, 2013, 11:29 AM
I'm sure p.cameraFreeze and p.offsetPosition can do whatever you want to do with Limit X Scroll.

Jerrythabest
Mar 19, 2013, 10:50 AM
Although there is no other option in this case, we should not forget that not everyone has the programming knowledge to use AngelScript.

Therefore, I would also like to point out that the non-scripting folks out there should not hesitate to do feature requests like this ;)

Quintocle
Mar 21, 2013, 02:39 PM
What I wanted to accomplish is the player seeing what appears to be the edge of the level lower down, but 20 tiles or so higher not being able to see the edge of the level.

Something like this:
http://img855.imageshack.us/img855/7889/battle2u.png
The problem is if the player moves to the left fast enough after activating the LimitXScroll they can see the level scrolling.

Foly
Mar 23, 2013, 07:51 AM
A few more things i'd like to see in the new plus (angelscript):
1. A function or property to see if a player has died for ALL players. For example a function onPlayerDeath(int playerID) or a property jjPlayers[pID].isDead (which could be true for a small time or untill the player has spawn).
2. Being able to change the jjPlayers[pID].flag variable.
3. A property jjPlayers[pID].name that shows the name of the player as string.
4. An option for the server to execute a plus command but without the line showing up in the chat (now you can use jjChat("/something") but it gives spam)

Most of it you have probably already thought of but if you didn't, here you go :)

Jett
Mar 31, 2013, 07:01 PM
Ok, here's just another suggestion, after mute all.
A new icon for plusified JJ2 and related shortcuts could improve the program's presentation.

Violet CLM
Apr 7, 2013, 03:03 PM
The behavior described in this post, aside from the first bullet point, is pretty clearly a bug. In fact it's very easy to fix, to the point that you can fix it yourself by changing byte 0x4C543C (in 1.23) to 01 instead of 00. The question: is this a <em>useful</em> bug that should be left in, or is it just too silly and arbitrary to live? Your opinions, please.

Grytolle
Apr 8, 2013, 02:47 AM
Just give level makers the ability to remove the bug temporarily through .j2s imo!

Jerrythabest
Apr 8, 2013, 05:32 AM
Unless there are some popular levels using this bug, that can't be fixed by a simple AngelScript file, I'd say: fix the bug. Most of its behaviour is silly IMO.

burnout92
Apr 17, 2013, 11:54 AM
Hi guys! I have a problem with the Plus. I enable the Always Run mode only just me run always (I play with keyboard) my brother (he play with joystick) isn't run always if only he press the Run button.

Violet CLM
Apr 17, 2013, 01:03 PM
Ooh, joysticks. Thanks, will look into it.

burnout92
Apr 17, 2013, 01:07 PM
Instead I thank you. :D

FihuFiL
Apr 19, 2013, 09:50 AM
I had trouble running this version of JJ2 under Wine 1.5 on Ubuntu 12.04.
Sometimes this happen:
http://img819.imageshack.us/img819/8196/zrzutekranuz20130419194.png
ofc I have "Hardware Acceleration" and "MMX Capabilities" disabled on JJ2.

Wine debugger shows this when Access Violation happen:

err:seh:setup_exception_record stack overflow 1296 bytes in thread 0009 eip 7ea124c4 esp 00230e20 stack 0x230000-0x231000-0x330000
wine: Unhandled page fault on read access to 0x00000000 at address 0x4a0a62 (thread 0037), starting debugger...

Violet CLM
Apr 19, 2013, 10:15 AM
Hmm. I'm about 95% sure you're running TSF there, because that error would make no sense for 1.23. For TSF, it means something's going wrong while initializing the galaxy sound system. Can you comment any more on under what circumstances this happens? Are you opening JJ2, or playing specific music files, or what?

FihuFiL
Apr 19, 2013, 11:02 AM
I just set up a simple minimized server(gamemode: pest) with default 3 battle levels. And it happen while cycling on random lvls. (I tested it when window is not minimized it happen too while level cycling)
Like:
"Press fire to continue"
>Hitting space
"Access violation"

EDIT: Yes I'm running 1.24 for sure.

burnout92
Apr 19, 2013, 11:51 AM
FihuFil. You tried with sequence level cycling? Or a different gamemode?

Violet CLM
Apr 19, 2013, 03:11 PM
Does any given level either crash JJ2 or not crash JJ2, every time you try cycling to that specific level? Or does it seem random?

Stijn
Apr 19, 2013, 03:47 PM
During the bash (the only occasion on which I have played JJ2+ in quite a while) I would randomly crash during level cycling as well, and I think several other people in the server had the same problem. I don't think it was a level-specific thing.

It was an Access Violation crash, though sadly I forgot to make a screenshot of the exact error. I was using 1.23.

minmay
Apr 19, 2013, 10:10 PM
I get that crash on virtually every level cycle (as well as often when joining a server or exiting to the menu) but always assumed it was just a Wine problem. It doesn't always appear as an access violation (sometimes it does, sometimes everything just closes, sometimes the screen freezes black, and I never get useful console output).

Violet CLM
Apr 19, 2013, 10:47 PM
During the bash (the only occasion on which I have played JJ2+ in quite a while) I would randomly crash during level cycling as well, and I think several other people in the server had the same problem. I don't think it was a level-specific thing.

It was an Access Violation crash, though sadly I forgot to make a screenshot of the exact error. I was using 1.23.
I get a stack overflow not infrequently from cycling with 1.23, but it's in a different function. (Though still, I hasten to point out, in native code.) Maybe I should try 1.24 and see if I can get FihuFil's error in Windows.

Foly
Apr 19, 2013, 11:07 PM
When I host levels in 1.23 and cycle it also crashes sometimes. I don't remember if it haphened before the new plus but since i've been working on a new level lately i noticed it more. It usually haphens more when i hit the space bar quicker to skip to the next level. It's probably the same stack overflow as violet got but still if you want i can post the error.

burnout92
Apr 19, 2013, 11:14 PM
I think better the Windows for 1.24 than the Linux because on my computer doesn't start JJ2:TSF with a Access Violation error crashed and throw back to the Linux.

Violet CLM
Apr 19, 2013, 11:31 PM
burnout, can you share that access violation? I know they look opaque to the point that they once got JJ2 included on a list of awful error messages, but they can be kind of useful to us from time to time.

burnout92
Apr 19, 2013, 11:59 PM
Sorry I don't share for you the Access Violation message but I will try later and if I got a Access Violation message then I can share for. But I think similar the Access Violation that I got.

Grytolle
Apr 21, 2013, 05:25 AM
I get these almost every day :p



AV @ 468803, by attempting to read from 80

DS=23
ES=23
FS=3B
GS=0
CS:EIP=1B:468803
SS:ESP=23:12FB40
SS:EBP=23:12FB70

EAX=0
EBX=3C6927D
ECX=20
EDX=80
ESI=0
EDI=3C68FFD
EBP=12FB70


I was using TSF+ and I have marked the addresses that are in the plus.dll range


Edit: The AV occurred when the server cycled from "|||Tropicana |Bay" - Cracco WoC7.j2l to "The Tale Of Moo: An Epic Story" - Cracco WoC8.j2l, but I doubt that that matters.


Edit2: It might be a good idea to let user enable some kind of automatic reporting of AVs

Jerrythabest
Apr 21, 2013, 11:54 AM
I have in fact already been thinking about how we could give the AV window a 'Report' button to collect the data we need to fix them. And at the same time I actually also thought about how we could finally get an update service in place. For both things we need to make a simple online backend. When I have time someday in the near future I can probably make a start with this to see how it works out.

burnout92
Apr 22, 2013, 05:52 AM
That both thing is a good idea Jerry. :D But the Update Service is how to work?

Jerrythabest
Apr 22, 2013, 10:31 AM
Well, I've mostly thought about the technical part, but from a user's point of view you could think about finding a notice in the main menu when there is a new version, or maybe some optional popup window with an 'update' button. And of course a 'Check for updates...' menu item in the Plus menu. Also, 99% surely the game will need to restart for the update to be applied.

burnout92
Apr 30, 2013, 11:15 AM
Are you think is a good idea the bulit-in MP3 Player in the JJ2? :)

Grytolle
May 2, 2013, 06:18 AM
Are you think is a good idea the bulit-in MP3 Player in the JJ2? :)

Yes!:7

Treylina
May 2, 2013, 09:11 AM
I'd like to point out the new bass.dll that came with the most recent version of plus is broken. I know the plus team isn't behind it, but it seems that the new bass.dll appears to have missing channels on some modules that previously worked fine (or at least one missing channel I can notice). I used an old version of it and then it worked fine. I don't know if there's been a recent fix of it though, but in that case it should be replaced or downgraded.

In other "fixes", I didn't see the point of fixing a glitch where you could enter through tubes horizontally with a copter. It breaks some levels (for example, This level is untitled) and wasn't actually gamebreaking. I'm not sure if it was a side effect of fixing the directional bias of copters, though.

Violet CLM
May 2, 2013, 11:10 AM
In other "fixes", I didn't see the point of fixing a glitch where you could enter through tubes horizontally with a copter. It breaks some levels (for example, This level is untitled) and wasn't actually gamebreaking. I'm not sure if it was a side effect of fixing the directional bias of copters, though.
Completely a side effect of that, yes. The way copters used to work was a bug caused by a mistyped less than or greater than sign (don't remember which, offhand), but when I tried replacing that with the way they were intended to work, it still wasn't especially fun. So instead I made copters not overriding your xSpeed at <em>all</em>, which naturally had the side effect of them not override your xSpeed in the specific case of your being in a sucker tube. We didn't think of any other levels where this could be a problem, though, and it should still be possible to get the powerup by warp or bouncers.

cooba
May 2, 2013, 11:49 AM
If you run this script (thanks Jerry) with This Level Is Untitled, the copter will work the way it did:
//evilmike212.j2as

void onPlayer(){
if(p.direction == -1 && //If facing left,
jjObjects[p.fly - 1].eventID == OBJECT::COPTER && //while hanging on a copter,
p.yPos > 32*67 && p.yPos < 32*68 && //in the tube's height,
p.xSpeed > 0){ //getting pushed to the right,
p.xSpeed = -4; //move to the left instead.
p.direction = 1; //Require the left button to be held.
}
}

FihuFiL
May 4, 2013, 06:03 AM
Does any given level either crash JJ2 or not crash JJ2, every time you try cycling to that specific level? Or does it seem random?
I'm sorry for my absence.
It happen completely random of different lvls.
I tested it with Wine 1.2.2 (for DJazz it works very good), 1.5, 1.5.21, 1.5.28.

DanZeal
May 6, 2013, 01:13 AM
Seems like plus stops updating the playlog after some weeks.

Jerrythabest
May 6, 2013, 12:11 PM
You mean "some weeks of uptime/running time"? I must admit we never tested for such a crazy long time :D

DanZeal
May 7, 2013, 12:50 AM
You mean "some weeks of uptime/running time"? I must admit we never tested for such a crazy long time :D

Yes. Never happened with the old version. Would be happy if this was solved.

Superjazz
May 11, 2013, 01:08 AM
If you run this script (thanks Jerry) with This Level Is Untitled, the copter will work the way it did:
//evilmike212.j2as

void onPlayer(){
if(p.direction == -1 && //If facing left,
jjObjects[p.fly - 1].eventID == OBJECT::COPTER && //while hanging on a copter,
p.yPos > 32*67 && p.yPos < 32*68 && //in the tube's height,
p.xSpeed > 0){ //getting pushed to the right,
p.xSpeed = -4; //move to the left instead.
p.direction = 1; //Require the left button to be held.
}
}

Added to Zeal Duels.

Sony
Jun 24, 2013, 04:52 AM
hey, does anybody knows why when i'm downloading this, i go to the plusifier and then i make it into jazz2+ it isnt from 2013, its from 2010. and i also tried this with the 2008 version and it still says that is from 2010. i dont know what to do, can anybody help me?

Jerrythabest
Jun 24, 2013, 09:33 AM
Are you absoultely 100% sure you replaced plus.dll with the version from the first post (http://www.jazz2online.com/jcf/showthread.php?t=19489)?

MrAlextov
Jun 28, 2013, 05:18 AM
It think is JJ2+ fault for crashing at cycles because it doesn't crash with original JJ2.

Jerrythabest
Jun 28, 2013, 09:39 AM
I think so too. Somewhere it seems to cause stack corruption but until now no-one has found out what the problem is. The most annoying thing is, that it doesn't happen at all cycles. That might sound odd, but it's a hell to solve a bug that can't be reproduced consistenly. To me it seems like it happens completely at random.

If anyone knows some 99%-sure way to trigger it (other than just keeping cycling until it happens), I'd be happy to hear about it!

Violet CLM
Jun 28, 2013, 09:57 AM
Well, we do know the memory addresses, so it's not <em>completely</em> hopeless. Unfortunately they're consistently in locations we've never touched, usually Galaxy Sound code or locking the video surface.

Love & Thunder
Jun 28, 2013, 01:57 PM
Although I haven't actually encountered this bug before(I never host JJ2 games, except for one Local game where I was experimenting with JJ2+ stuff), perhaps the Galaxy Sound one is caused by specific music file types? Or maybe a bug in Bass.dll?
(By the way, speaking of music, is there any chance of you guys implementing FLAC support for music in Plus?)

cooba
Jun 28, 2013, 02:22 PM
By the way, speaking of music, is there any chance of you guys implementing FLAC support for music in Plus?Regular MP3s take long enough to download through JJ2, so probably not. Also, nobody in the team is an audiophile. :H

MrAlextov
Jun 29, 2013, 05:56 AM
Would be good you guys to releasing Experiment version to public. So other can test these new version to look for bug or reviewing the new features.

Violet CLM
Jun 29, 2013, 09:49 AM
But we <em>do</em>. Haven't you seen the word "Beta" in the bottom left of the main menu?

Jerrythabest
Jun 29, 2013, 10:53 AM
It's all a big experiment...
*hypno*

MrAlextov
Jul 1, 2013, 12:36 AM
But we <em>do</em>. Haven't you seen the word "Beta" in the bottom left of the main menu?

We meaning Experiment/Pre-release of that.
Also how long will there BETA tag, looks like it isn't Beta?

Jerrythabest
Jul 1, 2013, 09:34 AM
Violet mentioned somewhere that Blur mentioned somewhere that he'd wanted to drop the Beta label only after some things were accomplished. One of them that I remember is that he wanted auto-updating in place.

minmay
Jul 4, 2013, 10:25 AM
How often does the level cycle crash happen for most people? I get it on more than 50% of level cycles, as well as just starting the game. For what it's worth, I'm running JJ2 in Wine.

EDIT: Completely unrelated, but any chance of getting a Limit Y Scroll?

minmay
Jul 7, 2013, 09:07 AM
I think I've narrowed down the crash a bit. It appears to never occur on levels with no animated tiles.

Jerrythabest
Jul 7, 2013, 12:39 PM
Wow, are there any such levels?! If this is true, it could be a very valuable step in finding the exact problem. I wonder, did you try levels that have no animated tiles, or levels that use no animated tiles? (I.e. what happens with levels that have animated tiles without including any of them in any layer?)

minmay
Jul 8, 2013, 06:47 AM
http://www.cowmuffins.net/stuff/___doesntcrash.j2l
http://www.cowmuffins.net/stuff/___doescrash.j2l
You can guess which one is which. The only difference is that the latter one actually uses the second animated tile (exactly five times). So it appears it does require that the tiles actually be used. By the way, instead of doing a full cycle you can trigger the crash with jjk (hence the 1ups).

Note that this level only uses 2 animated tiles. I wasn't able to get it to happen with just 1, but that might have just been my patience (fewer animated tiles/uses means crashes happen less often; I tried about 100 times before giving up). Interestingly, neither the size of the tileset nor TSF vs 1.23 seems to make a difference.

Jerrythabest
Jul 8, 2013, 09:18 AM
Oh, that's extremely interesting!

I wrote some angelscript to test it more quickly.
void onMain(){
if(jjGameTicks == 2)
jjChat("/r");
}

With this code, running a LAN server, I got "doesntcrash" to crash after a while...

EDIT: In fact, even the most basic 30x30 level with only a start position and some static tiles crashes after a while for me. The infamous Access Violation immediately followed by a Stack Overflow that hangs the whole game.

minmay
Jul 8, 2013, 02:00 PM
Oh, that's extremely interesting!

I wrote some angelscript to test it more quickly.
void onMain(){
if(jjGameTicks == 2)
jjChat("/r");
}

With this code, running a LAN server, I got "doesntcrash" to crash after a while...Ugh, so did I. Never mind that, then.

EDIT: In fact, even the most basic 30x30 level with only a start position and some static tiles crashes after a while for me. The infamous Access Violation immediately followed by a Stack Overflow that hangs the whole game.Is this when you cycle? Here's a level with only a start position and some static tiles (and a textured background for better chances): http://www.cowmuffins.net/stuff/doesntcrash.j2l
and I could not get it to crash on a cycle after dozens of tries (yes, in an actual server), not to mention all the tries on other levels with no animated tiles.

Jerrythabest
Jul 8, 2013, 02:36 PM
Yes, I got the AV + SO when cycling with /r (via that script).

I tested this latest level just now (the PokHigh tiles) by adding the above angelscript to it, starting a server, and then not touching any buttons. In fact, after having looked at it cycling 10 times or so without trouble, I walked away, brushed my teeth, and when I came back I had the AV + SO waiting for me again. Gah.

Violet CLM
Jul 8, 2013, 03:06 PM
I don't get the crash very often, so I'm not the best tester, but I've never been able to crash at all when using the <code>-nosound</code> command line option. minmay, how about you?

minmay
Jul 8, 2013, 07:46 PM
I don't get the crash very often, so I'm not the best tester, but I've never been able to crash at all when using the <code>-nosound</code> command line option. minmay, how about you?First try, crashed on the second cycle (started a new game, jjnxt in Dungeon Dilemma, AV + SO). After some more tries, it doesn't seem to make a difference.

It also doesn't seem to make a difference whether I use a plusified Jazz2.exe or inject it with plus.exe.

MrAlextov
Jul 10, 2013, 08:03 AM
Cycle crash cause by the sound system of plus? Why just don't make it like that the sound system crash, but Jazz would still work perfectly without sound?

Jerrythabest
Jul 10, 2013, 08:32 AM
Well, if we would have any control over what happens when the crash occurs, then we had probably fixed it. The crash breaks up the whole game; when it occurs, the entire game crashes. There's no stopping it, we can't recover from it. The only way to get this thing done is to fix the origin, but we haven't found the origin yet.

MrAlextov
Jul 11, 2013, 03:52 AM
You maybe can make that to run in another process.

French
Jul 12, 2013, 08:09 AM
JJ2+ is really a marvellous thing; AngelScript is brilliant; but I forgot my old ideas of funny levels from when I was a little boy. Too bad!

I would have some requests fore future versions:
• Allow translations for texts within JJ2+. Some great players could deal with, and I think it would attract newbees from other countries to JJ2+.
• Correct Gem Stomps multiplayer bug: gems don't disappear for other players when you take them. It is very visible in my level FrenchLaby, when I host it.
• Races online should either start with Pregame or /ready, and not with the old 3-seconds-countdown.
• When you come back from a secret level in single player, you've lost all your coins and have no chance to go to the bonus warp!

Thanks for all your work!

Violet CLM
Jul 12, 2013, 08:59 AM
Hi, good to hear from you. :) The gem stomp bug hadn't occurred to me, but it makes total sense... their close cousins super gems require a lot of special handling in the network code to get them to work right, and yeah, I haven't seen that same handling applied to gem stomps. We might look into it. The others are varying degrees of priority... translations would be nice, but also a pretty big project, so probably not for the next release. Races would definitely be cute, but not honestly too important at this point, since everyone just designs for their race levels to be hosted in Treasure Hunt instead. It might happen as part of an eventual larger multiplayer overhaul, like if we ever get >2 teams working. Secret levels... will investigate.

French
Jul 13, 2013, 09:33 AM
Thanks for this quick reply!

This Gem Stomp bug also occurs with Gem Crates, and even when goodies are falling out of the enemies you shoot, actually. (And maybe that's not all?)

Other requests:
• In multiplayer, ammo in the map should appear powered-up if the player has the power-up, and not depending on the server.
• In spectate mode, we must see the amount of ammo in the bottom-right, or possibly nothing, instead of ×00.
• When an Ammo Crate is open by a player in multiplayer, the resulting ammo should depend on either the weapons of the player, the weapons in the map, or the weapons of all players, and not the weapons of the server. Potentially, we could choose in JCS which ammo may fall out, as for Gem Crates?

drabyss78
Jul 16, 2013, 10:14 AM
New here, but this is great. Have loved JJR2 forever!!

Sean
Jul 22, 2013, 08:03 AM
Don't suppose we could add triggers changing on spectators depending who they're spectating? To be able to 'see what the players see', especially on maps with trigger-based gameplay. Copy the player's triggers onto the spectator's, and reset all triggers to 0 on unspectate? Would be a very nice effect on live streamed games.

There would have to be an option to disable this for maps relying on spectator triggers of course, but then again I've never heard of such maps.

szmol96
Jul 26, 2013, 03:09 PM
I have a bug report and a request.
Bug: Some AS scripts need the gamemode to be changed to coop in order to work properly.

Request: Add detecting keys (up, down, left, right, shoot, jump and weapon change), like the running function in the JJPLAYER class.

Anyway, you did a great work, keep it up!

Violet CLM
Jul 26, 2013, 04:26 PM
[triggers, spectating]
We had a talk about this in the dev forum and decided it probably wasn't a good idea. There are too many levels where <em>something</em> would end up going wrong.
Bug: Some AS scripts need the gamemode to be changed to coop in order to work properly.
Gonna need to be <em>way</em> more specific.
Request: Add detecting keys (up, down, left, right, shoot, jump and weapon change), like the running function in the JJPLAYER class.
Already done :) setting them too, not just detecting. You wanna go all out and make your own cutscene, we've got you covered.

French, the stuff in your last post variously falls into a) already done or b) being actively considered as a practical design choice.

szmol96
Jul 27, 2013, 04:11 AM
Gonna need to be way more specific.
For example, I have a custom gun script. If I start the server, the default gamemode is battle, and my gun won't fire any bullets. But if I change the gamemode to coop, it works.

EDIT: Here's the code.
void CreateBullet1(int objectID) {
int playerID = jjObjects[objectID].creator - 32768;
int bulletID = jjAddObject(OBJECT::BLASTERBULLET, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjPlayers[playerID].playerID, CREATOR::PLAYER);
jjObjects[bulletID].direction = jjPlayers[playerID].direction;
jjObjects[bulletID].ySpeed = 2;
jjObjects[bulletID].xSpeed = (jjObjects[bulletID].direction*10)+p.xSpeed*3;
jjObjects[bulletID].xAcc = jjObjects[bulletID].direction*5;
}

void CreateBullet2(int objectID) {
int playerID = jjObjects[objectID].creator - 32768;
int bulletID = jjAddObject(OBJECT::BLASTERBULLET, jjPlayers[playerID].xPos, jjPlayers[playerID].yPos, jjPlayers[playerID].playerID, CREATOR::PLAYER);
jjObjects[bulletID].direction = jjPlayers[playerID].direction;
jjObjects[bulletID].ySpeed = -2;
jjObjects[bulletID].xSpeed = (jjObjects[bulletID].direction*10)+p.xSpeed*3;
jjObjects[bulletID].xAcc = jjObjects[bulletID].direction*5;
}

void onMain() {

p.ammo[9] = 3;

for (int i = 0; i < jjObjectCount; i++) {
if (jjObjects[i].isActive && jjObjects[i].creatorType == CREATOR::PLAYER) {
//Create bullet
if (jjObjects[i].eventID == OBJECT::ELECTROBULLET && jjObjects[i].state != STATE::EXPLODE) {
jjDeleteObject(i);
CreateBullet1(i);
CreateBullet2(i);
continue;
}
}
}
}
This isn't the only one, there are more, mostly custom guns.

cooba
Jul 27, 2013, 04:23 AM
For example, I have a custom gun script. If I start the server, the default gamemode is battle, and my gun won't fire any bullets. But if I change the gamemode to coop, it works.It would be much more helpful if you shared the script in question.

EDIT: The above script works fine for me when I host it in Battle.

szmol96
Jul 27, 2013, 06:11 AM
The above script works fine for me when I host it in Battle.
Do you have Tunngle? Then I could show you.

cooba
Jul 27, 2013, 06:24 AM
I'm hosting it right now.

Seren
Jul 27, 2013, 10:47 AM
You need to place electroblaster ammo somewhere in the level. Otherwise JJ2+ assumes you are trying to cheat by shooting ammo that you couldn't have obtained. And by the way, unless you're planning to put more inside of that for() loop, the <code>continue;</code> instruction is completely unnecessary.