Sign in to follow this  
barouqeanxiety

my intro/direct x engine questions

Recommended Posts

okay this is my first post here so i will provide a bit of info into my skills in c++ first (to later be reflected in my bio) then I will ask questions: bio: so I'm 19, got accepted to herzing college in Madison WI to double major in computer science (game programming) and computer graphic design. I started learning c++ my freshman year it was my first language. I am almost completely self taught. Ive almost got console apps down to a T (linked lists(double, single, skips), my own data storage system called the lexicon(if interested ask me and ill explain its premise), still learning the stl, but have all the basic class and pointer stuff down too. I know I'm no master but i am proud and I do ask for alot of help so you'll probably be seeing alot of me. Now, On to the beef: Questions: So I'm a game programmer most of my graphics experience comes from dark GDK (basically a direct X game engine) I don't start college until the fall of 2009 and want to fill the time writing my own game engine. now I barely know anything when it comes to win32 programming but im still learning that. I would like to write an entirely 2d graphics engine first but i have a few questions. 1.)Given my background from 1-10 how hard do you think it would be for me? 2.)is there anything else i need to learn before i even start? 3.)is this going to be a waste of time? 4.)are there any good free win32 or direct x tutorials online?

Share this post


Link to post
Share on other sites
Before I start, don't expect anyone to remember this bio. It's good that you gave us your background, but you should give the relevant info on EVERY post. That being said, feel free to ask a lot of questions. We all grow from writing and reading the answers.

So, you know some of DX, which means you don't HAVE to learn any other graphics API. If you want to, it supposedly isn't too nearly so hard. Don't know how much GDK does for you, though.

I considered creating my game engine an 8 on that scale (10 being impossible, 1 being a step up from Hello World). It took me a little over month, including the game, and I did it off of one semester of C++ and some SDL (a simply graphics API) tutorials. You might find it easier because you have more experience, but seeing as you even have to ask, I'm guessing you don't have a definite design in-head and it'll be difficult.

I use the STL list for managing all the objects on screen, so I'd say that you should finish learning the STL before doing this. (I chose the list because, although it's supposedly slower than vector, I don't think it's that much slower in a game that's average fps is over 1000, and it's a lot easier because you can insert and delete from anywhere with no extra work.)

A waste of your time? When you could be grabbing someone else's engine who's probably done a much better job than you ever will? Definitely! But you learn a lot more by reinventing the wheel.

Don't know about free tutorials, but good luck!

Share this post


Link to post
Share on other sites
Don't just write an engine; write a game with an eye towards reusability. I wish I knew where that link was, about "write games, not engines".

I am curious about your lexicon; whether it's actually something new.

Share this post


Link to post
Share on other sites
well i wrote the lexicon b4 i heard of the stl and I was writing my own linked lists. but as the numbers get higher so does seek time. so then I Implemented a doubly linked list. But that still wasn't exceedingly fast. So I drafted up the fastest thing i could think of. Visually, it was a spider web. It started with a root node. that node had an address of 1,1 (first track first node). The amount of nodes per track could be specified so lets say I had 5. Root then connected to 5 separate nodes who were also all connected in a circle. (i feel like im explaining this very badly). So then lets say I knew my data was on track 5, and I had 10 nodes per track. Then instead of going through 50 nodes to find the data. I go strait up to the 5th track, then go around the circle to find the value. Effectively turning perhaps 58 seeks, into 13 seeks...if that makes any sense. Its heavily based on how data is store in Cd's. Seconds arranged in tracks.

Share this post


Link to post
Share on other sites
That's pretty understandable to me, although, what it sounds like you did was make a dynamically allocated 2D array.

Do you know what a binary tree is? There are a ton of different other types of trees, but if you don't know what a binary tree is, you should start there.

Essentially, you search like this like the common guessing game:
Is it greater or less than 12? less (Half of the data has been eliminated from the search.)
Is it greater or less than 6? It's 6. (The 6th node has the data we want.)

Binary trees can be implemented as an array, or an object with a pointer to a base node.

BTW: If you don't know about template functions/classes, reading up on them can be very productive as well.

EDIT:
Forgot to mention: I too am a big advocate of make engines, not games. But, then again, make games that ARE engines. Even so, I found myself completely rewriting me "engine" when I made (am making) my second game as I'd though of new (better?) ways to do them.

[Edited by - Splinter of Chaos on July 25, 2008 12:27:36 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by barouqeanxiety
1.)Given my background from 1-10 how hard do you think it would be for me?

8. Not impossible, but a big (and possibly fun?!) challenge. Remember games aren't just about graphics. If you want to make a simple engine you'll need to think about things like music/sound, physics etc..

Quote:

2.)is there anything else i need to learn before i even start?


nah, there's always a ton to learn, but if you've got the basics of c++ & sdl you can make a good start.

Quote:

3.)is this going to be a waste of time?

No!

Quote:

4.)are there any good free win32 or direct x tutorials online?


There's quite abit of stuff here on Gamedev, check out the Articles section.

Link. I always liked the drunken hyena Directx tutorials. There's abit of Win32 stuff in there too. Also take a look on amazon and maybe buy a book?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this