Jump to content
  • Advertisement
Sign in to follow this  
KittyPlaysViolin

Game Engine from Scratch...Why?

This topic is 2225 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

Hey I haven't posted in a while, but a question just popped up in my mind:

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?

Share this post


Link to post
Share on other sites
Advertisement
That's something I was also thinking about. I think I just want to know how everything works. I would be perfectly fine using a File I/O API once I understood how it worked. I guess I just don't feel very comfortable going about using "black boxes" unless I know how they work, or I built them myself :P

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 :]

Share this post


Link to post
Share on other sites
Would it make you feel better to know that a lot of commercial games use existing engines rather than creating their own technology? Just take a look at the list of games created with Unreal Engine, id Tech 3, and id Tech 4, amongst other engines that are used commercially.

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.

Share this post


Link to post
Share on other sites
Adams:

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!

Share this post


Link to post
Share on other sites
Question is, why stop there? Why not write your own language? Or why are you coding on an OS that you didn't build? Aren't you using someone elses's device drivers to use your computer to program? At some point you have to reliquish control and just rely on other people's creations for the sake of productivity. There's nothing wrong with researching it, as long as it doesn't hinder your other projects (which in your case, it sounds like it is.) I myself on wims will research how a linux kernel works, or how device drivers work, etc. But I don't let that curiosity force me to stop production until I fully understand the technology behind what I'm using.

Share this post


Link to post
Share on other sites
Haha, thanks Slynk! You're right, and even if I did build my own computer, I'm still using pre-built parts at some level. Guess there really is no point in re-building the wheel aside from learning. I will definitely take that advice and separate the research aspect from the actual project aspect of programming :] In fact I actually feel more motivated to go back and finish my project now. Thanks ApochPiQ, Adams, Spiro, and Slynk. You guys gave me some helpful feedback!

Share this post


Link to post
Share on other sites
just a question. Why do u regret starting out with C++. I ask this coz I'm a beginner at game development myself and have started learning C++. I have had previous experience with other languages like VB .NET, ASP .NET, SQL, and HTML so im not entirely new to programming itself. So far im enjoying C++, so I just want to know what is it that made you regret starting out with C++

Share this post


Link to post
Share on other sites
It's not that I don't like C++, I'm going to be looking more into it after I finish this project. It's one of the languages I want to have under my belt (Java, C++, Python, LISP, Assembly). The only thing is that with the book I was following along with, by the time I got to pointers I got really really confused. I guess the only thing was that I was not ready at that moment for that concept. The only time previous to then that I had ever programmed was in the 6th grade when I picked up a book for beginning flash game programming, but then I was only really copying out of the book(I have strong grasp on ActionScript now but I don't really use it). I don't know if it was me, or the book, but the way I went into the topic probably wasn't the best for my learning. Then I went into Java and having already studied the basics of C++, the transition was smooth and then I guessed the momentum just carried me through to where I am now. I think it was only the approach I took to learning it that I regret. I should have probably started with a friendlier language but in the end it didn't really affect me too much so I wouldn't worry :]

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 :P But yeah, I wouldn't worry about it, I think it was just how I was going about it that messed up the experience for me :] hope that answered your question, lol I didn't mean to make C++ seem like a bad thing, it's a really cool language.Good luck with it!

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!