Darwinbots Forum
Code center => Darwinbots Program Source Code => Topic started by: Elite on September 05, 2006, 04:05:01 PM
-
I'm thinking of doing some tinkering with the program of my own
I took the source code of Endy's v2.37.7 and modified the 'shots.bas' using a standard text editor, to comment out the code granting conspecs' immunity to other conspecs' poison. So how do I now wrap that up into a neat executable program?
-
try this
Visual Basic 6.0 (http://www.darwinbots.com/FTP/VB6.zip)
It's the only way to make an executable from the source code. You can also edit the code here and even run it directly from source without compiling it first.
-
Ok, I've downloaded it, but I can't seem to get it to work
EDIT: OK, it's working now
-
Post the code up here. I'm working on other VB applications right now so it is a little inconvenient for me to go looking for it.
-
I've got it to work and managed to figure out how to make it do what I wanted
Attached is Darwinbots2.37.7c
Changes:
- Poison affects conspecs
- When .ploc is set to zero, poison has no effect
My only problem is that when exiting the program it says "Darwinbots has encountered a problem and needs to close", which might be to do with VB itself
And my aim in doing all this was to get this bot to work:
cond
*.robage 0 =
start
.ploc .ploc store
.ploc .memloc store
stop
cond
*.poison 20 <
*.pain 30 >
start
10 .strpoison store
stop
cond
*.eye5 0 >
*.memval .ploc !=
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop
cond
*.eye5 40 >
*.memval .ploc !=
start
-1 .shoot store
*.refvelup .up store
stop
cond
*.eye5 0 =
*.memval .ploc = or
start
314 rnd .aimdx store
stop
cond
*.nrg 6000 >
start
50 .repro store
stop
end
It will attack conspecs that have gone canni, making the practice no longer profitable. I'm really proud of this one Haven't thought of a name yet though
-
I believe that "illegal operation" thing has come up before. Not sure exactly what causes it.
You can also get a C++ compielr from the wiki and use it to compile the C++ source.
-
VB does weird shit now and then with apparently no good reason.
-
thats because VB is really an acronym for "Very Buggy"
-
Soon to be transferred to C+ or C++ or C+++ whatever you programmer peeps call it!
/me looks at Nums' to see if he has had time/inclination to make further progress on his epic work.
-
At the moment I'm toying with the idea of moving it into C#. Most of the C++ code would copy and paste over, especially the more algorithm-y code. This would also reduce the number of dependancies, and allow native access to the form designers, which make GUI maintenance easier and give access to the .NET internet controls, which is important for future networking.
The C++ code at the moment is 90% complete. It just needs tie physics to be figured out (there's a reason this is the last. I have no idea how to do it!). And the GUI (options form mainly) needs to be finished. You can check out alot of the details here (http://www.darwinbots.com/WikiManual/index.php?title=C_plus_plus_version).
The code is also a little messy (though orders of magnitude cleaner than the VB code) and could do with a massive refactoring.
If people are interested I can build a trial version download that people could just run to see what things are going on in the C++ source. Most interesting, the physics are much better. Bots never overlap at all, they're treated as 100% rigid for collisions. Bots also bounce off of walls instead of just sort of "plop".
-
If people are interested I can build a trial version download that people could just run to see what things are going on in the C++ source. Most interesting, the physics are much better. Bots never overlap at all, they're treated as 100% rigid for collisions. Bots also bounce off of walls instead of just sort of "plop".
I'm definitely interested, I'd like to see it.
-
Okay, I'll get on it I'll try to upload something later today/tomorrow.
-
Also interested.