Welcome To Darwinbots > Newbie

Darwinbots replacement/clone

<< < (8/11) > >>

ashton15:

--- Quote from: Pascal666 ---The problem you're having with feeding is in this gene:

condition
sight 50 >
gene
1 eat
endgene

The sight range is the distance it is away from the bot, you're feeding when its farther than 50, it should be closer than 50 "sight 50 <".
--- End quote ---

Opps, I assumed it would be based on apparent size like in darwinbots, sounds like an improvement you made then... maybhe not entirely realistic, but lets just say they can sense using ultrasound

peterb:

i'm trying to convert the code to vb.net
but its a bit complex if you dont know the exact inner working of the program.
I lack the general view.

i see seperated "subjects", there is a graphical part (wich might be translatable to some different kind output > directx9 or something else) and physics and DNA,
And there must be a data structure
hmm besides that there is some complex species loop,
which doesnt convert well to vb.net...
hmm vbnet doesnt accept arrays with negative values hmmmm

Basicly i think i could be written in vb.net, the things in which vb6 is more easy is perhaps file access, but thats about it.
There is a trick however to include vbscript runtime (so you get the easy script commands) and another option is to make to 'right' file dialog calls, which (i forgot them a bit) but they endup with complete finished dialogs like the file load/safe dialogs of word / excel / ...


hmmm thinking thinking  

Pascal666:

--- Quote from: ashton15 ---Opps, I assumed it would be based on apparent size like in darwinbots, sounds like an improvement you made then... maybhe not entirely realistic, but lets just say they can sense using ultrasound
--- End quote ---

The number is just handled differently, there is still is a limited range and sight angle.


--- Quote from: peterb ---i'm trying to convert the code to vb.net
but its a bit complex if you dont know the exact inner working of the program.
I lack the general view.

i see seperated "subjects", there is a graphical part (wich might be translatable to some different kind output > directx9 or something else) and physics and DNA,
And there must be a data structure
hmm besides that there is some complex species loop,
which doesnt convert well to vb.net...
hmm vbnet doesnt accept arrays with negative values hmmmm

Basicly i think i could be written in vb.net, the things in which vb6 is more easy is perhaps file access, but thats about it.
There is a trick however to include vbscript runtime (so you get the easy script commands) and another option is to make to 'right' file dialog calls, which (i forgot them a bit) but they endup with complete finished dialogs like the file load/safe dialogs of word / excel / ...


hmmm thinking thinking  

--- End quote ---

Personally I am not a big fan of vb.net, the speed difference shouldn't be that great either.
When I started programming aevolution I actually made a client using directx in c++, however my lack of experience(none) with c++ made the progress too slow, so I decided to use vb6.

But I dont know what you mean with arrays with negative values, as far as I know there arent any.

Botsareus:

--- Quote ---Personally I am not a big fan of vb.net,
--- End quote ---

I am not eather, but guess what? vb6 is almost a dino' by now...

I  have tried to build my own virsion of DB once called PusherBots. Did not get very far and deleted my source code out of annoyance. Big mistake. I believe one day we should look at all this open source stuff out there and implement the parts we like in to DB3...

peterb:


I didnt have vb6 anymore installed somewhere, so i went to vb.net
I think i'm going to strip, al lot from it, to get a 'naked app'.
Or maybe first investigate a good direct3d wrapper for vb.net.
I also wonder if it should be possible to include other code inside vb.net
So having a c#.net draw tool, which could run the output (drawing circles and lines in color)
So to split the main routine and the graphics routine.
But i've never done something with any kind of graphical engines, and combined code.


oh btw maybe a tip
You do a lot of 180/pi  and pi/180  try make it a constant


    Const Rad2grad As Double = 180 / PI
    Const Grad2rad As Double = PI / 180

so you have less calculation for each movement.
And maybe even you could speedup sin/cos, with a array of 90 degrees and a simple function for the rest based on mod.
Small ideas to speed it up.



Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version