Poll

Which option do you like better

Keep entire program in VB6
3 (33.3%)
Keep GUI in VB6 and move simulation code to a seperate C++ DLL for speed
3 (33.3%)
Move entire program in C++ (this would take quite a while)
3 (33.3%)

Total Members Voted: 9

Author Topic: Direction of the Code  (Read 15019 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« on: October 05, 2005, 10:51:25 PM »
My vote is for #2.  I think if we move the simulation to C++ code, the added flexibility(things like classes, pointers) and speed would be well worth it.

On the down side, not everyone knows C++.  And VB is easy to pick up, even for coding newbies.

This is of course for a future time when 2.4 is finished and stable.
« Last Edit: October 05, 2005, 10:51:48 PM by Numsgil »

Offline Greven

  • Bot Destroyer
  • ***
  • Posts: 345
    • View Profile
Direction of the Code
« Reply #1 on: October 06, 2005, 08:08:35 AM »
I have for quite a time thought about beginning to "translate" DB into C or Java, but I couldn't really get started because of the gigantic amount of work I would have to put into it, and even before I could see some results.

But I think it is a good idea, especially if we are more than one :)

I will support it, as long as the source code is still available.
10010011000001110111110100111011001101100100000110110111000011101011110010110000
011000011000001100010110010111101001110100110010111100101000001000001111001011101
001101001110011011010011100011110100111000011101100100000100110011010011100110110
010110000011100111101001110110111101011101100110000111101001101001110111111011101
01100100000111010011010001100001110111010000010001001000010100001

Offline Ulciscor

  • Bot Destroyer
  • ***
  • Posts: 401
    • View Profile
Direction of the Code
« Reply #2 on: October 06, 2005, 09:47:38 AM »
I really can't decide, myself. On the upside is the increased speed, but on the downside is the split there will be between people being able to program extra bits and those who can't.
:D Ulciscor :D

I used to be indecisive, but now I'm not so sure.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Direction of the Code
« Reply #3 on: October 06, 2005, 10:20:33 AM »
From a purely personal point of view I prefer to keep it in VB.

If any of it is written in C then I am completely out as a programmer since I know absolutely nothing about C.

From the game's perspective it would quite possibly be useful to use some dlls for specific routines.

Then again it has been quite a while since I actually had the time to do any of the programming anyway.  :(
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #4 on: October 06, 2005, 11:06:30 AM »
If you already know a language, a new language isn't terribly difficult to learn.  But it would take some time, which I'm aware of.

I'm thinking that we could get a significant speed improvement in C++ over VB.  I'll have to construct some benchmarks and test them to get an idea of their comparative differences.

And then you add in that I can make some real data structures. Trees, linked lists without all that overhead, etc.

Not to mention that the translators would have to be sure that they release memory that is automoatically released in the VB verson.  Memory leaks are not fun.
« Last Edit: October 06, 2005, 11:07:16 AM by Numsgil »

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Direction of the Code
« Reply #5 on: October 06, 2005, 02:01:33 PM »
Don't suppose you have a nice free copy of VC++ lying around do you?  ;)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #6 on: October 06, 2005, 02:34:33 PM »
You know, I bet I do.

In fact, I know I do.  Plus a trial version that has the benefit that it includes the SDKs (help files and such).

I'll put it up later.

For learning C I'd recommend the C for Dummies books.  I used them before I even took algebra in middle school, and I got through them.  They're intertaining, although if you know how to program already, it might be slow for your tastes.

Another advantage:  moving to C++ the program becomes platform independant (or just about so).  You'd have to rewrite whatever part of the GUI is left behind in VB for the new platform, but otherwise...

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Direction of the Code
« Reply #7 on: October 06, 2005, 08:55:28 PM »
Quote
even for coding newbies.

I am not  a coding newb num, I just have prioraty over things.

I dont care if you move everything to c++ , about time I learned it anyway.

Quote
but on the downside is the split there will be between people being able to program extra bits and those who can't.

What is this a porade to stop me from coding?



Quote
I'm thinking that we could get a significant speed improvement in C++ over VB. I'll have to construct some benchmarks and test them to get an idea of their comparative differences.

Maybe so. Thats the only thing I hate about vb no hardware flexabilaty.

Quote
And then you add in that I can make some real data structures. Trees, linked lists without all that overhead, etc.

All can be done in vb...

Quote
Not to mention that the translators would have to be sure that they release memory that is automoatically released in the VB verson. Memory leaks are not fun.

Thats were you lost me. What translators release memory? VB verson? Hybrids su*k unless its a hybrid with assembly. I hate Hybrids.
« Last Edit: October 06, 2005, 09:04:10 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #8 on: October 06, 2005, 09:40:35 PM »
Quote
All can be done in vb...
With significant speed hits, yes.  VB doesn't do pointers, so when you simulate abstract data types, you have to use other things...

That result in massive referencing and dereferencing.  The old robot and shot lists suffered from this problem.

And yes, it's a parade to stop you from coding :P

Quote
Not to mention that the translators would have to be sure that they release memory that is automoatically released in the VB verson. Memory leaks are not fun.

In Visual Basic, memory you allocate during run time is automatically released for you.  Isn't that nice of them.

That is not true of VC++, or most other languages.  You have to clean up after yourself.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Direction of the Code
« Reply #9 on: October 06, 2005, 10:02:07 PM »
Quote
And yes, it's a parade to stop you from coding

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!

OK FINE THEN, I AM NOT POSTING FIRST BOT.

WHATS FUCKOMPING WRONG WITH ALOCATING MEMORY ON RUNTIME? I THINK ITS THE BEST THING THAT HAPPEND IN A PROGRAMING LANGUGE I USE IT ALL THE TIME.

NEXT YOU ARE GOING TO SAY EVERYTHING NEED TO BE CASE SANSATIVE?

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!!!!!!!!!
« Last Edit: October 06, 2005, 10:02:49 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #10 on: October 06, 2005, 10:06:03 PM »
Allocating memory, then cleaning up after yourself = good

Allocating memory and totally not releasing it to the system when you're done = bad

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Direction of the Code
« Reply #11 on: October 06, 2005, 10:08:31 PM »
:blink: Say what?

Quote
Allocating memory and totally not releasing it to the system when you're done = bad

I thought and am still pritty sure after a vb program terminates it releases all its memory.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #12 on: October 06, 2005, 10:20:24 PM »
[span style=\'font-size:11pt;line-height:100%\']VB[/span] Does.  Others DO NOT.  (Necessarily, some do, but they don't have to.  It's not ANSI standard.)
« Last Edit: October 06, 2005, 10:21:09 PM by Numsgil »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Direction of the Code
« Reply #13 on: October 06, 2005, 10:22:48 PM »
ok good , then we stay with vb.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Direction of the Code
« Reply #14 on: October 06, 2005, 10:24:52 PM »
Just because you don't want to spend the 5 minutes to put in the proper cleanup code?

Other languages don't do it for you, so you have to.