Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


C++ or another language


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
51 replies to this topic

#1 ndrul   Members   -  Reputation: 100

Like
0Likes
Like

Posted 13 August 2011 - 10:22 AM

Hello again.

Several days ago I was on these forums, determined to make my first game, a text based rpg. I got the help I needed then continued with my project. I read an article about how C++ is a bad beginner language and you should start with a simpler language. That's when I realized that I had been working on a text-based game for a week and hadn't even done the hard stuff.


Should I continue with C++? I have been learning it for almost 2 months, so I am rluctant to give up. But C#,C, or maybe even python/java, are supposed to be more productive and beginner friendly.

So what do you recommend? I want to be productive and I also want to be able to create a halfway decent 3D game. In your answer, could you list your experience?

Sponsor:

#2 ryan20fun   Members   -  Reputation: 1071

Like
0Likes
Like

Posted 13 August 2011 - 10:30 AM

C# is very similar to C++, with exception to memory management. it has a Garbage Collector, so no need to worry about freeing the memory.

C# + XNA will be a quicker path to making your game.
Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

#3 Serapth   Crossbones+   -  Reputation: 5581

Like
1Likes
Like

Posted 13 August 2011 - 11:23 AM

In recently working with C++ again for the first time in ages, the tools are as big a barrier of entry as the syntax. Not only do you have to learn about the linker, binary formats, preprocessor and a bunch of other crap before your code works.

In C#, you download it and start writing code, at worse you need to add a reference.

This alone makes c# more beginner friendly.

#4 lukeymoo   Members   -  Reputation: 106

Like
1Likes
Like

Posted 13 August 2011 - 01:06 PM

When you look at your Text based RPG, never, ever expect it to be good looking the first week, it's your first game. Not only that, but you've chosen an extremely complicated Game genre 'RPG', you have to have many different variables etc. I think you should just make a text based fighting game, like for example:

Your turn...
1. Punch ( Attack 4) - > whereas Attack can be blocked more likely
2. Kick ( Attack 3) - > Kick has less likely hood of being blocked
3. Heal ( 3 left) - > you can only heal a certain amount of times

This type of game is mostly on luck.

To create an attack system, read up on the rand() function, and use it to pick between a max number
Example:

rand() % 100
~~~
rand() % 5

And simply check whether or not the number is a specific number or greater/less than a specific number
Using 100 is obviously going to be a number to big for attacking
5 is probably the better choice.

I think your more of a 'I just wanna see gameplay' type of game developer, If that's the case, you should be using game maker to make, the actual game-play rather than programming. Because a programmer knows how difficult programming can be and won't tell himself, I'm not getting *squat* done. You'll only discourage yourself, instead look at every little thing you add to the game, and tell yourself that you've reached a new milestone. It's your first game, relax, it may take a while to actually get something playable. But when you do, be sure to post a link to download, because I wanna try it out.

#5 ndrul   Members   -  Reputation: 100

Like
0Likes
Like

Posted 13 August 2011 - 03:15 PM

When you look at your Text based RPG, never, ever expect it to be good looking the first week...
I think your more of a 'I just wanna see gameplay' type of game developer, If that's the case, you should be using game maker to make, the actual game-play rather than programming. Because a programmer knows how difficult programming can be and won't tell himself, I'm not getting *squat* done...
But when you do, be sure to post a link to download, because I wanna try it out.



I'm not a programmer that is just looking for results. It just that I had heard that a working tetria game can be made in a week so I was worried.

I already use the rand() func for fighting in the rpg. and I will post it when I finish.

But I am still questioning whether I should switch to c#.

#6 Ravenshade   Members   -  Reputation: 100

Like
0Likes
Like

Posted 13 August 2011 - 03:54 PM

Two months o.o; Depends on how many hours, but I'm guessing you're quite familiar with most of the functions so stick with C++. That being said if you haven't put that many hours into it consider switching. Personally I want to broaden my horizons a tad so I want to recode what i've done in c, into python. Might be a good choice for you as well.

#7 PaladinJohn   Members   -  Reputation: 130

Like
1Likes
Like

Posted 13 August 2011 - 04:12 PM

I'm a fellow new programmer, so keep in mind my advice is coming from another person navigating the same sea of choices and challenges you are but...

Two years ago I thought I'd go full force and teach myself C++ to break into game programming despite all the nay-sayers. After about 3 months, my greatest accomplishment was a text based version of Blackjack and I hit a wall, giving up soon afterwards.

Being the stubborn person I was, I picked up programming again about a month or so ago, but this time I decided to try something easier with Python. I learned everything I had learned from C++ in Python in about 3 days, and after 2 weeks of diving into Python I had created my first game, a simple top down shooter. This is also learning the language between a job and taking care of my daughter, so it's not like I had tons of time to devote to it. While Python does have a few limitations I took for granted while learning C++, I'm proud of my choice.

What I would suggest for you is to take a moment, step back, and look at your progress. If you're still making progress, no matter how slow, keep at it. C++ is a very useful language to know no matter how frustrating it is to learn. If you ever find yourself hitting a wall, don't give up. Learn C# if that's what interests you. Learn another language. Learn, learn, learn, and you will be surprised at what you are able to do and the skills you have acquired. I do one day plan to go back to C++, but not until I can competently and reliably program in Python.

#8 ButchDean   Members   -  Reputation: 110

Like
0Likes
Like

Posted 13 August 2011 - 04:14 PM

Hello again.

Several days ago I was on these forums, determined to make my first game, a text based rpg. I got the help I needed then continued with my project. I read an article about how C++ is a bad beginner language and you should start with a simpler language. That's when I realized that I had been working on a text-based game for a week and hadn't even done the hard stuff.


Should I continue with C++? I have been learning it for almost 2 months, so I am rluctant to give up. But C#,C, or maybe even python/java, are supposed to be more productive and beginner friendly.

So what do you recommend? I want to be productive and I also want to be able to create a halfway decent 3D game. In your answer, could you list your experience?

If you are a beginner certainly learn C++ until you are comfortable with it first then maybe move on to learning to write a game.

C# (with or without the XNA combo) uses the .NET Framework and is Microsoft-specific. It has great tools to aid game development as far as I'm aware, so if you're happy taking that route to only write games for Windows then at least have a look at it.

I certainly wouldn't recommend learning C++ and writing a game at the same time (even though I saw a book on doing just that today!). Posted Image




#9 lukeymoo   Members   -  Reputation: 106

Like
0Likes
Like

Posted 13 August 2011 - 04:44 PM

Well, I'm currently learning x86 assembly, C++(4 years and still learning), and I plan on learning C# to make games available for Xbox Live Arcade. When I get to a point where I can churn out 2D games like nothing, Then I'll move to DirectX or Maybe OpenGL (it's industry standard I believe) and begin making 3D games.

#10 Telastyn   Crossbones+   -  Reputation: 3726

Like
0Likes
Like

Posted 13 August 2011 - 04:50 PM

I recommend C# for pretty much anyone looking to program who has a remotely modern windows machine.

But pretty much anything but C++ will do.

#11 lukeymoo   Members   -  Reputation: 106

Like
1Likes
Like

Posted 13 August 2011 - 04:58 PM

Well When I jumped into C++ I was so confused, But I stuck with it, and now I pretty good with it. If I were you I'd just stick with it, because eventually you'll want to switch back.

#12 doombunny3   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 August 2011 - 05:13 PM

If you think you can tackle C++, then go for it, since you know what it's like you can be the judge. If you switch languages, it may help you, but learning C++ is like learning Latin. When you learn it you'll recognize a lot in other languages. C# is fairly similar and fairly easier. You will produce games faster in XNA but if you want to get serious you will eventually have to learn C++. So it's up to you. If you feel to stressed then switch. If you feel you can handle it then keep it.

Don't switch just because someone says: "You should start with another language".
Switch because you feel, yourself, that it is too hard at the moment.

#13 Telastyn   Crossbones+   -  Reputation: 3726

Like
2Likes
Like

Posted 13 August 2011 - 06:00 PM

Don't switch just because someone says: "You should start with another language".
Switch because you feel, yourself, that it is too hard at the moment.


Or y'know... switch if you care about getting anything done anytime soon.

#14 doombunny3   Members   -  Reputation: 102

Like
0Likes
Like

Posted 13 August 2011 - 10:07 PM


Don't switch just because someone says: "You should start with another language".
Switch because you feel, yourself, that it is too hard at the moment.


Or y'know... switch if you care about getting anything done anytime soon.


Your going to switch back to C++ eventually, so if you learn it know you can get stuff done later :).

It's not like he has deadlines to meet or anything. It's a good language, even if it is tough, but again totally personal choice if you want to stick it through or switch.




#15 ryan20fun   Members   -  Reputation: 1071

Like
0Likes
Like

Posted 13 August 2011 - 11:53 PM

If you are a beginner certainly learn C++ until you are comfortable with it first then maybe move on to learning to write a game.

C# (with or without the XNA combo) uses the .NET Framework and is Microsoft-specific. It has great tools to aid game development as far as I'm aware, so if you're happy taking that route to only write games for Windows then at least have a look at it.


C# is not platform specific per-say, have you ever heard of Mono ?
it will enable your .Net app to run on Linux and Mac, with exception to a few features( there is a page telling what is supported, but a lot of it is, and all of the .Net 2 is )
Never say Never, Because Never comes too soon. - ryan20fun

Disclaimer: Each post of mine is intended as an attempt of helping and/or bringing some meaningfull insight to the topic at hand. Due to my nature, my good intentions will not always be plainly visible. I apologise in advance and assure you I mean no harm and do not intend to insult anyone.

#16 laztrezort   Members   -  Reputation: 968

Like
1Likes
Like

Posted 14 August 2011 - 12:01 AM

If you really care about producing something, and ignoring other factors, C++ is a bad choice IMO. This goes for beginner and non-beginner alike.

I have used many languages over the years, and I can honestly say that I would never willingly choose to go back to C++ unless I had to. There are some potential reasons why I would have to program in C++ (existing code maintenance, interfacing with a particular library, etc.), but as I am mostly a hobby programmer, I have been able to limit these situations to nearly zero over the last few years.

That said, learning multiple languages is important to becoming a competent programmer. However, if you feel you are getting nowhere with a particular language, try learning a different one - you can always come back to it later if you want learn it.

Of course, my opinion only etc.

p.s. Often in these types of threads, which occur periodically, someone with claim that "only real game programmers use C++" or "C++ is faster/more powerful". I would advise ignoring these anti-wisdoms if they crop up, since they are completely meaningless.

#17 brickets   Members   -  Reputation: 111

Like
0Likes
Like

Posted 14 August 2011 - 03:39 PM

I've personally been learning C++ myself as well. Right now I'm also in the crossroads wondering if I should switch now to C# for development.

After reading so much it seems like it's wise to use C# for its RAD and simplified properties. However what if development time really isn't critical at the moment? Would delving deeper into C++ instead be more worthwhile to learn proper memory management and other "inner workings"?

I don't think what I'm looking for as seeking for the faster or more powerful tool. With all the language choices out there it's pretty much a pain to find out what each one's extent or limitation is.

While eventually learning both and other languages is a possible in the future, for myself it's more of a matter of whether or not we can use C# as our primary (preferred?) tool of choice for games and other possible applications for years to come. If not, it seems to me it may be better to just use a much more trusted general tool instead.

Sorry I'm just a ball of confusion :)

#18 Serapth   Crossbones+   -  Reputation: 5581

Like
0Likes
Like

Posted 14 August 2011 - 03:43 PM

I've personally been learning C++ myself as well. Right now I'm also in the crossroads wondering if I should switch now to C# for development.

After reading so much it seems like it's wise to use C# for its RAD and simplified properties. However what if development time really isn't critical at the moment? Would delving deeper into C++ instead be more worthwhile to learn proper memory management and other "inner workings"?

I don't think what I'm looking for as seeking for the faster or more powerful tool. With all the language choices out there it's pretty much a pain to find out what each one's extent or limitation is.

While eventually learning both and other languages is a possible in the future, for myself it's more of a matter of whether or not we can use C# as our primary (preferred?) tool of choice for games and other possible applications for years to come. If not, it seems to me it may be better to just use a much more trusted general tool instead.

Sorry I'm just a ball of confusion :)


Frankly I think a C# programmer that switched to C++ will be a better C++ programmer than someone who learned C++ as their first language.

Less bad habits to unlearn.

That said, moving to C++ from C# once you've learned the in's and out's of C# would be my definition of pain. Many people make the move one way, very few people make the move the other way unless forced.

#19 hannesnisula   Members   -  Reputation: 1034

Like
1Likes
Like

Posted 14 August 2011 - 03:51 PM

No point in not continuing with C++ as it's a very powerful and straight-forward language.

#20 Serapth   Crossbones+   -  Reputation: 5581

Like
3Likes
Like

Posted 14 August 2011 - 03:54 PM

No point in not continuing with C++ as it's a very powerful and straight-forward language.


LOL, anyone that calls C++ straight forward, doesn't know C++ that well. :)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS