Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Aug 2001
Offline Last Active Apr 29 2016 10:53 PM

Posts I've Made

In Topic: OOP and DOD

25 April 2016 - 12:52 PM

 I think I've gotten a little confused about structuring my code. Code is never clean enough. So I spend much time refactoring and thinking of better ways to simplify code to make it easier to read later.



I fell into this trap when I first started writing code.  Things would look messy, sloppy, or seem like they could be refactored, redone, renamed, restructured, just to make the code better. Do you know what I learned from all this?  You can spend way too much time on this, when the code is never used again or read by anyone.  There are so many projects that I spent a lot of time on designing, testing, refactoring, and nurturing only to find that the project was canceled, requirements changed so the code wasn't needed, or I designed a generic, all-purpose solution and ended up only needing 10% of the features.


Many times I made a one-off program to do a little thing, and didn't worry about the structure and all, and those turned into multi-year projects.  That messy code at the beginning never really hurt me at all.  I just refactored or rewrote the ugly stuff once I knew what I really needed.


Bottom line, don't worry about the "right" way.  Right this very minute people are arguing that OOP is terrible and the reason all software is crap.  We don't know the "Right" way because its different for every project.

In Topic: OpenGL (Game) Engine

20 April 2016 - 09:53 AM



Pick a simple game to create. Just building an engine is nebulous. I've done it before, and I just ended up working on cool features that never actually get used. Feature creep was particularly bad. You can definitely still create the engine, but just view it as reusable code for your game projects. You could make a game as simple as 3d pong.

GLFW is its own window and input manager. You will either have to pick one or the other. If you want to go with Qt then this might be useful


Thanks, i completely understand what your saying and i agree, but you didnt really answer most of my questions about the libraries. 


That post actually does answer your questions about GLFW -- "GLFW is its own window and input manager." It does provide an API to get the native window handle which you might be able to use to embed the window in some frameworks, but GLFW is primarily intended to create the main window of your application, i.e. if you're using GLFW, you aren't using QT or anything else. That's why I recommend you avoid it in the engine code.



^^^^^^ This.


I was thinking the same thing.  SDL and GLFW are the two popular cross-platform window managers.  They handle the interaction of the application with the operating system.  Windows, Keyboard, mouse, controllers, file system.  Also, they make it "easier" to get an OpenGL context.  These things are really hard to get right.  GLM is a library for math, and GLEW loads OpenGL extensions for you and checks versions.  These things don't make an engine.


The reason everyone around these forums says "Make games not engines" is because trying to start with an engine will only end in 99% of people giving up.




We need new people to make games so we can play them.

In Topic: Java (and not only) keyboard input delay

10 April 2016 - 05:12 PM


In Topic: C++ Rotating 2D shape in list

10 April 2016 - 01:34 PM

Is this home work?


Seems like homework to me too.  But even if it isn't, this is how you learn to program.  Figure out what the code is doing.

In Topic: Why didn't somebody tell me?

14 March 2016 - 09:50 AM

I know that Sean and I disagree on just about everything, except math.  It took me a long time to figure this stuff out on my own.  Don't let it be you.  Keep re-reading it until you stop saying "huh" and say "Oh".