Jump to content
  • Advertisement
Sign in to follow this  
rnw159

When is it really worth it?

This topic is 3072 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I love to program and I had been working on a level editor for a game I was making for about 8 hours. The editor was able to sync up with the game and I was able to make levels. I made the editor in c++.

Anyway, I was talking to a friend on msn and I told him about the editor and how proud of it I was. He asks to see it so I send it over to him. The guy then proceeds to make an exact replica in game maker that can do everything mine can but faster. It takes him about an hour.

His software runs faster and took less time. I had always been told that in c++ you could make more powerful products even if it took more time. Why was he able to totally trample on my project? Was learning c++ really worth it?

edit: I accidentally said less time. changed to more.

[Edited by - rnw159 on July 13, 2010 10:51:17 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by rnw159
His software runs faster and took less time. I had always been told that in c++ you could make more powerful products even if it took less time. Why was he able to totally trample on my project? Was learning c++ really worth it?

You were lied to, for starters. (And, yes, learning C++ was worth it.)

C++ is not magic pixie dust. It doesn't automatically make programs more "powerful" or "faster." If you write bad C++ - and, no offense, you probably write bad C++ - then your program will still suck. Writing applications in C++ also tends to take longer because of the complexity of the language and number of edge cases, as well as due to the lack of substantial infrastructure in a vanilla toolchain install. You need complementary libraries from third parties to bolster what C++ itself provides.

For a huge class of applications, C++ is simply not the best choice. What you haven't yet learned is the value of knowing multiple languages and how to choose among them for a given project's constraints. Are you surprised to learn that many professional game studios build their tools - editors and the like - in languages like C# instead of C++, even if the game engine is C++? Or that quite a few write their game logic and AI scripts in bytecode interpreted languages like Lua, Python, JavaScript, even LISP?

Don't worry about it. You'll get better. Look into your friend's GameMaker approach, learn from him. His app is probably faster for algorithmic reasons, which you can apply to C++. The upper bound on absolute performance is likely on your side, but for the application in question it is also likely irrelevant. After a certain point your users simply won't be able to notice performance increases.

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
Quote:
Original post by rnw159
His software runs faster and took less time. I had always been told that in c++ you could make more powerful products even if it took less time. Why was he able to totally trample on my project? Was learning c++ really worth it?

You were lied to, for starters. (And, yes, learning C++ was worth it.)

C++ is not magic pixie dust. It doesn't automatically make programs more "powerful" or "faster." If you write bad C++ - and, no offense, you probably write bad C++ - then your program will still suck. Writing applications in C++ also tends to take longer because of the complexity of the language and number of edge cases, as well as due to the lack of substantial infrastructure in a vanilla toolchain install. You need complementary libraries from third parties to bolster what C++ itself provides.

For a huge class of applications, C++ is simply not the best choice. What you haven't yet learned is the value of knowing multiple languages and how to choose among them for a given project's constraints. Are you surprised to learn that many professional game studios build their tools - editors and the like - in languages like C# instead of C++, even if the game engine is C++? Or that quite a few write their game logic and AI scripts in bytecode interpreted languages like Lua, Python, javascript, even LISP?

Don't worry about it. You'll get better. Look into your friend's GameMaker approach, learn from him. His app is probably faster for algorithmic reasons, which you can apply to C++. The upper bound on absolute performance is likely on your side, but for the application in question it is also likely irrelevant. After a certain point your users simply won't be able to notice performance increases.






I guarantee that his was not better for algorithmic reasons. Maybe I did write bad c++. I'm sure its not the best but I never thought It was bad. I have been programming in c++ for about 4 years. It took me about 8 hours to write the editor and now he is offering to give me his. He doesnt know c++ or any other language. He can drag and drop in game maker but thats about it.

Please help me, is there any way I can make my level editor faster? I thought it was fast but his is waaaay faster.

Share this post


Link to post
Share on other sites
I just feel so useless now. Like all my hard work over the years was nothing when it came up against game maker! I always thought that being able to make games super fast had some disadvantage.

Share this post


Link to post
Share on other sites
Did you have fun during those 8 hours? There's no need to approach this as a win-or-lose contest. You built something - you made something with your hands, and felt proud of it. That's a worthwhile experience all on its own.

As you get more experience (4 years is a great start, but you still have a lot left to learn), things will come out more quickly & smoothly, but enjoy the ride & don't sweat too much about where you 'should be'.

I also agree with the other poster than knowing a few different languages is extremely valuable, both for the right-tool-for-the-job thing as well as showing you different ways to approach problems.

Share this post


Link to post
Share on other sites
Quote:
Original post by snak
Did you have fun during those 8 hours? There's no need to approach this as a win-or-lose contest. You made built something - you made something with your hands, and felt proud of it. As you get more experience (4 years is a great start, but you still have a lot left to learn), things will come out more quickly & smoothly, but enjoy the ride & don't sweat too much about where you 'should be'.

I also agree with the other poster than knowing a few different languages is extremely valuable, both for the right-tool-for-the-job thing as well as showing you different ways to approach problems.


It felt great. Couple of fistpump moments.


It all went away when my work was run over by game maker. Why should I learn c++ when game maker can do make games faster and better?!



btw i mistyped my first post when i said i expected it to be faster. I think that I write good clean code and I stopped making horrible ram chugging mistakes about a year ago.

Share this post


Link to post
Share on other sites
So what specifically is slow in your app ?

Rendering ?

Calculations ?

Maybe people here can help "speed things up" but only if we know what the problem is.

Share this post


Link to post
Share on other sites
Do you realize that game maker was also probably made in C++ or a comparable language? The reason your friend made the program much faster than you is because he stood on the shoulders of giants. Someone wrote (good) code so that your friend had it easy while you worked from the ground up.
For reasons why you should use C++ (or similar) instead of game maker? Game maker is limited. If it doesn't have a certain feature, you can't do it. Maybe it features a scripting language to extend it, but that will have its limits too and be too slow for computation intensive features.

Share this post


Link to post
Share on other sites
Game maker is a high level tool, offering a large pool of functionality specific to game-making, something that c++ does not. Your friend almost certainly used much of this functionality without caring and/or knowing how this functionality was implemented. Thus I would say that your 'competitor' in this situation are the creators of game maker rather than your friend. So there is not any reason to be disappointed. A very valuable skill, as Oluseyi wrote, is being able to work with several diferent languages/tools and be able to choose the best one for each specific situation.

EDIT: OOPS! 4 new posts popped up while I was typing!

Share this post


Link to post
Share on other sites
My app wasn't that slow. It lagged a little bit when it drew to many tiles but that was about it. Its just that the game maker one was crisp and reacted to your every touch. It had all the same features as mine but it was faster in every way. How can I write my code to be as fast as that? How can I make my engine as fast as the game maker one?

edit: this is the app made by game maker: http://www.speedyshare.com/files/23361930/editor.zip

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!