Help I am new and need help!
#1
Posted 20 December 2007 - 01:40 AM
I know of several graphics libraries: SDL, Directx, OpenGL, and Allegro. Although I have no experience in any of them. I have no audio output experience at all. Is there any online tutorials, books, open source file that I need to disect anything that can lead me to the right direction? Thanks,
onyxthedog
#2
Posted 20 December 2007 - 02:00 AM
I recently forced myself to learn Python and used pygame to create some small games in the process. It was a very pleasant experience and I highly recommend it. Also, since it's a fairly thin wrapper around SDL, you should be able to translate your experience into C/C++ easily.
Here are some links it get you started:
http://www.linuxjour...om/article/7694
http://www.pygame.org/wiki/tutorials
http://www.penzilla..../python/pygame/
#3
Posted 20 December 2007 - 02:16 AM
monjardin said:
I recently forced myself to learn Python and used pygame to create some small games in the process. It was a very pleasant experience and I highly recommend it. Also, since it's a fairly thin wrapper around SDL, you should be able to translate your experience into C/C++ easily.
Here are some links it get you started:
http://www.linuxjour...om/article/7694
http://www.pygame.org/wiki/tutorials
http://www.penzilla..../python/pygame/
I am not completely done with either book I am home-schooled this year (first year) and I have been doing C++ for as long as this school year has been going on (I am on arrays at the moment) and C (earlier experience and I am just on the basics right now in the book) just recently restarted because I tried last year around this time but quit because my knowledge in computers and math was just lacking too much to be able to do it easily. So Python is the way too go? Do I even need assembly anymore or have graphics libraries pick-up enough now? Thank you monjardin.
P.S. I am running Windows 2000 Professional on an IBM of some sort, I will ask my dad the exact model but we are probably going to upgrade soon due to the age of the computer and my family needs are growing as more of us start use it!
#4
Posted 20 December 2007 - 03:25 AM
You shouldn't need to use Assembly language unless you are writing a compiler although it does help to understand why compilers do what they do to optimize your code.
#5
Posted 20 December 2007 - 03:45 PM
onyxthedog said:
Doing interesting graphics with the limited math background you have at this point will be a challenge. It's not that you won't be able to figure things out, it's just that having a solid base in geometry/trigonometry, linear algebra and kinematics/dynamics make things go more smoothly.
Take a look at this tutorial and see what you think: http://programmedles...sons/index.html
onyxthedog said:
Not necessarily, but it would probably be a more efficient learning process since you won't have to fight with build systems and library dependencies as much. Also, it's more conducive to trial and error since you can edit and run instead of having to compile & link in between.
onyxthedog said:
You are safe ignoring assembly for now. It's not like DOS where you access hardware directly. Using SDL frame buffers or OpenGL/DirectX with your mainstream desktop operating systems does not require assembly knowledge.
#6
Posted 20 December 2007 - 03:59 PM
monjardin said:
Take a look at this tutorial and see what you think: http://programmedles...sons/index.html
Not necessarily, but it would probably be a more efficient learning process since you won't have to fight with build systems and library dependencies as much. Also, it's more conducive to trial and error since you can edit and run instead of having to compile & link in between.
You are safe ignoring assembly for now. It's not like DOS where you access hardware directly. Using SDL frame buffers or OpenGL/DirectX with your mainstream desktop operating systems does not require assembly knowledge.
#7
Posted 20 December 2007 - 07:42 PM
It just occurred to me that you might be able to use DOSBox if you want to play with some of that code directly, as it will give you an emulated mid-90s era machine. It might be tough to find a compiler that can still put out 16-bit code though. Besides, you really don't want to have to deal with the quirks of DOS memory management - 32-bit virtual address space is much nicer. :yes: So, all things considered it's probably a better idea to start learning SDL and figure out how to adapt the algorithms described in your books to the newer technology.
#8
Posted 21 December 2007 - 01:04 AM
Reedbeta said:
It just occurred to me that you might be able to use DOSBox if you want to play with some of that code directly, as it will give you an emulated mid-90s era machine. It might be tough to find a compiler that can still put out 16-bit code though. Besides, you really don't want to have to deal with the quirks of DOS memory management - 32-bit virtual address space is much nicer. :yes: So, all things considered it's probably a better idea to start learning SDL and figure out how to adapt the algorithms described in your books to the newer technology.
Any recommendations for books I should buy? Any tutorials for math (geometry, trigometry, or anything that might be helpful), or game programming.
P.S. This maybe a bit ahead of my self but can someone post a simple text-based game so that I can see everything in action.(must be in C++ and they don't care if I modify for my personal experimentation.) Also, I was wondering how can you create an object that has multiple instances and stores it own graphical output as a "mask" so to speak? In other words How do you make it that it reacts with its graphical representation properly?
#9
Posted 21 December 2007 - 02:40 AM
If you are using MinGW (a version of GCC for Windows that usually comes with the Code::Blocks IDE or the DevC++ IDE) or are using Visual Studio or Visual C++ 200x Express Edition you should be fine. Visual C++ 6.0 or older will be a little out of date and you should consider upgrading.
If you have broadband internet then it should be free of charge to download any of the ones I mentioned (except Visual Studio which is commercial).
You should be able to find the source code to lots of games at SourceForge. Just be sure to look in the CVS/SVN repositories of any program rated 5-mature (meaning the program is complete and working). Also, keep in mind that most of the programs at SourceForge are not games.
If you want to know how they work in gentle steps, you probably will need to look at the LazyFoo tutorials that I pointed out to you earilier. He has written some SDL games that will be good examples to look at as well.
I know a lot of people recommend looking into doing text games first before you learn graphics but it's often hard to make text work as an action game without special libraries anyway. You might as well follow the LazyFoo tutorials first and then you can step back and look at making text stuff later.
I seem to be starting to repeat myself so I'm going to stop here. Be sure to post back here with any questions you may have.
#10
Posted 21 December 2007 - 03:04 AM
SamuraiCrow said:
If you are using MinGW (a version of GCC for Windows that usually comes with the Code::Blocks IDE or the DevC++ IDE) or are using Visual Studio or Visual C++ 200x Express Edition you should be fine. Visual C++ 6.0 or older will be a little out of date and you should consider upgrading.
If you have broadband internet then it should be free of charge to download any of the ones I mentioned (except Visual Studio which is commercial).
You should be able to find the source code to lots of games at SourceForge. Just be sure to look in the CVS/SVN repositories of any program rated 5-mature (meaning the program is complete and working). Also, keep in mind that most of the programs at SourceForge are not games.
If you want to know how they work in gentle steps, you probably will need to look at the LazyFoo tutorials that I pointed out to you earilier. He has written some SDL games that will be good examples to look at as well.
I know a lot of people recommend looking into doing text games first before you learn graphics but it's often hard to make text work as an action game without special libraries anyway. You might as well follow the LazyFoo tutorials first and then you can step back and look at making text stuff later.
I seem to be starting to repeat myself so I'm going to stop here. Be sure to post back here with any questions you may have.
#11
Posted 21 December 2007 - 04:32 AM
I would focus first on graphics and basic algebra first before anything else. You don't need much math either. You can do some cool effects with it, yes, but it's not necessary to know it. For example, you don't have to care about rotation matrices when APIs provide a simple rotate() call. So long as you understand what it means to rotate about an axis (for example), you should be fine.
After that, I would jump into SDL and start playing with it's API. It supports input, audio, and 3D graphics via OpenGL (or 2D via Direct Draw). By then you'll be able to create objects and get them to interact with your scene.
#12
Posted 21 December 2007 - 04:37 PM
TheNut said:
I would focus first on graphics and basic algebra first before anything else. You don't need much math either. You can do some cool effects with it, yes, but it's not necessary to know it. For example, you don't have to care about rotation matrices when APIs provide a simple rotate() call. So long as you understand what it means to rotate about an axis (for example), you should be fine.
After that, I would jump into SDL and start playing with it's API. It supports input, audio, and 3D graphics via OpenGL (or 2D via Direct Draw). By then you'll be able to create objects and get them to interact with your scene.
#13
Posted 22 December 2007 - 03:34 AM
#14
Posted 23 December 2007 - 03:27 AM
struct object {
WHAT EVER IT HAS IN IT
} and typedef?
P.S. Does anyone know what is still used in the Guru book?
#15
Posted 23 December 2007 - 03:31 PM
this would be a valid object what youre doing with
struct object {
WHAT EVER IT HAS IN IT
} and typedef
But I would suggest you to make it this way:
class Object
{
public:
Object();
virtual ~Object();
virtual void draw();
virtual void move();
virtual void act();
virtual bool isFinished();
private:
you're data of your Object here (its position, color, size,...)
...
};
Keep the properties of the class virtual, because every other object will be inherited of this, your base object. And may require other behaviour inside those functions.
A big advantage of this system is, that you can push your Objects all together into a list (for example for garbage collection.)
Or you can have your drawing List where all necessary Objects are stored sorted by its Z-value (depth) and can be drawn then (may be of intreset when you have transparent objects).
Or if you have a physic engine all relevant Objects are stored in a List where they can interact with each other....
And I would suggest you to start with a really little game. You can remember asteroids or something? I made it too this way and I didn't regret it.
And don't worry my first game I ever developed took me 4 months (Not working only on my game this time I have a job to do too).
Happy Coding then and a nice day.
EDIT:
But i guess this was kind of too much input, you only asked for Object.
Yes this is the way to make a object!
Some code would look like that (I take my Object for demonstration)
int main(void)
{
Object *myObject;
myObject = new Object();
while(!myObject->isFinished())
{
myObject->act();
}
delete myObject;
return 0;
}
#16
Posted 24 December 2007 - 02:55 AM
Skaldi said:
this would be a valid object what youre doing with
struct object {
WHAT EVER IT HAS IN IT
} and typedef
But I would suggest you to make it this way:
class Object
{
public:
Object();
virtual ~Object();
virtual void draw();
virtual void move();
virtual void act();
virtual bool isFinished();
private:
you're data of your Object here (its position, color, size,...)
...
};
Keep the properties of the class virtual, because every other object will be inherited of this, your base object. And may require other behaviour inside those functions.
A big advantage of this system is, that you can push your Objects all together into a list (for example for garbage collection.)
Or you can have your drawing List where all necessary Objects are stored sorted by its Z-value (depth) and can be drawn then (may be of intreset when you have transparent objects).
Or if you have a physic engine all relevant Objects are stored in a List where they can interact with each other....
And I would suggest you to start with a really little game. You can remember asteroids or something? I made it too this way and I didn't regret it.
And don't worry my first game I ever developed took me 4 months (Not working only on my game this time I have a job to do too).
Happy Coding then and a nice day.
EDIT:
But i guess this was kind of too much input, you only asked for Object.
Yes this is the way to make a object!
Some code would look like that (I take my Object for demonstration)
int main(void)
{
Object *myObject;
myObject = new Object();
while(!myObject->isFinished())
{
myObject->act();
}
delete myObject;
return 0;
}
#17
Posted 25 December 2007 - 02:01 PM
First thing to do is, to create an OpenGL Window with black background with nothing on it.
Theres a good tutorial on nehe for this!
The next step for example learn how to display a texture on this black screen (on nehe too).
After having finished this, learn how to interact with keyboard (let your texture move and rotate when pressing the arrow keys.)
You'll se when this is finished you're very motivated to see how your players moves around on your black world.
Next step add a background to your black screen (for your first game a simple texture is enough).
Then add some effects to your player moving around (if it is a spaceship a simple particle system to it's jet propulsion).
Next add some obstacles and maybe enemies and some boons.
And then the game is almost finished anyway and you've done a big step learning.
Edit:
I started my first game this way too! And this is the result!
I would give you the sourcecode, but it is more confusing than helpfull I guess (If you ask for it I will post you a link for it anyway though). (It was my first game and I didn't know it better too.).
But with every project you make you'll get better and better and soon (in 2-3 years) you will be the guy who answers questions here :).
Screenshots
Download
#18
Posted 26 December 2007 - 07:52 AM
#19
Posted 26 December 2007 - 12:54 PM
#20
Posted 28 December 2007 - 03:55 AM
Skaldi said:
What is the best order for developing your first few games?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












