Darwinbots Forum

Code center => Bugs and fixes => Topic started by: Testlund on November 17, 2005, 10:42:13 AM

Title: Day/night cycle still not satisfying
Post by: Testlund on November 17, 2005, 10:42:13 AM
Here's what's happening now. Version 2.4.A.

If I start a new simulation with day/night cycles set to 10000 it starts with night showing the moon. After 10000 cycles it changes to day showing the sun. So far so good. At 13000 cycles I saved the simulation and quitted. Later when I loaded the sim it was NIGHT!   :huh: That means it allways start with night if you load a simulation nomatter if it was day or night before. As I need to quit the program to do other things the veggies wont multiply much because they will mostly not see the sunlight. Could you fix that please?
Title: Day/night cycle still not satisfying
Post by: Numsgil on November 17, 2005, 12:28:11 PM
Can you tell if this is a GUI bug or a settings bug?

That is, is the picture just showing that it's night or is it really night?
Title: Day/night cycle still not satisfying
Post by: Testlund on November 17, 2005, 01:19:06 PM
Well, it looked like the veggies weren't multiplying so I'm sure it was night, not just the moon icon that showed it.
Title: Day/night cycle still not satisfying
Post by: Numsgil on November 17, 2005, 01:20:30 PM
Alright, I'll see if I can figure this out.
Title: Day/night cycle still not satisfying
Post by: PurpleYouko on November 17, 2005, 01:38:41 PM
I have a feeling that day/night is not actually saved in the settings file at all.
Title: Day/night cycle still not satisfying
Post by: Testlund on December 15, 2005, 06:33:15 PM
Could you please do something with the day/night cycles in version 2.4.A, Nums? It's totally crappy! I think it's allways night nomatter if the sun is on or not, because the veggies never reproduce, also if I chose to NOT have day/night cycles turned on it will ALLWAYS be night, and as soon as I make any changes in the GUI and click change the simulation starts counting from 0 showing the moon.
Title: Day/night cycle still not satisfying
Post by: EricL on March 15, 2006, 07:58:09 PM
Okay, I found this I think.   SimOpts.Daytime is getting set to False when TmpOpts is assigned to SimOpts at the bottom of MDIForm_Load() (line 499 of MDIForm.frm).  Adding the following line right before the assignment (line 499)seems to result in the correct behaviour both for the UI and for veggies.

Code: [Select]
TmpOpts.Daytime = True ' EricL March 15, 2006
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 10:02:01 AM
Interesting! I think I will download 2.4.A again and testing it again. :-)
Title: Day/night cycle still not satisfying
Post by: Griz on March 21, 2006, 10:08:03 AM
Quote
Interesting! I think I will download 2.4.A again and testing it again. :-)
good Testlund ...
good to see you back.
that is what we need ...
some folks experimenting and providing feedback.
quite a few changes have been made recently ...
but no 'official' upgrade ...
so I hope you can find all those threads and incorporate them.

I hope to have them all documented in one place on the wiki ..
but Eric is hard to keep up with. ;)
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 10:59:18 AM
I have a problem here. I can't seem to load the sourcecode in VB6. First time I tried it said there was a table missing; something like 'TABLE32.OCX' or something. It only showed the first time. Now nothing happens when I try to load it. First I installed Darwin21, then I copied the sourcecode of Darwin2.4.A into the DarwinBotsII folder. Can't understand why I can't load it now. It has worked perfectly before!  :banghead:
Title: Day/night cycle still not satisfying
Post by: Griz on March 21, 2006, 11:44:18 AM
perhaps a VB problem ...
can you load in version 2.37.6?
or other versions?
I've searched my entire computer for TABLE32.OCX with no finds.
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 12:29:22 PM
Ok, the files that VB is looking for when trying to open the sorcecode are the followings:

TABCTL32.OCX
RICHTX32.OCX

It also generated some logfiles with the following.

robdata.log:

Line 33: Class RichTextLib.RichTextBox of control dnatext was not a loaded control class.

console.log:

Line 17: Class RichTextLib.RichTextBox of control Text1 was not a loaded control class.

OptionsForm.log:

Line 78: Class TabDlg.SSTab of control SSTab1 was not a loaded control class.
Line 2957: Class RichTextLib.RichTextBox of control CommentBox was not a loaded control class.

LogForm.log:

Line 17: Class RichTextLib.RichTextBox of control TextBox was not a loaded control class.

I tried both version 2.4.A and 2.4.9. The same happens to both. Looks to me they have gotten screwd up on the server. I will try 2.37 version too....

Ok, the same result with 2.37.6 too. VB is looking for files that don't exists.

Well, the files TABCTL32.OCX and RICHTX32.OCX are VB6 files. They are there but VB can't load them for some reason. Also the installer is totally screwed up, but I've managed to run VB6 without installing it and it has worked fine before.
Title: Day/night cycle still not satisfying
Post by: EricL on March 21, 2006, 12:59:10 PM
The missing OCXs are part of the VB6 runtime.  They are placed into the Windows System32 directory by the VB installer when VB is installed.  Without them, no VB6 application will compile correctly.

The VB6 install on the download portion of the site has a bunch of things removed from it like help files to keep it small, so you do get errors when you install, but if you just hit ignore on all of those, it should complete okay and it should place these files in the system32 directory.

I'm almost certain the problems you are having are because VB6 didn't get installed right and these files didn't get laided down.  You might try installing VB again....
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 01:11:55 PM
Ok, I've done all the procedures I'm supposed to, but the installer fails to put some files into the registry and the program never gets installed. But I HAVE been able to use this program WITHOUT installing it. For some reason it doesn't work now.
Title: Day/night cycle still not satisfying
Post by: Griz on March 21, 2006, 01:16:59 PM
that's what I'm thinking as well.

btw Eric ...
I put in all the changes so far, [I think] ...
and still have problems with leagues ...
but then I never did figure out how they were supposed to work.

have been playing with it to see what comes up ...
InstaWin no longer crashes, and seems to work for the first
contest, but after that it doesn't do anything as far as I can see.
but then, I have other problems ...
I used 'swarm' in a simple test league that uses the top four F1 bots ...
and swarm gets his butt kicked in the first contest ..
but then is still the contending bot in the next contest ...
but with zero population.  so it's like the 4th place bot is the only
one in the contest. and here, Instawin doesn't do anything ...
the rounds seem to go on forever ...
seeming as there is no one to 'beat'. ;)
didn't have time to just let it keep running ...
maybe I'll try that tonite when I am getting my needed beautysleep.

so ... I still don't know how Leagues is supposed to work ...
I don't think I've ever seen it do what it's supposed to.

anybody got any hints on how to set up a simple 4 bot league
and have the bots run off?

I notice there are other intended options ghosted out ...
the only thing I get is the 'challenge mode' ...
and I'm not sure what that means.
there is also 'ladder' and 'last man standing' and 'free-for-all'

what's it all mean, mr. natural????
Title: Day/night cycle still not satisfying
Post by: Griz on March 21, 2006, 01:21:05 PM
Quote
Ok, I've done all the procedures I'm supposed to, but the installer fails to put some files into the registry and the program never gets installed. But I HAVE been able to use this program WITHOUT installing it. For some reason it doesn't work now.
same happened to me upon installing ...
I must have clicked on two dozen, 'never mind, keep going' things ...
and even tho I got all those 'did not install' messages ...
including one's about the registry ...
but they seem to be all uneeded as ...
it worked.

it's got to be something in that, Testlund ...
install again ...
and keep clicking on the error messages all the way thru.

don't know what else to tell you.
seems like there is an option early on in the install ..
that asks you about 'custom' or 'standard' install.
I think I clicked standard, not knowing enough to customize.

that's it for 'help' from me. ;)
Title: Day/night cycle still not satisfying
Post by: EricL on March 21, 2006, 01:33:14 PM
Testlund: The VB install should still complete sucessfully even with the failures.  I've installed it twice in the past week on different machines and if you just hit ignore to get past the install errors, you'll get there.  That said, I can email you a zipped up DB exe if you want.

Griz: Leagues are still way broken.  I'm working on it.  Stay tuned.
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 02:00:28 PM
You think you can do that Eric? My email is testlund2004@yahoo.se. Now everybody's gonna spam me.  :P

I've tried the install procedure several times with custom on both my C:\WinXP partition and G: partition. Get the same result everytime. It doesn't make sense that the same procedure should work sometimes and sometimes not. It's the same data. Ok, I will try the standard install that Griz mensioned one last time, but you can go ahead and email me the file anyway.
Title: Day/night cycle still not satisfying
Post by: EricL on March 21, 2006, 02:06:10 PM
Just sent it to you Testlund.  Has all my posted fixes plus some new UI fixes.  let me know as you find stuff you want fixed.

-E
Title: Day/night cycle still not satisfying
Post by: Testlund on March 21, 2006, 02:11:49 PM
Cool! I guess I can't do a complete bug report from an exe file, but at least I can tell you if I run into problems. I'm downloading VB6 again from the server to give it a last try, then I will probably run your exe under the night.
Title: Day/night cycle still not satisfying
Post by: Testlund on March 23, 2006, 05:38:30 AM
Umm.... Looks like the day/night cycle still needs a little tweaking. I have it set to 10000 but it choses it's own value when it wants to change. I think actually that it changes every 10000 but not at 10000, 20000, 30000 etc. Instead it changes at 3000 or 7000 and so on.
Title: Day/night cycle still not satisfying
Post by: Griz on March 23, 2006, 07:48:59 AM
Quote
Just sent it to you Testlund.  Has all my posted fixes plus some new UI fixes.  let me know as you find stuff you want fixed.

-E
was going to have you send it to me as well ...
as I haven't had time to keep up with all the changes ...
but seeing as you're still finding/making more fixes ...
and I don't have much time to experiment right now
anyway ... I'll wait until you work thru a few more.
when you get it fairly stable, maybe you could then
upload it here or to the wiki as a 2.4.A2 or something.

great work ...
thanks for pumping some juice into DB ...
and getting me and others interested again.
Title: Day/night cycle still not satisfying
Post by: PurpleYouko on March 23, 2006, 09:19:37 AM
Quote
Umm.... Looks like the day/night cycle still needs a little tweaking. I have it set to 10000 but it choses it's own value when it wants to change. I think actually that it changes every 10000 but not at 10000, 20000, 30000 etc. Instead it changes at 3000 or 7000 and so on.

That is because the counter doesn't get reset when you restart your sim.

When you load up darwinBots the first time, it should work but if you restart after 3000 cycles, the day/night counter still reads 3000 so it will change 7000 cycles into your new sim.

If anybody wants to address this then please make the alterations in the source code. It should be easy enough.