Hey. I have a quick question. [Will it be extremely hard to learn C++ on my own]

Discussion in 'Indie Basics' started by Mashew, May 16, 2007.

  1. Fabio

    Original Member

    Joined:
    Sep 30, 2005
    Messages:
    499
    Likes Received:
    0
    That would logically mean that C++ is less productive, if you see it that way, but it's not. It's like saying "stop at elementary school and get to job immediately, you will be many, many years ahead others which get a degree and a master". It's logical but as you know it doesn't really work. The source of misunderstanding anyway is perfectly represent by the following statement:

    Maybe you are right in the context of indie gaming (although for top indie games you may not be). However, my fault has been that I haven't linked this thread with indie games development at all, but with the industry in general. Although I have developed commercial games in the past, which have been distributed worldwide and sold very well, I haven't finished an indie game yet (lack of time, currently it's only a hobby for me to return to games development), but I earn my livings with software and hardware development, and I cannot see Java as a replacement of C++, at all.

    For simple Indie games, if one doesn't want to get involved too much with programming and doesn't want to invest, then of course your reasoning is perfect, and flawless.

    As in most things, it's a matter of perspective and points of view.
     
  2. Spiegel

    Spiegel New Member

    Joined:
    Jun 26, 2007
    Messages:
    287
    Likes Received:
    0
    WHHHHAAAAAA????

    sorry Fabio, but I love C++ to the bone and even I cant say something like this... non-experts? Your kidding right... Its like saying that a hammer is for non experts when you could use a Phillips Wrench instead... they both can hammer a nail but the wrench can do more...
    They are both tools... you use them when you need one of them for a specific job, the same applies to programing languages...

    Yeah I say the same... you can have both world with C++, but sometimes it can be a pain,... and you know this... Just beacuse a language requires you to do less work it should not be viewed as flawed and non professional... some of the hardest and time consuming stuff I've done (online banking web servers) was made in java... I guess you dont think that most of the web applications you use over the web are professional... guess again...

    The same goes for flash.. and even the flamed GOTO command, guess what... THEY ARE TOOLS THAT HAVE THEIR PLACE, even goto (check linux kernel, full of them), use it wisely and then youll have a great array of technologies to use.... dont say badly of a tech just beacuse siomeone made a piece of sh**t software with them...

    When was the last time you used ASM in one of your personal projects???Or even professional ones?

    Sure I make a new STL lib every time I start a new project... :D
    Actually no... real programmers like to use proven libraries for the sake of our sanity... you cant beat the years of the Java API , and you wont do better then them...

    Like most of people do nowadays for C++ ;)

    QUOTING AN OLD PROGRAMMER a couple of years ago - "ASSEMBLY is full of defects and imperfections, I'm the first and foremost to say it, but at least it's a real programming language, and now those new kids and their C++ high level language that dont know jack about computers come here and tell me its better...

    Sorry Fabio, but I love C++ but cant stand fundamentalism... :D

    ...
    Tiago "Spiegel " Costa
     
  3. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    The clue there is "I haven't finished an indie game yet (lack of time)", which makes me wonder why Fabio has posted 400+ posts on this forum without any actual evidence to back up his opinions ;)

    <fx: runs for cover>

    Cas :)
     
  4. ChrisP

    Indie Author

    Joined:
    Feb 5, 2007
    Messages:
    971
    Likes Received:
    0
    IIRC Supreme Commander actually tracks every single projectile using its physics engine - and it has a lot of projectiles! The graphics are nothing particularly special though. So it may well be CPU-bound in many cases; not that I have any data to back this up.

    I'm also not saying that it would necessarily be slower if written in Java. Staying well clear of that minefield. ;)

    (Java does annoy me because it's just so verbose, but that's a source code style issue and therefore not relevant to the topic at hand.)
     
  5. electronicStar

    Original Member

    Joined:
    Feb 28, 2005
    Messages:
    2,068
    Likes Received:
    0
    It as been tested on several machines 500Mhz to 1+Ghz and the results were pretty consistent and dependant on the videocard (which is actually one of the problems of Java: it's not good for software display).
    The framework was very advanced with a lot of game code and I built a couple of prototypes with it. The only reason why I abandoned it (to use Blitz) is because I anticipated problems with distribution of Java programs (which problems are more or less fixed today). I can dig a link to the demo if you're interested.
     
  6. HairyTroll

    Original Member

    Joined:
    Jul 29, 2004
    Messages:
    582
    Likes Received:
    0
    And my Amiga is better than your Atari ST.
     
  7. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Meh, my C64 is better than your gay Spectrum.

    Cas :)
     
  8. Klaim

    Original Member

    Joined:
    May 30, 2006
    Messages:
    48
    Likes Received:
    0
    If you can, i'm interested :)
     
  9. bvanevery

    bvanevery New Member

    Joined:
    Jun 25, 2007
    Messages:
    369
    Likes Received:
    0
    Do you consider regular expression parsing to be "real programming?" I almost chose to do my current job in Ruby, because it has inherent regex support, but I did it in CMake script instead. CMake script is certainly not a real language, but you'd be surprised how far you can get with minimal functionality.

    It has the asm keyword as standard. The behavior is implementation dependent.
     
  10. Fabio

    Original Member

    Joined:
    Sep 30, 2005
    Messages:
    499
    Likes Received:
    0
    But I have finished commercial worldwide distributed games, cas. Are you smart enough to deduce something like an Indie game being a subset of a commercial game, if one wishes? What did you try to demonstrate? That one who has made commercial games doesn't have the skills to make indie games? Or that one who has made commercial games, if he wants to make some indie game now, must do it from Basic/Ruby/Java/LOGO on, instead of simplifying the commercial games development techniques he has already mastered?

    As I said, it's a matter of perspective..

    But I still don't get what's your point (and not only about your latest post ;) ).
     
  11. Fabio

    Original Member

    Joined:
    Sep 30, 2005
    Messages:
    499
    Likes Received:
    0
    That's for sure but I'm an Amigan, not an Atarist. :D
     
  12. Fabio

    Original Member

    Joined:
    Sep 30, 2005
    Messages:
    499
    Likes Received:
    0
    As long as CPU's will be designed, and for very good reasons, to be the way they are, LISP, Haskell, Ruby, etc.. will be very interesting programming languages and paradigms but in the end everything gets translated into machine code, thus I consider "real programming" the end structure that all past and modern (and probably future) CPU's follow (note that properly written and compiled OO code is not a problem here and is very akin to the CPU, just like procedural programming). It doesn't have to be machine code, but has to follow the typical data/code structure of the Von Neumann execution model. Functional programming is very smart and interesting, but is alien to the nature of the computer. I don't stick a positive or negative meaning to "real programming", I just say that everything that tries to abstract programming like virtual machines, or paradigms that lend themselves naturally to interpreters (and make it impossible or very difficult to a compiled implementation), or functional programming, or regular expression parsing is less "real programming" than whatever is more akin to what the CPU in the end is going to execute, whatever the language is. Efficiency of generated code is the first (but not the lone of course) signal of how far we are from the "real programming" of our non-intelligent machines.
    I am convinced that even today, with more MIPS than ever, it's us humans that must do efforts towards the machine, rather than the opposite, UNLESS we can accept that wasting orders of magnitude of CPU power is ok (which, in real time apps, can rarely be), but then can we really call ourselves "real programmers"? The only "real path" to a computation is the shortest one, and I'm afraid the shortest one is always the one more akin to the nature of the CPU and peripherals, i.e. the machine, not the human.
    When computers (meant as compilers, development tools) will be more "intelligent" than humans, then things will be very different, and I'll certainly accept it (if proven of course).
    There's more and more a trend, nowadays, towards shameless bloat and huge inefficiency: I consider this to be bad, and IN THE END also unproductive, and leading to worse profits, in a competitive world.
    The key for quality software is first of all quality development tools. I cannot consider any RAD-like standard tool as a good investment tool. It may shorten time to market for your first product, and it will probably do, but in the end it leads to a worse line of products and turns to be a bad investiment. In other words, no pain, no gain.
    And if I want to play with functional programming, or if I've a hurry to finish a product for a customer and an inefficient solution would be more productive, I prefer bigtime to extend a real language to perform (albeit less elegantly than e.g. in Haskell) also e.g. functional programming rather than turning the whole project, even if it costed less time, to a generally inferior and more limited / less flexible language.

    Now why this need to state obvious things? If you're in boards like the FASM one or the Win32Asm one, I'm registered there with the nick Maverick, so you may know that actually I know what I'm talking about.
    And, to answer to Spiegel, "When was the last time you used ASM in one of your personal projects???Or even professional ones?" last time was this morning. ASM has still a place in many fields, the problem of this thread is that it's in the Indie Gamers forum, if it was in some other forum it would sound much more normal.

    If we can consider this discussion to be general to CS then fine, if we must stick to think that it's only about the simplest Indie games one could develop to turn his lucky day into getting rich then I would close the thread immediately because it would be only a waste of time and flames then.
    You can make a great Indie game wasting 99.9999% of CPU power, but that's a different thing we're discussing here, at least for me.

    I think PacMan is a better game than many modern 3D games I see, and it could be efficiently run nowadays on the worst and most inefficient interpreted programming language, but does this thus prove that nowadays the worst and most inefficient programming language is generally good to use? Even just to write a PacMan game..?

    I don't think so. I believe there are many greys between black and white, but those are still better implemented in C++ (which is a language far from being perfect, I've stated this thousands times) than in Java or Ruby or Haskell as a whole.

     
    #112 Fabio, Aug 3, 2007
    Last edited: Aug 3, 2007
  13. bvanevery

    bvanevery New Member

    Joined:
    Jun 25, 2007
    Messages:
    369
    Likes Received:
    0
    Just to separate out this one point before talking about other things:

    Because my initial reaction to your comment was that you were flat out, completely, utterly, totally wrong. Then as I was writing up my response, I thought I'd better check whether something had happened in the C++ standard recently that I hadn't noticed. So I Googled. And I found that the asm keyword had been in place since the stone ages. But that behaviorally, the language was as I always thought. Inline asm has never been standard in C++, it has always been a vendor specific extension. I broadened my horizons to learn that there was a standard placeholder for it.

    I think, if you're going to put on airs with people about how real this or that is, you have a burden of being accurate. I posted this because you were sloppy. What you wrote, as written, is wrong. I mean, if this is going to be a big debating game, then make the right points! Otherwise why bother to make a such point?
     
  14. bvanevery

    bvanevery New Member

    Joined:
    Jun 25, 2007
    Messages:
    369
    Likes Received:
    0
    As for other points: I used to be obsessed with ASM optimization. Then I went bankrupt doing too much premature C++ and ASM optimization. Fast forward a few years, and a few wrong turns through open source and functional programming languages. Money is a big metric to me now. Is an approach cost-effective? Is a client going to get a result in 200 hours or 100 hours? Is it one shot throwaway code that nobody will ever have to maintain? Do I have overwhelming computing resources available, relative to the size of the problem? Then I can use a sloppy approach in a sloppy language, like regex parsing in CMake script.

    ASM optimization is expensive. A lot of times, it's just not commercially valuable to get caught up in that level of detail. If you're paid to write ASM day in and day out, you're exercising a specialty skill. You're doing a kind of development that cannot stand up on its own, it's inevitably a parasite on more fundamental types of software engineering. Now, being an ASM parasite can be exceedingly lucrative, if you're doing it for someone else who's got money to burn on it. But if you do it for yourself, you'll realize just how godawful unprofitable it is.
     
  15. Fabio

    Original Member

    Joined:
    Sep 30, 2005
    Messages:
    499
    Likes Received:
    0
    Currently I do a lot of Verilog development, and I am concerned with earnings as much as you are. I never said to abuse one's time with low level programming, I just said that this trend "the more bloated, the better" is not the solution to any problem, besides one's lazyness (or lack of skills). Of course, every development tool and every solution has its place and its reason to exist, but that's another thread and I'm off now, FPGA development is more interesting than all of this for me, which is only leading to a stupid flamewar and hair-splitting for nothing.
     
  16. Spiegel

    Spiegel New Member

    Joined:
    Jun 26, 2007
    Messages:
    287
    Likes Received:
    0
    First of all guys, let's all handshake and be friends... kiss kiss no bang bang...

    Now... Lets respect each other thoughts and feelings over a language or the other...

    I love C++, and Im not convinced yet that Java can have the same performance as C++...

    But I'm a software consultant in Portugal during the day and a crime fighter... I mean a indie gamer during "some" nights of the week. This lack of time made me think what must I choose... a programming language that makes me do the same as AAA titles (which right now I just not able to nor will I ever) and take a while longer to code or a programming language that makes me spare some time programing and still make good indie games... I don't have enough time as it is.. if there's a way to cut some time and produce good results... I'm in... Java alows me to cut some time (not because I lack the skills)

    Now that does not mean that I believe in C++ or Java more... It just shows that you must weight every thing (in this case I treasure my time spent coding more than I treasure fast performance graphics)... its a choice...

    There will probably come a day when I will try and do something that Java wont handle and I'll be back to C++, and I will trade PL without any regrets... because then C++ has become the best tool for the job... In the meanwhile, is the best tool nor is the only one...

    Like I said, its a matter of personal choice...

    Fabio does commercial games using ASM, so he NEEDS C++, I don't, most of us probably don't... Its no consequence for each other... no need to this flame war...

    I really must remember that in every programmer there's a fundamentalist :D
     
  17. princec

    Indie Author

    Joined:
    Jul 27, 2004
    Messages:
    4,873
    Likes Received:
    0
    Indeed, it is not as fast as C++ (though I suspect it will be, one day). In fact, normally it gets to only around 50% of the performance of C++ in raw throughput. Using the Sun server VM it can get to within around 80% last time I checked. What most of the zealot programmers don't get is that CPUs on PCs these days are so fast that it doesn't make any difference - they're getting fillrate and geometry bottlenecks instead. So they spend twice as long coding something in C++ so it's twice as fast but throw their profitability out of the window.

    And to put it another way for the benefit of the OP: we don't hire C++ programmers to write applications any more. Nor anyone who thinks that C++ is needed for performance reasons. People who think like this will be unemployed soon enough and wondering why. You'd be mad to learn C++ these days with a view to making serious money.

    Cas :)
     
  18. Spiegel

    Spiegel New Member

    Joined:
    Jun 26, 2007
    Messages:
    287
    Likes Received:
    0
    This was one of the things that we discuss between the people making our first game, and the majority of people agree that they prefer to spend less time coding... and making more fun games than making more fun & pretty games...
    So if java lets me make more games in less time... I welcome it...

    And 80% seems a tad low for me... I would think a bit more after what I have read... But even 80% is great to me...

    Most of the time I cant enjoy great AAA titles because of my Graphic Card, or sometimes because the game is just too fast... (anyone seen the transformers movie? or any racing game?). Heck the best fps I have played is UT (original) and I love the graphics even by todays standard... they just do they're job and thats that...
    Also one of the most profitable games of today's market (WoW) has great SUITED graphics (not great, not bad like people say, just SUITED)... in the end thats what we need in our games...

    Like Hideo Kojima said over Metal Gear Solid 2, Great graphics secure the audience for the first 10 minutes of a game... after that its all about gameplay... not the graphics...

    Like I said, Indie games can use Java with no performance problem whatsoever.

    I've been messing with JMonkeyEngine and LWJGL and I must say I'm rather impressed... this suits me just fine...

    Anyone else... Just use whatever they want...
     
  19. Alistair Hutton

    Alistair Hutton New Member

    Joined:
    Jun 13, 2007
    Messages:
    60
    Likes Received:
    0
    Mod! I would like these blatant lies removed from the forum please.
     
  20. oNyx

    Original Member

    Joined:
    Jul 26, 2004
    Messages:
    1,212
    Likes Received:
    0
    Real artists use MSPaint and a hex editor!

    Seriously, if you can speed up a specific step (remember programming is only a piece of the puzzle) by a factor of 2 to 5 for 99%¹ of the quality, then it would be outrageously stupid to discard that option.

    [¹ Eg if the game runs fine on 6 year old hardware, you most likely won't get any additional sales even if it would run 10 times as fast.]

    I know it's sad, but users simply don't give a damn how impressive your stuff is under the hood. They also don't care about the accuracy of your models or if there your style sheets are free of nonsensical statements.

    The only person who's interested in the beauty of perfection is the creator himself. (Yes, himself. Women don't have that kind of utterly pointless autistic traits.)
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer