Why C++, SDL ?

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Panda_
Posts: 15
Joined: July 8th, 2005, 5:47 pm

Why C++, SDL ?

Post by Panda_ »

Hi,

Why BfW was coded in C++? Why wasn't it Java? What pros C++ had, other languages didn't ?
I know it's one of the most powerful langage available (etc etc),

How are released the different version? Do you compile the project on each architecture to get different releases (linux, windows, mac, ... 32/64), or is do you use some other utils (like a vmware) ?

Why did you choose SDL?
I know it's free. But when i used it, i had the feeling it wasn't a good library (awful approach, limited possibilities, and it's really old).
Isawa Aneko
Ishiken

"Dead ? Me ? My clan is in danger, and the Empire is falling ! I don't have time to die !"
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Why C++, SDL ?

Post by loonycyborg »

Panda_ wrote: Why did you choose SDL?
I know it's free. But when i used it, i had the feeling it wasn't a good library (awful approach, limited possibilities, and it's really old).
Perhaps you can suggest an alternative?
"meh." - zookeeper
Boucman
Inactive Developer
Posts: 2119
Joined: March 31st, 2004, 1:04 pm

Re: Why C++, SDL ?

Post by Boucman »

mainly because the lead developer is a C++ expert.

When you start a project, available expertise is a very important criteria.
Fight key loggers: write some perl using vim
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Why C++, SDL ?

Post by loonycyborg »

Boucman wrote:mainly because the lead developer is a C++ expert.
AFAIK the project's founder is a Java expert too :)
"meh." - zookeeper
Panda_
Posts: 15
Joined: July 8th, 2005, 5:47 pm

Re: Why C++, SDL ?

Post by Panda_ »

Well, i ask because i'm about to start a project.

While i'm good on C++, i don't know much about Java.
In the first direction, i will code it quickly and i won't experience a lot headaches (my main concern is to build executables for each architecture), but i will have more to write down.
On the other hand, i will have to learn Java (it's always good) thus i will have more difficulties, and i should have less to write (Java isn't better, but you can build things quicker), but i will have more experience globally.
Isawa Aneko
Ishiken

"Dead ? Me ? My clan is in danger, and the Empire is falling ! I don't have time to die !"
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Why C++, SDL ?

Post by loonycyborg »

Panda_ wrote: (Java isn't better, but you can build things quicker)
That is not generally true. Depends on nature of your project and libraries you'll be using.
EDIT: Oops! Thought you're referring to coding speed, not compilation speed. :oops:
My point covers "should have less to write" part.
"meh." - zookeeper
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: Why C++, SDL ?

Post by Sapient »

Panda_ wrote:Why wasn't it Java?
People suggest this so often that it should be in the FPI list...

http://www.wesnoth.org/forum/viewtopic. ... 599#p86599

If you search for posts by Dave containing the word "Java" you may find some more threads too.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
ciclemur
Posts: 7
Joined: November 25th, 2008, 1:55 am

Re: Why C++, SDL ?

Post by ciclemur »

Hey, I\'ve been meaning to ask this as well. C++ is so nasty, just getting it to compile could take a while. I tried to learn wxWidgets a while back, but I just didn\'t like it, it\'s not just straight forward programming, gotta insert lots of macros and stuff.

Alternatively, Freebasic would be great for writing games, no problems compiling, compiles fast and easy to learn. It includes lots of built in add-ons like SDL, lua scripting, OpenGL, etc. Nicest of all (for me anyway) is it\'s tiny binary size, basic standalone program compiles to less than 100kb in Windows.

For application programming Lazarus is great, it\'s like Delphi 7. Lazarus is a fantastic IDE for freepascal which provides good RAD abilities, unfortunately it\'s being held back by a very unorganized community organizers. Useful components are all over the place, but main problem is forums is usually slow as hell, well it was anyway a few weeks back. I hope they get their act together because the product is really awesome.

Actually my ideal programming language would be something like PHP, I just love the \'feel\' and simplicity of it, I wish they would turn it into a real programming language, basic and pascal is not as nice to program in. Perl is nasty, it\'s like Frankenstein.

My issues with Python is it\'s stand alone binaries are huge and includes lots of files (am I doing it wrong?)
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: Why C++, SDL ?

Post by Dave »

loonycyborg wrote:
Boucman wrote:mainly because the lead developer is a C++ expert.
AFAIK the project's founder is a Java expert too :)
Actually not really. I programmed quite a bit in Java about eight years ago, but not since then. I had a strong dislike for Java when it didn't have generics included. I might like it more these days, but I haven't used it for any substantial projects. I know C++ much better than I like Java.
ciclemur wrote: ... C++ is so nasty ... Alternatively, Freebasic would be great for writing games ...
I look forward to playing your game that will blow Wesnoth (and most other games) out of the water by use of this superior technology.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: Why C++, SDL ?

Post by Dave »

Panda_ wrote: Why BfW was coded in C++? Why wasn't it Java? What pros C++ had, other languages didn't ?
I know it's one of the most powerful langage available (etc etc),
(1) I knew C++ very well
(2) I knew that most games are developed primarily in C++

Why would I even have any reason to research a different option? It's like wanting to travel to another continent, being handed an airplane ticket to get there, and knowing that most people travel by airplane as the preferred option to travel somewhere these days. You wouldn't even consider something else.
Panda_ wrote: Why did you choose SDL?
I know it's free. But when i used it, i had the feeling it wasn't a good library (awful approach, limited possibilities, and it's really old).
I don't know of any other option that allows development of cross-platform games easily. I'd be interested in hearing about alternative technologies.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Why C++, SDL ?

Post by loonycyborg »

Dave wrote: I don't know of any other option that allows development of cross-platform games easily. I'd be interested in hearing about alternative technologies.
Allegro. I'd be interested in hearing why you didn't hear about it considering that Wesnoth and Allegro share a developer(allefant) :)
"meh." - zookeeper
User avatar
Iris
Site Administrator
Posts: 6798
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Why C++, SDL ?

Post by Iris »

ciclemur wrote:Hey, I\'ve been meaning to ask this as well. C++ is so nasty, just getting it to compile could take a while.
That's a poor excuse. Compile time is not important - run time is important, however.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Panda_
Posts: 15
Joined: July 8th, 2005, 5:47 pm

Re: Why C++, SDL ?

Post by Panda_ »

What's the method you use to build executables for Windows, linux and mac (32/64) ?
Isawa Aneko
Ishiken

"Dead ? Me ? My clan is in danger, and the Empire is falling ! I don't have time to die !"
User avatar
loonycyborg
Windows Packager
Posts: 295
Joined: April 1st, 2008, 4:45 pm
Location: Russia/Moscow

Re: Why C++, SDL ?

Post by loonycyborg »

Panda_ wrote:What's the method you use to build executables for Windows, linux and mac (32/64) ?
gcc driven by various cross-platform build systems or IDE project files.
"meh." - zookeeper
ciclemur
Posts: 7
Joined: November 25th, 2008, 1:55 am

Re: Why C++, SDL ?

Post by ciclemur »

Dave wrote:
I look forward to playing your game that will blow Wesnoth (and most other games) out of the water by use of this superior technology.

David
Eh, I posted a reply to this before but it's gone now? Because of server problems or something else...?

Anyway, just wanted to say don't have to be so touchy about it. :wink:
Post Reply