Author Topic: Sentence Split  (Read 41625 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #75 on: October 14, 2005, 01:46:29 PM »
Darwinbots' GUI is that way.  There's sparse little checking to see if the values are absurd or not.

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Sentence Split
« Reply #76 on: October 14, 2005, 03:33:04 PM »
how do you mean absurd? could you give an exemple?
just of curiosity, what data file on db source is the file that "paint" all the boits and show what happens? not proccesing all the things, just paint the bots and shots as we see them.
« Last Edit: October 14, 2005, 03:46:00 PM by Zelos »
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #77 on: October 14, 2005, 03:48:58 PM »
There are a series of commands that paint things graphiclly to the screen.  I believe they are all in Form1.

DrawRob
DrawRobPer
etc.

They are all grouped together, shouldn't be difficult to find.

An absurd value would be 500000000 nrg per cycle to vegs.  I don't think the program catches that.

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Sentence Split
« Reply #78 on: October 14, 2005, 03:57:42 PM »
there is nothing called Draw things.
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #79 on: October 14, 2005, 07:03:35 PM »
No, there isn't.  But DrawRob should exist.  I knowDrawRobPer exists.

Looked at your code, I'm really impressed.  Only things I'd recommend:

1.  Indenting.  It's a style thing only, has no effect on the code, but it makes it more readable.  Look at Darwinbots' code for examples of when you would indent or unindent.

2.  You would be better off grouping code into their own Subfunctions, that themselves call smaller syub functions, etc.

So that your main code would look like:
Code: [Select]
Setup
Do
  CheckInput
  UpdateGraph
loop while blah blah...

Like that, it makes the program look more professional.  In the end, you'll have a tree of functions, that all call smaller functions, that call smaller functions, etc.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Sentence Split
« Reply #80 on: October 14, 2005, 07:47:02 PM »
Num Num Num, too mutch collage brainwash:

Quote
Like that, it makes the program look more professional.

We are not worried about professional here, we are worried about user frandly. Thats why we do it.

I seen some professionals do some really stuped things when they code thinking its professional, thats why I hate .net so much.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #81 on: October 14, 2005, 08:19:56 PM »
Are you saying its better to place all the code in a single function  :rolleyes:

There is one paradigm that overcomes all others in coding style:  Make it readable!  Make it readable to someone who knows nothing about your source, and make it readable to yourself 7 months from now when you have no idea what you were doing when you programmed the thing to begin with.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Sentence Split
« Reply #82 on: October 14, 2005, 08:27:21 PM »
In this case you are correct Num.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #83 on: October 14, 2005, 08:29:23 PM »
I can't begin to tell you the number of times I've programmed something only to come back 6 or 7 months later and have no clue how it works.

Always Always Always try to make it as readable as possible.  That's what really takes practice.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Sentence Split
« Reply #84 on: October 14, 2005, 08:34:27 PM »
I agree. Infact happens to me often enough too. When I was 11 it did not happen to me , so I would not worry about it. Gess I have to start worrying about it now.

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Sentence Split
« Reply #85 on: October 15, 2005, 04:42:36 AM »
nums, I dont get what you mean with ur 2nd point, could you explain it a bit better?
and nums, whe ni look in the iersera file with VB, I dont find a file/form or what ever its called that is called anything with draw in it. I find datiriob,dna_help, database, dnaexcution , dnamanipulation and dnatokinization. but nothing draw, am I blind or am I looking at the wrong place?
« Last Edit: October 15, 2005, 04:52:16 AM by Zelos »
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #86 on: October 15, 2005, 12:20:01 PM »
Look in the form "Form1".  There's a section inside it that does the drawing.

My second point...  I'm not really good at explaining this.  Basically it'd work like this:

Your main function only calls like 6 or 7 other functions.  These functions are named something really basic.  Then your main loop looks like:

do
  Updatebots
  Updateshots
  Drawbots
  Drawshots
loop

Or something like that.  Then the Updatebots function looks something like:

for x = 1 to 1000
  UpdateDNA
  UpdatePhysics
next x

or something like that.  You keep breaking the problem down into more and more sub functions.  It makes the program more readable, and is what is generally considered "proper" programming technique.

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Sentence Split
« Reply #87 on: October 15, 2005, 12:23:19 PM »
are you talking about mdiform1? if so I´ll take a look at it. thx
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Sentence Split
« Reply #88 on: October 15, 2005, 12:24:22 PM »
Nope, Mdiform is different.  This is called "Form1".

Offline Zelos

  • Bot Overlord
  • ****
  • Posts: 707
    • View Profile
Sentence Split
« Reply #89 on: October 15, 2005, 12:38:23 PM »
OH, now ive found it, now I feel kinda silly
When I have the eclipse cannon under my control there is nothing that can stop me from ruling the world. And I wont stop there. I will never stop conquering worlds through the universe. All the worlds in the universe will belong to me. All the species in on them will be my slaves. THE ENIRE UNIVERSE WILL BELONG TO ME AND EVERYTHING IN IT :evil: AND THERE IS NOTHING ANYONE OF you CAN DO TO STOP ME. HAHAHAHAHAHAHAHA