Page 1 of 2

Easiest programming language for irrLicht (beginners )

Posted: Sat Nov 06, 2010 9:49 am
by wahagn
Hi,

I want to make a small game (fps) with Irrlicht and I wonder wich programming language would be the best or easiest.

1.wIch programming language is easy?? Lua ??

2.Could somone point me at sites where I could see how to use these programming languages with irrlicht? or can I just use it right away if I know that programming language ? I mean the difference in using just that programming language and mixing it with irrlicht.

3. And is it smart to change from c++ to another language if I want to make a game, or is c++ better for making games??

Re: Easiest programming language for irrLicht (beginners )

Posted: Sat Nov 06, 2010 10:32 am
by ent1ty
wahagn wrote: 1.wIch programming language is easy?? Lua ??
a) Lua is a scripting language
b) The easiest programming language for me is C/C++ . I started a couple years ago with Pascal, but after creating one bigger app(500 lines of code :D ) i found it very limited, i've also tried some php and i've seen some python code, so now for about a year and a half I'm working(more like having fun ;) ) with C++, and I like it :)
wahagn wrote: 2.Could somone point me at sites where I could see how to use these programming languages with irrlicht? or can I just use it right away if I know that programming language ? I mean the difference in using just that programming language and mixing it with irrlicht.
For C++, see http://www.cplusplus.com/doc/tutorial/
wahagn wrote: 3. And is it smart to change from c++ to another language if I want to make a game, or is c++ better for making games??
C++ is the industry standard.

Posted: Sat Nov 06, 2010 10:46 am
by wahagn
@ent1ty

do you think that pascal would be good enough to use it. I mean you said that it's limited but would it make it for this job.. so a small fps game??

and how many lines of code will my game be?? <- I'm planning to make like 10 different level ( not very big levels) and i want ot make the graphics not that good so you can play it on a bit slower computers too

Posted: Sat Nov 06, 2010 10:56 am
by ent1ty
I think i saw somewhere free pascal wrapper for irrlicht, but i'm not sure. So, if there is a wrapper, then yes, it would be possible.

However, i would advise against it. If you have no experience in programming, then you should first try some easy, console apps in pascal or c++, and then start making games. I'm working with Irrlicht for like a year now, but i haven't finished a single game, because i had no knowledge of creating games, and the entire structure of my code was... well, hell. So every time i realized it, i started from scratch, and every time made the structure a bit better. Hopefully, i am now in the state, where can i actually finish a game :lol:

Posted: Sat Nov 06, 2010 2:30 pm
by serengeor
I agree to entity, first you have to know the basics of the programming language you're going to use, then you need to make a design for your game logic.
Making a framework for game without a basic design is like hell, I have tried to writte 3~6 frameworks, for a basic marble game, all of them failed because there was no design.

For me pascal is mostly the same as c++, tough I learned c++ (almost, still having some troubles when it comes to templates) before pascal, and i like c++ more, because it gives me more power with lots of powerful libraries already available.

And a wrapper would make the game a lot slower I guess.

Also I would not recomend to start of game creation journey from FPS games, even if its simple ( and by simple I understand that it will be just blocks of messy code that would somehow work)

Writting a game like, pong, tic tac toe, some kind of marble racing would be a good start I guess.

Posted: Sat Nov 06, 2010 3:21 pm
by slavik262
Feel free to check out C#. It's a managed language very similar to C++, but with garbage collection, and there's an up to date Irrlicht wrapper for it (IrrlichtLime).

Here's a cool site that talks about the most commonly used programming languages, as measured each moth:

http://www.tiobe.com/index.php/content/ ... index.html

Posted: Sat Nov 06, 2010 3:27 pm
by ent1ty
Wow, why is C being used more the C++? :shock: I thought that C wasn't used nowadays.

Posted: Sat Nov 06, 2010 3:34 pm
by slavik262
Two words: embedded programming. C is simple, and C is fast - faster than pretty much anything but raw assembly (even faster than C++). This makes it a perfect candidate for coding devices from phones and remotes to MRI machines.

Posted: Sat Nov 06, 2010 5:45 pm
by macron12388
I've only used Python, and Lua extensively. I have just recently gotten into compiled languages. I have to say, they are so freeing! Since it is lower level, you get more computing power, and more direct access to all the grit that goes on in the background. It WILL take you longer to learn, but I have to say, from my experience so far it is more than worth it!

Posted: Mon Nov 08, 2010 7:55 pm
by wahagn
slavik262 wrote:Two words: embedded programming. C is simple, and C is fast - faster than pretty much anything but raw assembly (even faster than C++). This makes it a perfect candidate for coding devices from phones and remotes to MRI machines.
^^ You think that C is faster en more simple, then would you recommend me to use it for my game and if so do you know a wrapper for using it with irrlicht ?? And do you think it's faster to learn it in comparison with c++??

Posted: Mon Nov 08, 2010 8:27 pm
by Bate
slavik262 wrote:C is [...] even faster than C++
That is just wrong. :)

In case someone's interested, here's a nice and detailed article on the C versus C++ discussion, including several test cases and results:
link

Posted: Mon Nov 08, 2010 8:30 pm
by slavik262
wahagn wrote:
slavik262 wrote:Two words: embedded programming. C is simple, and C is fast - faster than pretty much anything but raw assembly (even faster than C++). This makes it a perfect candidate for coding devices from phones and remotes to MRI machines.
^^ You think that C is faster en more simple, then would you recommend me to use it for my game and if so do you know a wrapper for using it with irrlicht ?? And do you think it's faster to learn it in comparison with c++??
C++ was designed to be a "better C." C++ is very nearly a superset of C - almost all C code will compile as C++ code. C++ adds classes and other Object Oriented Programming capabilities to C. I'd recommend you just learn C++ if you're looking into C. When you're done, you'll find you know C as well. :D

Posted: Mon Nov 08, 2010 9:04 pm
by agamemnus
FreeBasic. :D

Posted: Mon Nov 08, 2010 9:58 pm
by slavik262
Bate wrote:
slavik262 wrote:C is [...] even faster than C++
That is just wrong. :)

In case someone's interested, here's a nice and detailed article on the C versus C++ discussion, including several test cases and results:
link
Let's not start a C/C++ fight. I didn't say C is significantly faster than C++. I'd pick it any day when coding for a PC over C due to the increased flexibility. However, if there was no reason to use C anymore, it wouldn't be used constantly in embedded environments instead of C++. Writing in C in embedded systems does give the following advantages:
  • Speed: C can offer a slight speed boost at some times simply because it is designed to be extremely close to the hardware. The flexibility of C++ brings us out of the hardware slightly more than C.
    Where the "C is faster than C++" argument comes from:

    With C you focus on more details than pure C++. For example if you add some string to an existing stl string, you won't be sure if you are allocating a buffer or not. With C you can be sure that you re-use exactly the old buffer.

    Ditto with any STL container, most of your memory will be allocated on the heap, even know your object is created on the stack. With C you can be sure that you allocate your memory on the stack which is faster than the heap.

    Another point is that of vtables with polymorphism. With C you won't have lookups for function calls in a vtable. They will be direct. A vtable function call is slower than a normal function call.

    Of course compiler optimizations will optimize many things for you so both languages will be equivalent, but not the mentioned stuff above. Also, when I say C is faster than C++ it is by such a little amount that most programs won't care.
    For normal programs on a desktop/laptop, the difference is so small it's trivial, but for code that needs to run as fast as possible (e.g. hardware drivers, text rasterizers, etc.), you want all the speed you can get. In some instances, hand-optimized assembly is used because speed is that important.
  • Simplicity: C++ is a much more complex language than C due to all its additional features. It's much easier to create a C compiler than a C++ one, and this can be important due to all the different processor architectures an embedded programmer might code on.

Posted: Mon Nov 08, 2010 10:34 pm
by Bate
slavik262 wrote:Let's not start a C/C++ fight.
Then why are you doing it anyway? ;) That's why I've chosen to only post a link that confutes all of your statements, rather than summerizing various articles I've come across thus far.