When is it really worth it?

Started by
56 comments, last by ArKano22 13 years, 9 months ago
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]
Quote:Original post by rnw159Screw game maker.There's your sig quote for the forums :D[/quote]
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.
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, &#106avascript, 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.
Quote:Original post by rnw159Screw game maker.There's your sig quote for the forums :D[/quote]
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.
Quote:Original post by rnw159Screw game maker.There's your sig quote for the forums :D[/quote]
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.
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.
Quote:Original post by rnw159Screw game maker.There's your sig quote for the forums :D[/quote]
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.
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.
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!
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
Quote:Original post by rnw159Screw game maker.There's your sig quote for the forums :D[/quote]

This topic is closed to new replies.

Advertisement