Quantcast

Maximum PC

It is currently Wed Jul 09, 2014 11:28 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: I want to Program my own games, Come join (Omnibus thread)
PostPosted: Mon Mar 30, 2009 12:19 pm 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
I don't know if this will display right when I press submit but whatever
/*
This has been a personal problem i've been battling with myself for ages on, and is not only a rant and a guide, it is a question to any other programmers in this forum.
PREPARE FOR WALL OF TEXT
/*
All right. So i've taken a QBASIC class (high school credit, couldn't pass up) I'm almost done with my CS: 3 class (was AP Computer Science however since it was online and I started mid-year I'm going to finish next year and get two credits for Java programming) and I've got a book on beginning C++ programming and I'm roughly halfway through it, and there doesn't seem to be a single thing about programming for games anywhere.
//initialize problem and rant
Not even in the book "Beginning C++ through Game programming" <- All that was, was all the kinds of stuff I've learned/learning in my Java class.
// Fact, Java AP and many other classes actually teach nothing about game programming.

But that has NOTHING to do with game programming at all? NOOOO! Actually, that's lies. Because these classes are supposed to teach you Object Oriented Programming.
//Reassert truth
Sorry but game programming is tough. It's hard. IF you really want to learn to Game Program all by yourself, FROM SCRATCH start HERE. That above language is basically a scripting language with relationships to C# or C++. If you can create a 3d box that twirls in that language, you have my respect. It can't just be visually a 3d box in there either it needs to be true 3d.
//Source for learning, slight description, and a challenge for not only
//dedicated noob but any seasoned programmer out there. Try it.
____
Whoa whoa slow down there Dwood! Where are you going?
Okay, let's break this down.

#1. I've found a source that teaches you to make a game in an environment (allthough it's probably not the best way to learn programming it definitely is a way)
#2. I've learned about programming and yet, there hasn't been any books on programming a game, why? (because if you learn to program well you can program for a game!)
#3 Books are my friend, and I've read a few, the ones I want to read/think will be good to my topic are either too expensive or I can't find them.

That's because much of the information for game programming is not easy to understand and first to program games you must understand how to program at all. You/me aren't going to be able to start programming games right off the bat. Let's start off slow.

First of all, here is a good Java beginner book:

(insert random java for dummies book)

If you buy/bought the C++ through game programming book you will find it starts you off slow. It's a good way to start, personally I liked it because it gave me some C++ experience.
-----
How to read a programming book:

Type every program on the pages out then read them over and try to understand what's going on. Ask yourself such questions as: "Why do you have to include using namespace std?" or include <iostream> on your programs?

Don't simply just type out every piece of code the same as the author puts it. Are the results of a program the same if you use while() instead of do {} while () ?
----- If you have something to add, please do so.

Programming styles:
When naming variables, use meaningful names, using the Hungarian scheme for naming variables gets confusing very quickly. That 200 line breezer can become a monster of a program very quickly.

Example of Hungarian: iNumber or sScope, etc.

Seeding for a random number in C++ is relatively difficult, the methods vary and I prefer the Java method. When you get that decimal like Java does, find a fraction for a Die and convert to decimal. You should know what to do from there.
---- // Please add to above. Needs more info on styles

With all of the ugly stuff above done, I would like to say that no one has taught me to program for Games, in fact, I can't do anything but math with my programs. eg SOLVE PROBLEMS http://projecteuler.net/

Now, what I want to do with this, is create 'mirror' apps in both Java and C++ that accomplish the same thing. Java because I have most experience there and C++ because I want to learn. In the end, I want a Side Scroller little pixel game. Animations would be a plus, but are not required

Properties of game:
I know from experience that rigidity causes problems. I want the game to be able to parse from a text file any data that is not integral to game code. Such as: Camera distance, speed, health, power, shields etc
Gravity. I want an object that is designed to be affected by gravity to be able to fall, and to fall infinitely until it hits the point where it is "game over"
I want to have several types of objects, first, I want objects where you can jump under them, then I want to create objects where you can't.

We'll go from there.


Top
  Profile  
 
 Post subject:
PostPosted: Mon Mar 30, 2009 5:33 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
:)

http://www.maximumpc.com/forums/viewtopic.php?t=57974

I am willing to offer any advice that I have.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 31, 2009 7:02 am 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
CrashTECH wrote:
:)

http://www.maximumpc.com/forums/viewtopic.php?t=57974

I am willing to offer any advice that I have.


Oh sweet man, thanks. I'll definitely look at your project!

If you point me in the right direction, I'll do it: I have time on my hands. I don't know that I even intend to finish this but it would certainly be cool.

First off I want to state that right now I'm going off concepts taught in the book "Game Programming Gems"(see -> Google books)

And some C++ Programming concepts taught in the book I referenced in the first book.

As Per Design of Game I have so far I think i'll group it like the following:

World
Network(?)
    Levels
    Units


In levels would be the templates for building the environment and all the environment objects. The power of Gravity will be contained in the level files.

In Units would be Player, Enemies, and objects the player/enemies are intended to interact with. (Mushrooms, Koopas, etc in the world of Mario)

Right now I'm still planning what the properties each unit should have however as I get more specific I think I'll be ready to start pseudocode today.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 31, 2009 7:36 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
I need to know more about what you are looking to do before I can offer anything more than the generic stuff in that thread.
  • Targeted platform (Windows, Linux, Xbox, Zune, iPhone/iPod, etc).
  • Prefered language?
  • Type of game? FPS, RTS, Strategy, etc
  • Graphics? 2D/3D
  • Your graphics / texturing skills.
  • Understanding Algorithmic concepts (path finding, collision detection, proximity awareness, etc)


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 31, 2009 11:28 am 
Northwood
Northwood
User avatar

Joined: Sun Jul 15, 2007 6:37 pm
Posts: 2261
Location: No. 1 Thread Killer
CrashTECH wrote:
I need to know more about what you are looking to do before I can offer anything more than the generic stuff in that thread.
  • Targeted platform (Windows, Linux, Xbox, Zune, iPhone/iPod, etc).
  • Prefered language?
  • Type of game? FPS, RTS, Strategy, etc
  • Graphics? 2D/3D
  • Your graphics / texturing skills.
  • Understanding Algorithmic concepts (path finding, collision detection, proximity awareness, etc)



At the moment I do not plan to have any compatibility layers needed, I just plan that I can run the game in WINE.

This project is so I can learn C++ and be more familar with the language.

The game I'm looking to create is sidescrolling (mario-esque, etc, for now)

My Graphics/texturing skills? I'm pretty profficient in doing pixel art and have dabbled a bit with textures however I wouldn't call myself a pro.
^^ I was just thinking of a tiled kind of thing. I'm around a lot of pixel artists so i'm pretty sure a lot of people would get into it with me if doing pixel art became a problem...

Algorithmic concepts? I have not learned anything like you've pointed out yet and that was a point of this project. I do think I have some kind of an idea of what is needed however I doubt my grasp on concepts like that is anything like yours is at this point.

Player
    Health
    Speed
    Jump
Enemies could have inheritance there however I don't know if I want Enemies to inherit or not. Oh wait I was doing it wrong.

I think: Is a good way of organizing?
Objects
    Units
    -> NPCS
    -> Player
    Power ups (switches etc)


More options will be added however for now let's keep it to that.

Should I use Dx 9 to display my 2d game, OpenGL, or something else?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Mar 31, 2009 11:34 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
If you want Linux compatibility you want to go OpenGL.

You also want the Red Book: http://www.opengl.org/documentation/red_book/


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group