Latest revision bugs

Report bugs, errors and balance issues you may encounter ingame here.

Moderator: Developers

bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

Ah, I forgot to mention this only counts for characters with multiple jumps. Try the Archaeologist starter for example. For some reason the jump number is being reset even when the character hasn't landed yet.


I wonder how long this has been going on... I never check the multi-jump things.

Can you pass the platform room? I don't have the patience.

And another minor matter I noticed as well. When the minimap is transparent, the blips on the minimap become blocky instead of those nice smooth round blips. (they turn normal when the minimap turns nontransparent).


That has to do with the blending function or something. It is just not in the proper mode upon entering the function...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

bgbirdsey wrote:Can you pass the platform room? I don't have the patience.


Yeah. I did another update, the game seems 99% playable now (excluding the jumping bug). There is one matter however that could cause some problems. Loading a module and then quitting it to load another module causes some problems. (data not properly being reset or something like that)
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

(data not properly being reset or something like that)


I've never seen that, and the reorganization of the main loops was supposed to fix all of that.

Do you have a repeatable example? That would help with the debugging.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

bgbirdsey wrote:
(data not properly being reset or something like that)


I've never seen that, and the reorganization of the main loops was supposed to fix all of that.

Do you have a repeatable example? That would help with the debugging.


Hmm how strange. I cannot reproduce this bug. Either it is a very rare bug or it was fixed when I cleaned and recompiled.

But along with the testing I did notice something else. The tiles in the Ash Palace won't break anymore. They still deal damage though.
User avatar
woodmouse
Monolich (Senior Member)
Monolich (Senior Member)
Posts: 4586
Joined: Wed Jul 23, 2008 3:53 pm
Location: Finland
Contact:

Post by woodmouse »

All bugs are different for other persons... :shock:
@Zefz: Chat?
Once upon a time, when unicorns roamed the earth...
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

- Something seems wrong with the randomizer seed. Both the AND and OR operator with the rand variable in the script doesn't produce proper random results. (the results are often the same every time I start the module. The randomization values are checked when the objects spawn).

Saw this happen a lot with Sandweg shops. I wanted certain shops only to be there 40% or 75% percent of the time for example. The 75% always showed up while the 40% never showed up at all.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

There are a lot of mistakes in the scripts where the & operator is used improperly. It would be much better to use % in almost all cases.

There may be a problem with randomization per module. It is supposed to be based on the timer. You should be able to check it by checking the seed variable.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

I always use OR these days (Especially for percentage randomization). I can confirm that the seed seems indeed correctly randomized by time(). Maybe the problem is not in the seed?

It could of course be possible I ran into a unlucky (lucky?) streak where I got the same randomization results six times in a row so I tried again. This time I made Egoboo message the randomization result.

Code: Select all

IfSpawned
  tmpx = rand % 100
  DebugMessage


This gave the result that tmpx was 31 six times in a row. So there is indeed a problem somewhere in how the scripts work.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

rand() is re-seeded at the start of each loop through the game update, maybe the problem is there
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Aha, I figured it might be something like that. Are there any bad side effect on re-seeding it with every usage?

[edit]Giving a new seed after each use of rand seems to fix the problem.[/edit]
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

The reason that rand() was reseeded at the end of every game update loop was to make sure that every networked computer would start this loop with the same random number.

You certainly don't want to be re-seeding *every* time you use rand().
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

bgbirdsey wrote:You certainly don't want to be re-seeding *every* time you use rand().


Indeed, but isn't that why we have a RANDIE table? The randomization worked before, but somehow it got broken in some late revision.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

I tracked a potential problem in module_start()

the code was

Code: Select all

pinst->randsave = 0;
srand( pinst->randsave );

which basically makes the seed 0 for every module

I changed it to

Code: Select all

srand( pinst->seed );
pinst->randsave = rand();

which should make it use the seed value for the module

The random number generator is apparently working properly, in general, though.

Evaluating rand() at the beginning of the update loop gives

Code: Select all

7719, 22942, 12257, 7217, 6047, 6907,
17140, 23612, 9393, 28865, 20240, 12780,
30805, 11798, 25727, 2021, 29797, 32064, 20990


the values in the randie[] array are randomized

Code: Select all

58709, 3641, 3403, 41714, 10509, 17072,
61069, 35552, 14270, 34481, 34772
61067, 57246, 29162, 35600, 52639, 57736


the values returned by VARRAND are also randomized and not repeated

Code: Select all

49660, 4903, 64546, 10493, 48422, 47652, 11506
55805, 15533, 64753, 58719, 55088, 23431
80, 33085, 31170, 55530, 45425, 21888, 12686
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

I tried the fix on my pc as well. The same problem persists, every time I load the module, I get the same randomized output through EgoScript.
bgbirdsey
{]-[0{0|307 (Developer)
{]-[0{0|307 (Developer)
Posts: 1864
Joined: Wed Jul 23, 2008 4:22 am
Location: Minnesota, USA

Post by bgbirdsey »

try to replace the variable seed in game_begin_module() with PMod->seed
Post Reply