#1 Members - Reputation: 238
Posted 04 May 2012 - 08:04 PM
Why do people want to make game engines from scratch?
I ask this mainly because when I started out programming(I still remember my first post in these forums lol) I wanted to make everything by myself; I didn't want to use any libraries(although to be completely honest, at the time I doubt I really understood what a library was). I eventually got over that, as I've been programming for a bit longer now. I've been working under the tutelage of a mentor for a school project to make a video game in Java, and so far I've been able to make my own game engine and I am in the process of finishing up the last bits of the demo, but of course through using the Java API(mostly just using AWT and Swing).
However, recently I was reading some articles and although I'm generally not one susceptible to being influenced by heavily biased works/articles, I did read one that made me think a bit. It was talking about using different languages to program. I started out with C++ (which I'll admit, I did against the advice of others, and somewhat regret) but after about a week or two, I switched over to Java. I started out learning using The New Boston's tutorials on YouTube, and once I finished Bucky's video series, I bought a book on Java, and then another, and then another...... basically I amassed a giant stack of books on programming languages. Recently, I got a mentor for my school project, and I now feel very confident in the language, but what the article said struck me:
Programming in Java is largely looking for the right API, learning how to use it, implementing it, and forgetting about it until it is necessary again.
I'll admit that for a second I cringed, because I felt that the time I had spent learning the language had been reduced to something akin to learning how to use GameMaker or RPG Maker. For the past week or so I stopped programming in Java and fell into a sort of "programming depression" in which I was desperately searching through my C++ books to try and learn it again and see if I could make a game engine from scratch, without relying on any APIs. I essentially wanted to set out and make the wheel again. At first it was just simple stuff as with how to do active rendering, but then it got really ridiculous when I felt "ashamed" of using even the BufferedReaders in Java to handle file input. It felt really greedy to want to know how to do everything, and I'm sure given another couple of weeks I probably would not be satisfied with anything less than making my own computer from scratch so I could make my own game from scratch.
I'm trying really hard to force away this urge to do everything from scratch so I can go back and work on my project again without feeling like I'm doing something morally wrong. Has anyone else been in this situation? Is there anything inherently wrong with being high-level vs. low-level with respect to games?
#2 Moderators - Reputation: 7470
Posted 04 May 2012 - 08:27 PM
If you want to make games, use any tool available that helps you realize your goal. There's nothing "wrong" with that at all; it's actually the smart way to get things done.
On the flip side, if you want a deep understanding of game technologies, building them yourself is a reasonable way to learn about them. There's again nothing wrong with this as a goal, but it does somewhat run counter to the goal of building games (by yourself anyways; if you have a large team you can afford to be a technologist and not much else).
So the real question is, what do you want to do?
[Work - ArenaNet] [Epoch Language] [Scribblings] [Journal - peek into my shattered mind]
#3 Members - Reputation: 238
Posted 04 May 2012 - 08:55 PM
For the short term of creating my game for my school project, Java suits me perfectly because I am very familiar with it, and it provides me with an API that I can use to get the job done, but eventually I want to understand how everything works rather than solely relying on the fact that "it just works, use it". So again, I guess it's just me being greedy about knowledge but I don't really know how to go about attaining it, since I know a lot of those things are accomplished at the operating system level. Is there a practical way of going about learning all those low level techniques without having to go all the way to the bottom(coding in Assembly or lower possibly)? By the way thanks for the fast reply :]
#4 Staff - Reputation: 8878
Posted 04 May 2012 - 08:59 PM
As ApochPiQ says above, it all depends what your goals are -- if you want to learn about the technology behind games then creating your own engines can be a valuable experience, but there's certainly no shame in doing the smart thing and using what's already provided. There's simply no need to spend time recreating what others have already done if your goal is simply to create a game; if your game is good and isn't an undue hassle to play players won't care how you made it, even if you used something like Game Maker.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#5 Crossbones+ - Reputation: 5143
Posted 04 May 2012 - 09:20 PM
It’s nice being paid to do what you would be doing anyway.
But making engines from scratch is not for everyone, and certainly not for you. You’ve made it into a moral dilemma.
I’m just not sure why you asked us for advice, though.
You already know what you want more than we do. We all do what we are in the mood to do.
Sometimes that is to make a game, sometimes it is to make an engine and explore technology.
You will start making games, or whatever you want to do, when you get into the mood to do it. That is just how it works.
It is like you are asking us to convince you of what you want.
Well, I don’t know what you want.
Why don’t you just do a bunch of different things and decide what you want?
L. Spiro
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums
#6 Members - Reputation: 238
Posted 04 May 2012 - 09:47 PM
Haha thanks, I had forgotten all about those engines even though I have the UDK on my computer :] I guess you're right, now that I think about it the average gamer doesn't really ask himself what language the program is coded in or what materials were used. What I think I'll do is split up my time between writing my game on the engine I wrote, and then time on actually adding features/improving efficiency on my engine. Thanks for the reply!
Spiro:
I was just wondering if anyone else had felt that way at that point, or if there was any reason as to why I should go lower level. I understand that there are many performance improvements to be reaped from using low level languages. And excuse the hyperbole, I don't actually feel that it is morally wrong to use engines like Game Maker or RPG Maker, I guess I just don't like them because of a previous experience. Someone at our school used Game Maker to make a game for his project, and for the class demo we did (my friend and I both did Java games), we got lower marks in comparison to his game because we showed "lesser understanding of the material". But that's beside the point. I like working on my engine because it's challenging and I get to learn more about how things actually work, and then I like to work on my game(s) because it's just plain fun :] But I guess you're right about the mood thing. I think the issue was that I got sucked too far into including everything right away into my engine instead of focusing on my game. Right now my engine supports parallax scrolling which I'm not entirely sure WHY I included it when I'm doing a top down game...
Like I said to Adams too, I guess I just need to separate the two so neither my work on my games nor my work on my engine suffer too much :] Thanks for the input!
#7 Members - Reputation: 144
Posted 04 May 2012 - 10:39 PM
#8 Members - Reputation: 238
Posted 04 May 2012 - 11:13 PM
#9 Members - Reputation: 683
Posted 05 May 2012 - 01:54 AM
#10 Members - Reputation: 238
Posted 05 May 2012 - 02:19 AM
I'm not a veteran on programming by any stretch of the imagination. I've only been programming for about a year and a half now, and although I'm pretty decent at Java now, there's a lot more that I need to learn, and as such I'm probably not the best person to ask for advice
#11 Members - Reputation: 121
Posted 05 May 2012 - 03:54 AM
Also note that i don't recommend learning C++ without learning C style coding. I'm not saying you should learn procedural programming first, you can learn java OOP first. But when it comes to C++ you should start from the beginning in order to fully utilize the full power of C++. Good luck
#12 Members - Reputation: 102
Posted 06 May 2012 - 11:08 AM
#13 Members - Reputation: 514
Posted 06 May 2012 - 11:33 AM
#14 Staff - Reputation: 8878
Posted 06 May 2012 - 07:39 PM
While this can sometimes be true, it may not be as straight-forward as you think. Lower level technologies offer you finer control over your software, the potential performance benefits can be gained from using a solution that is more specific to your particular problem rather than something more general that has been created to handle various different problems. These potential advantages are far from automatic however, and it's entirely possible (even probable for a non-expert) to instead create a less optimal solution.I understand that there are many performance improvements to be reaped from using low level languages.
In the case where you've done a particularly good job of choosing your higher level technology and it's a good match for your specific problem, you would even find that you would simply have to replicate exactly the same solution if you decided to work at a lower level.
Choosing lower level technology (whether that be language, library, engine or whatever) hoping for performance reasons is not a good idea unless you have the experience to be able to take advantage of that. You should also consider whether or not the potential benefits will outweigh a potentially significant increase in development time.
As for learning a bit more about how things work at a lower level, I'd recommend taking a class or checking out some reading material on algorithms and data structures. You might also consider learning some basics of how simpler hardware works, and learn a little bit about assembly.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#15 Members - Reputation: 238
Posted 06 May 2012 - 09:41 PM
Haha! We have the same name and same situation?
-Adams
That's true, I can't wait for the fall when I start college and my computer science classes. For the past year and a half I've only been working with books, tutorials, and just recently my mentor. I'm going to be taking a C++ class instead of a Java class though since I feel comfortable enough with Java for the time being, and also in reference to Sh@dowm@ncer, I want to learn how to code in C++ since I'm sure I'd just try coding with C++ syntax in "Java style". Also I'm guessing that the lower level I go, the more probably I actually break something right? Yeah, I can't wait for my college courses.
-Alonjar
Yeah, so just "make things from scratch" for knowledge's sake, but when working on a deadline embrace pre-existing code right? I guess that makes a lot more sense xD I'm going to stick to that mindset from now on.
Thanks for all the feedback guys!
#16 Staff - Reputation: 8878
Posted 06 May 2012 - 09:51 PM
Absolutely -- with great power comes great responsibility. Languages like C++ assume the programmer knows what they are doing, and if that isn't true you don't have some of the safety nets that other languages can provide. In the hands of a skilled programmer this means they have increased control and can potentially gain some performance improvements by tailoring the programs behaviour to exactly suit their own needs and not waste time trying to handle more general cases that don't actually apply. Unfortunately, in the hands of a beginner it means there are more potential mistakes to be made, and more you need to be aware of to avoid said mistakes.Also I'm guessing that the lower level I go, the more probably I actually break something right?
It sounds like you're probably on the right track, and if you're planning to study computer science at college there should be some classes available that will teach you about some of those lower-level topics you're interested in.
Absolutely, that's an excellent approach to take. It's great to learn new things, and knowing more about how things work at a lower level can often improve your skills even when working at a higher level, but if you want to produce good quality software without wasting a lot of time there's absolutely no reason you shouldn't take advantage of existing technologies that meet your needs and have already been bug-tested, etc.Yeah, so just "make things from scratch" for knowledge's sake, but when working on a deadline embrace pre-existing code right?
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#17 Members - Reputation: 1006
Posted 06 May 2012 - 11:05 PM
The other option is to do some general research on known algorithms to feed that knowledge hunger, e.g. look up stuff by Knuth or Sedgewick. How string searching can be done is actually quite fascinating! Also design patterns are good to research, and often useful in future development.
#18 Members - Reputation: 73
Posted 07 May 2012 - 01:24 AM
Java is a good language for someone who is just a beginner of learning program, but it dose not suit to making game because its high level and low performance.
#19 Staff - Reputation: 8878
Posted 07 May 2012 - 01:42 AM
Java is a good language for someone who is just a beginner of learning program, but it dose not suit to making game because its high level and low performance.
The creators of Minecraft, RuneScape, Puzzle Pirates and Wurm Online (amongst others) would probably disagree... Java is just fine for games, and whilst it isn't for everyone there's absolutely no reason to spread nonsense about it being "not suited to making games". The fact that it's higher level is potentially a good thing (as has already been covered at length in this topic), and while there can be some additional performance concerns the idea that it's "too slow" for games is largely just out-dated and no-longer relevant.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#20 Members - Reputation: 3789
Posted 07 May 2012 - 07:52 AM
So you need to sit down and think about what exactly it is you want to achieve. Where is the payback for you? If you want to make a game then reusing an existing engine is likely to be a good option. If you want to learn about some specific aspect of technology, then modifying an existing engine might be more appropriate. If you want to get deep involvement in all aspects of what an engine does, then writing your own may be what you want. But it's firmly a horses-for-courses decision, and only the person making the decision really knows which one is right for them.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.






