JazzJackrabbit Community Forums

JazzJackrabbit Community Forums (http://www.jazz2online.com/jcf/index.php)
-   General Jazz Jackrabbit Talk (http://www.jazz2online.com/jcf/forumdisplay.php?f=4)
-   -   JJ2+ v6.6h (last updated 1 September, 2026) (http://www.jazz2online.com/jcf/showthread.php?t=19489)

Violet CLM Feb 28, 2013 01: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 02: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 06:38 PM

If you break survivor28 I'm gonna be so mad

Jett Mar 1, 2013 01:31 PM

Some, or a lot actually, music files don't work with plus, specifically 669 modules

sonicnathan 1 Mar 8, 2013 02:36 AM

Great job. I look forward to seeing what the community is going to do with these new additions.

Seren Mar 8, 2013 06:50 AM

It's annoying that division by 0 causes an error even in case of floats. I found a workaround for declaring infinity (const float INFINITY=1.0e+39;), 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 0.0/0.0.
I don't know if it can be fixed but I would be thankful if it were taken care of.

Stijn Mar 8, 2013 07: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 08:04 AM

Quote:

Originally Posted by Stijn (Post 478479)
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 1.0/0.0, minus infinity as -1.0/0.0 and NaN as 0.0/0.0. 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 double min(double x1,double x2,double x3=INFINITY,double x4=INFINITY,...) or double mean(double x1,double x2,double x3=NaN,double x4=NaN,...) 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 11:03 AM

Quote:

Originally Posted by Sir Ementaler (Post 478480)
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.

Quote:

Originally Posted by Sir Ementaler (Post 478480)
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 double min(double x1,double x2,double x3=INFINITY,double x4=INFINITY,...) or double mean(double x1,double x2,double x3=NaN,double x4=NaN,...) 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:
Code:

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 11: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 11:44 AM

These are things to take up with AngelCode, not with us.

Seren Mar 8, 2013 12:00 PM

Ow, that's what I was worried about. And even worse, I just found out AS returns true in NaN==0 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 NaN==NaN. I'll try to get in touch with whoever is in charge of AS.

Jerrythabest Mar 8, 2013 01: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):
Code:

double min(array<double> &arr){
  arr.sortAsc();
  return arr[0];
}


Violet CLM Mar 9, 2013 01:08 AM

Quote:

Originally Posted by Sir Ementaler (Post 478484)
I'll try to get in touch with whoever is in charge of AS.

Go here 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 10: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 18, 2013 12:08 AM

It actually can't. There's no room in the bitfield for any more parameters.

Quintocle Mar 18, 2013 11:50 AM

Unfortunate.

cooba Mar 18, 2013 12:29 PM

I'm sure p.cameraFreeze and p.offsetPosition can do whatever you want to do with Limit X Scroll.

Jerrythabest Mar 19, 2013 11: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 03: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:
[img]http://img855.imageshack.us/img855/7889/battle2u.png[/img]
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 08: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 useful 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:
[IMG]http://img819.imageshack.us/img819/8196/zrzutekranuz20130419194.png[/IMG]
ofc I have "Hardware Acceleration" and "MMX Capabilities" disabled on JJ2.

Wine debugger shows this when Access Violation happen:

Code:

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

Quote:

Originally Posted by Stijn (Post 478785)
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.


All times are GMT -8. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online