Jump to content
  • Advertisement
Sign in to follow this  

What direction to take?

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

Okay, I'm in quite a predicament. See, I like to program and know how. However, I just don't know what to do and how to do it. Like over the summer, I tried to learn OpenGL/DirectX. But, I really just ended up reading a huge part of this forum and tons of articles and not really anything else. I read more on programming than doing actual programming. I try opening Visual Studio and just stare at it trying to think of what to would be fun to try, but don't know what to do and end up playing a game or something. Making games has always interested me. So, I thought I'd try to learn a graphic API. I know how to setup a WIN32, OpenGL, and DirectX window for the basis. The problem is, I don't know how I should break everything up, and how to organize it. Like, just having all the window creation code and crap in one file bugs the hell out of me. I don't get far past that because I want to program with a good framework (albeit basic), but I just don't really know how to make it better. Should I break it up to just seperate cpp/header files, make it OOP, etc? Then there's the problem of which API to learn. DirectX or OpenGL? Both have their merits and both have some downsides. DirectX has a lot of things already built in that OpenGL needs you to do by hand. But, OpenGL has a lot more tutorials and somethings are slightly easier to do. Oh, yeah. There's also the the wrapper libraries and engines. I tried setting up SDL, but couldn't really get that to work properly despite going through a couple tutorials on setting it up in order to compile without error. For some reason though, I don't like the idea of totally relying on them. Sure, you gain practice and learn programming techniques, but you really don't learn anything about how the underlying stuff is done in OpenGL or DirectX, or even lower than that for that matter. So, any suggestions on what should I do? Should I just say screw it to the bad framework and shove that crap into one cpp file and worry about it later? Or should I try to make a workable and less cluttered one now? If so, what would be good to set it up? Then there's DirectX or OpenGL? I preferably like DirectX, but there just isn't the same amount of code base and tutorials. I'd appreciate any guidance and suggestions. Thanks. [Edited by - Xilo on September 21, 2004 12:37:26 AM]

Share this post

Link to post
Share on other sites
seperate it.
later in your game engine you dont have to use all the header files that you used. (lets say that you made 5 classes, so you can create another class for a SceneNode. and in your game project you will use the SceneNode only (the SceneNode will use the 5 classes))
and if you like DirectX, then start with DirectX.
you can always learn both APIs, and there are a lot samples in the DirectX SDK.
i used "Introduction to 3D Game Programming with DirectX® 9.0" to learn DirectX, its a good book with a good website (http://www.moon-labs.com/).
but its up to you, i wouldn't tell you what to learn..
just notice that directx is also directsound, directmusic, directvoice (voice chat support)..but works for windows only (and xbox using xbox sdk)
and opengl is for graphics only, but you can use it for more than one os. (and you can also use directx and opengl in the same time, if you need opengl and directinput for example.)
and opengl uses hardware, and directx use a runtime.
there are people who will tell you to start with DX and there are who will tell you to start with OGL, so you can't trust us. :)

and the underlying stuff that is done in opengl and directx is very difficult, you dont must to know exactly how it works.

Share this post

Link to post
Share on other sites
those first few lines of code? Yeah, always ugly, especially since it's win32. Then you create some function such as CreateDevice and wonder if you could've named it something better.. or, you use OOP (which I don't anymore) and make an Application class which you eventually get SO sick of looking at. I hate all that crap code, setting up a window and such is is mostly someone else's code, just function calling and variable setting. However, it gets much easier the more you do it. It used to take me a day, now it takes me a few minutes to finally get a window up, though you ironically have to spend time getting used to it... just get it over with and move on to more interesting stuff.

getting started with DirectX also sucks, nothing makes sense and it's still just function calling and variable setting. But, continue to hang in there. As your programs balloon in size, you'll find yourself working strictly with your own code and overall structure, allowing you to learn very quickly. I recommend not getting too caught up with structure by the way... I used to design whole diagrams on the base code before I'd begin... Now there's no point in doing all those tricked up designs - mainly because I stopped using OOP. I think getting down to the algorithms ASAP is more important than drawing a bunch of boxes with arrows, especially if you already know what you're doing. However, this is only if you're going to be working alone, I'd say the opposite if working with a group or if you're planning on release code to others (so don't flame me).

Share this post

Link to post
Share on other sites
Sounds like classic virgonian, anal-retentive issues. I know this well, I can manage the hell out of a project - I have never delivered late. When it comes to my own projects though, I tend to be far less successful or on tome for that matter.

One of the techniques that helps here is to keep your objectives terse and realistic. I know that my ADD kicks in quickly, and can be a real bother to work through. Another thing I do is to write up a schedule and hang it somewhere. This may sound silly, but knowing how to create and build a Gant chart are useful skills - and you can perfect them by keeping your own projects on schedule. However, a schedule in your desk or under the cat litter box does you no good - stick it on your door and make a commitment to view it everyday.

On implementations - I guarantee that you will find a better way to do something about the time you get to 80% completion on the current method. The problem here (and I do this a lot) is that you are trying to build the perfect game from step 1. Try building pieces of the game first - no matter how ugly and embarrassing they are. Then build your skills in "refactoring" the code into more elegant designs. This gives you the opportunity to actually finish an implementation, and then learn some skills in upgrading code. Of course, your skill set may increase to a point where starting from scratch makes sense too.

Anyhow - these are just some ideas I use to keep myself on track. I hope that they are of some use for you.


Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I know how to program. I know what OpenGL and DirectX is and what you can and cannot do with them. Hell, I've read over 60% of this forum and many, many articles online. (Yes, I have waaaaaaay too much time on my hands...)

I wasn't really talking about all the underlying stuff. I was referencing that to libraries and engines. You don't really learn how DirectX and OpenGL work using those.

Hmm, I actually have the PDF file of that book and downloaded all the samples. Maybe I'll start reading it. I didn't really know how good it was and got kinda lazy to read it...

Sorry if I sound rude, but I absolutely hate being treated as if I know absolutely nothing and am just another Random_Noob_439823.

Yep, that's exactly my problem. If I'm doing something for myself, I usually don't get anything done at all, but if it's for school or work or something like that, I usually get done ahead of schedule.

Hmm, making a schedule/to do list/whatever sounds like a good idea. Maybe having one taped above my monitor and looking at what I need to do all the time would motivate me to work... ^^

Yeah, I prolly shouldn't worry about the organization till later. I dunno. I'm a kind of perfectionist. I'll do things many times over because I don't like how I did it. It's quite bad. I'm never satisfied with what I do...

Yeah, I hate looking at all that initialization code. It looks soo ugly. That's why I was thinking of sticking it into some class or something, but I have bad organization skills.

That's prolly another reason why I don't get anything done. The first few steps like initialization (or whatever is applicable) is booring and I have a short attention span.

You do have a point on that learning algorithm part. True, it does no good if you have an extensive OOP initialization framework if you don't know what the hell to do past that. I suppose with time and once you learn more and that, it makes it easier to organize.

Thanks for all your suggestions. It all pretty much makes sense and a logical thing to do to get better and actually learn and get things done. I think I'll try out ya'lls suggestions and start reading that book pex22 suggested when I have some free time.

Thanks, ^^

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!