Code center > Bugs and fixes

Let's make a stable platform

<< < (12/26) > >>

Numsgil:
mem(something) is the memory array.  Defining it as long, among other things, increases the memory consumption of the program dramatically.

Insert a check way at the top of that routine:

if abs(rob(o).vx) > .MaxVel then rob(n).vx = sgn(rob(n).vx) * .MaxVel
if abs(rob(o).vy) > .MaxVel then rob(n).vy = sgn(rob(n).vy) * .MaxVel

Greven:

--- Quote ---
--- Quote --- Well it seems to awful much work compared to my simple idea! The seed value, will replicate the excact same simulation, and have the same error, believe me, even on different computers.
--- End quote ---
It's already implemented!

Or didn't you know that?  It's just no one actually reprots it when they tell a bug.
--- End quote ---
Yes I know it is! But when using timer, can you see the seed value?

In SoL I created a file, writing(appending) the seed value to it.
If the program did not crash and exited normally, the program would write "SIM OK" or something. This can actually be refined, so it will remove the seed value for the current sim, and you will end up with a file were all possible error seed values will be in (if you run it enough times).

Do you understand?

Numsgil:
Show the Timer value in the main title bar on the thing at the bottom? Yaeh, sure, makes sense ;)

I'll go ahead and add it...

In the mean time, why not have everyone run the same seed?  Like 86.  That's a good seed number.

Botsareus:
CONGRADULATIONS~! YOU ACTUALY FOUND ONE I DID NOT FIX YET IN THE CODE WITCH YOU C!A!N! D!O!W!N!L!O!A!D! from the ftp.

So I will fix it now....


'wrong code:
rob(n).mem(refvelup) = (rob(o).vx * Cos(rob(n).aim) + rob(o).vy * Sin(rob(n).aim) * -1) - rob(n).mem(velup)

'correct code:
Dim tempc As Long
tempc = (rob(o).vx * Cos(rob(n).aim) + rob(o).vy * Sin(rob(n).aim) * -1) - rob(n).mem(velup)
If Abs(tempc) > 32000 Then tempc = 32000 * Sgn(tempc)
rob(n).mem(refvelup) = tempc

Botsareus:
GRIZ USE THIS!!!!!!!!!!!!!!!!!!!!

rob(n).mem(refvelscalar) = CInt(Sqr(CLng(rob(n).mem(refvelup) ^ 2) + CLng(rob(n).mem(refveldx) ^ 2)))' how fast is this robot moving compared to me?

PLEASE!!!!!!!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version