Author Topic: Let's make a stable platform  (Read 39041 times)

Offline Greven

  • Bot Destroyer
  • ***
  • Posts: 345
    • View Profile
Let's make a stable platform
« Reply #45 on: October 26, 2005, 04:46:38 PM »
Quote
It's the developer's curse. Only people who can't fix bugs can ever find them

It is so funny.... AS I have said before! The seed function! Show us the seed value in the in the main window. Then we can report the seed value only and you Num, can find the bug really quick!
10010011000001110111110100111011001101100100000110110111000011101011110010110000
011000011000001100010110010111101001110100110010111100101000001000001111001011101
001101001110011011010011100011110100111000011101100100000100110011010011100110110
010110000011100111101001110110111101011101100110000111101001101001110111111011101
01100100000111010011010001100001110111010000010001001000010100001

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #46 on: October 26, 2005, 04:49:35 PM »
You aren't the only one. ;)

I'm thinking of implementing some sort of auto-bug reprot that zips the save file of the crash, along with settings, etc. and sends it to my email automatically.

Offline Greven

  • Bot Destroyer
  • ***
  • Posts: 345
    • View Profile
Let's make a stable platform
« Reply #47 on: October 26, 2005, 05:22:22 PM »
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.
10010011000001110111110100111011001101100100000110110111000011101011110010110000
011000011000001100010110010111101001110100110010111100101000001000001111001011101
001101001110011011010011100011110100111000011101100100000100110011010011100110110
010110000011100111101001110110111101011101100110000111101001101001110111111011101
01100100000111010011010001100001110111010000010001001000010100001

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Let's make a stable platform
« Reply #48 on: October 26, 2005, 05:39:56 PM »
CRASH:

Run-time error 6: overflow.

CODE:

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

HOVERING INFO:

Hovering over first 'rob' as well as '.mem' displays 'rob(n).mem(refvelscalar) = 30509.

Hovering over all '(n)' variables in the code displays 'n= 176'.

Hovering over '(refvelscalar)' displays 'refvelscalar = 695'.

Hovering over next '(rob' as well as next '.mem' displays 'rob(n).mem(refvelup) = -21948'.

Hovering over '(refvelup)' displays 'refvelup = 699'.

Hovering over next 'rob as well as '.mem' displays 'rob(n)refveldx) = -30578'.

Hovering over '(refveldx)' displays 'refveldx = 697'.

Do I make any sence? Is this what you need?
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #49 on: October 26, 2005, 05:42:09 PM »
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.
It's already implemented!

Or didn't you know that?  It's just no one actually reprots it when they tell a bug.
« Last Edit: October 26, 2005, 05:42:27 PM by Numsgil »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #50 on: October 26, 2005, 05:43:34 PM »
Quote
CRASH:

Run-time error 6: overflow.

CODE:

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

HOVERING INFO:

Hovering over first 'rob' as well as '.mem' displays 'rob(n).mem(refvelscalar) = 30509.

Hovering over all '(n)' variables in the code displays 'n= 176'.

Hovering over '(refvelscalar)' displays 'refvelscalar = 695'.

Hovering over next '(rob' as well as next '.mem' displays 'rob(n).mem(refvelup) = -21948'.

Hovering over '(refvelup)' displays 'refvelup = 699'.

Hovering over next 'rob as well as '.mem' displays 'rob(n)refveldx) = -30578'.

Hovering over '(refveldx)' displays 'refveldx = 697'.

Do I make any sence? Is this what you need?
Yeah, can you see why it would overflow?  If you do than you can be more useful bug hunting ;)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Let's make a stable platform
« Reply #51 on: October 26, 2005, 05:53:43 PM »
I have no idea! I know nothing about programming. Something wrong with the numbers, perhaps?
« Last Edit: October 26, 2005, 05:58:19 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #52 on: October 26, 2005, 05:58:03 PM »
Too bad...  Anyway yeah, all that info was helpful.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Let's make a stable platform
« Reply #53 on: October 26, 2005, 06:17:23 PM »
Quote
Too bad... Anyway yeah, all that info was helpful.
Not so too bad after all...

Private Sub Form_Load()
'aha we are working with intager
Dim a As Integer, b As Integer, c As Integer
'lets set the overflow frandly numbers for a spin
a = -21948
b = -30578
'ok now with the works
c = (a ^ 2 + b ^ 2) ^ 0.5 'can overflows for several reasons a.) trys to do a a ^ 2 in a integer memory range...

'ok now the same thing fixed:

c = CInt((CLng(a) ^ 2 + CLng(a) ^ 2) ^ 0.5)
Debug.Print c '31039

'Qustions? , comments? Send it over to microsoft.
End Sub

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Let's make a stable platform
« Reply #54 on: October 26, 2005, 06:32:36 PM »
Here's another one for ya!

Same error 6 overflow.

Another code:

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

Hovering info:

rob(n).mem(refvelup) = 14103

n = 403

refvelup = 699

rob(o).vx = 1370,617

o = 91

rob(n).aim = 3,747893

rob(o).vy = 95642,16

rob(n).mem(velup) = -5

velup = 200

Now I'm going to bed.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #55 on: October 26, 2005, 06:47:29 PM »
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
« Last Edit: October 26, 2005, 06:51:40 PM by Numsgil »

Offline Greven

  • Bot Destroyer
  • ***
  • Posts: 345
    • View Profile
Let's make a stable platform
« Reply #56 on: October 26, 2005, 06:47:33 PM »
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.
It's already implemented!

Or didn't you know that?  It's just no one actually reprots it when they tell a bug.
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?
10010011000001110111110100111011001101100100000110110111000011101011110010110000
011000011000001100010110010111101001110100110010111100101000001000001111001011101
001101001110011011010011100011110100111000011101100100000100110011010011100110110
010110000011100111101001110110111101011101100110000111101001101001110111111011101
01100100000111010011010001100001110111010000010001001000010100001

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Let's make a stable platform
« Reply #57 on: October 26, 2005, 06:48:50 PM »
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.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Let's make a stable platform
« Reply #58 on: October 26, 2005, 06:49:07 PM »
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

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Let's make a stable platform
« Reply #59 on: October 26, 2005, 06:52:53 PM »
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!!!!!!!