How usefull is C++ for you cool guys who knows it?

Chat about anything not covered in these forums, but keep it civil!

Post » Wed Aug 11, 2010 11:26 pm

Ive been planning, testing and working on the same project for about 2 years, and im counting on about another three years before its finnished. Ive made quite some progress with the engine, and ive really tried to keep it clean to avoid a (read; too many) rewrite(s). But im still pretty sure Ill rewrite it at some point(s), and because of all the time Im planning to spend Im wondering if its a good idea to spend half a year learning C++, and then remaking it with some custom plugins for this and that. I just want to get the best tools available before i dig to deep, because it will suck to realize after a few years that i wasted half of the time and could have done it in a much easier way.

Im also thinking about just making test engines for now and waiting for construct 2 before i put it all together. is there ANY time approximation for when construct2 might be finnished? Are we talking one year or five years?

If you have any other suggestions on how to approach this (things to read, tools to use etc.) feel free to post it. Just dont discourage me from making a game this big, Ive heard it (and said it myself) enough.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Wed Aug 11, 2010 11:50 pm

I know C++, The dude saved my life three times.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Thu Aug 12, 2010 12:16 am

I don't know much of C++, but I did program in C long ago. C++ kind of scared me off back then, because it wasn't widely used, and it seemed unnecessary to me. The scene has changed a bit, though. ;)

In my opinion, any programming language, if you have a good reason to use it, is useful to learn. C++ can be used to create pretty much any software project, so it definitely should be considered useful. I'd also venture to say that once one learns C++, pretty much any other language should be easy to learn after that.

On the other hand, there are some definite drawbacks to using C or C++, if you don't need it's unique abilities. While some prefer such things, I have moved away from statically-typed, compiled languages where you have to manage every aspect of your program's memory usage yourself. I don't need that.

There are some solutions to make memory management easier, though. If you aren't careful about how you develop in C++, you can get some very hard to find bugs with bad pointers and such.

It does have a huge amount of libraries that can be used. All of them aim to make certain tasks easier. Just have to be able to find the right ones for you, which can take time.

Anyway, if you anticipate speed problems with your project, it's definitely a good solution to that problem.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Thu Aug 12, 2010 1:17 am

I dont really like doing unnescessary stuff either.. but being able to make plugins would be sweet. But maybe learning python would be time better spent? The problem is- i dont really know what problems Ill encounter, i just assume Ill run in to situations where programming knowledge would come in handy.
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Aug 12, 2010 2:02 am

Python is often named as a good first programming language to learn, and it's definitely useful as well. It's my favorite language yet, personally. It's also the one that led me to 'get' the usefulness of object-oriented programming, though it supports multiple programming paradigms as C++ does.

I like dynamically-typed, interpreted languages with garbage collection, and Python fits the bill quite well. IMO, this allows you to focus more on solving the problem, and helps in learning and debugging.

Possible downsides are that it's not as fast as a compiled language, and it's not well-suited to closed-source development.

It is easier to port programs written in it across multiple platforms, though. For the most part, they just work.

I picked it up after getting Construct a few months ago, and I feel quite proficient in it, having written several programs for my own use, and one for work in that time.

I can see myself tackling C++ eventually, because of the ability to write plugins. Because Python and C++ can be intermingled in other projects, as well.
B
3
S
2
G
2
Posts: 187
Reputation: 1,449

Post » Thu Aug 12, 2010 12:24 pm

[quote="Attan":1p3xfray]is there ANY time approximation for when construct2 might be finnished? Are we talking one year or five years? [/quote:1p3xfray]
Realistically, probably closer to five years for maturity. In other words, no idea!

I'd agree with others that if you want to just learn how to program, Python is a good place to start. The fundamentals of programming languages transfer well from one language to another so you should be able to switch easily after getting to grips with one. After that I'd recommend C# instead of C++. It's much easier and cleaner language. C++ has a huge amount of legacy and historical issues overhanging it - things like header inclusion and the linker (linker errors will drive you nuts) make it more difficult, and it's down to you to get things like memory management right, which is much more difficult than it sounds. C# also has a big library to help you do day to day programming tasks easily. These days you have to have pretty good reasons to choose C++ instead - we're using it in Construct for a number of reasons, like redistribution requirements, performance, portability, specific libraries, and our past experience with the language. Chances are those aren't relevant reasons for you.

On the other hand, C++ will teach you more about how computers actually work, since you deal with the raw low-level bits and bytes and pointers. It also has some pretty unique features, like the way templates work (which is different to generics in other languages, with pros and cons), different kinds of smart pointers, more recent move semantics, and such.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Aug 12, 2010 12:46 pm

I seem to have migrated through all the BASICs since C++ was just too frightening for my poor brain :P

I started off on PureBASIC which is incredibly fast and compact, and powerful too. I did use IBASIC for a while too but I think that one disappeared... which is a shame, I think I still have the bare bones of an OpenGL based '2d-using-3d' engine around here somewhere!

After that I started experimenting with PureBASIC again and then I drifted away from coding altogether...

It does make me wonder though, PureBASIC became quite popular in the DarkBASIC Pro community for it's ability to perform so well and do low level stuff, and build DLLs - therefore people used it to code DLL-based plugins. Can it be used for Construct in the same way?
B
15
S
6
G
6
Posts: 103
Reputation: 2,968

Post » Thu Aug 12, 2010 1:00 pm

But you have to use C++ to make plugins right? Or can you use other languages for that?
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Aug 12, 2010 2:07 pm

You can design a plugin architecture in most languages I think. It might actually be easier in a language like C#, because C++ has lots of nasty binary compatibility issues to work around, in case someone builds your SDK in a different compiler, or even the same compiler just with different settings - in which case nearly all C++ classes become incompatible and you have to rely on C datatypes. It's a headache!

Mind you, part of the reason I like C++ is the challenge of figuring out the hacks for these issues - not really a good reason for people who want to be productive though :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Aug 12, 2010 2:20 pm

This might be a really stupid idea, i don't know since i don't know how this stuff really works, but wouldnt a Python SDK be nice? I guess many people will learn python now because of its part in construct, wouldn't a python sdk result in much more people being able to contribute with plugins?
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Next

Return to Open Topic

Who is online

Users browsing this forum: cdiaz2884 and 3 guests