Page 2 of 5
Posted: Thu Sep 02, 2004 10:08 pm
by Don Pwnious
I already knew that i meant on sourceforge.
Posted: Fri Sep 03, 2004 3:11 pm
by Don Pwnious
WHAT i have to learn SDL to have graphical games???????????
does anyone know any good SDL sites?
Posted: Fri Sep 03, 2004 3:58 pm
by Falco Girgis
lol, yes, and no.
That right there, is one of the reasons Dreamcast programming is ideal. It just takes knowledge of C/C++ (mainly C) and good knowledge of the Dreamcast hardware (PVR).
I have two books on SDL I bought. SDL, from what little I've attempted to learn so far, is pretty damn easy (hard as hell though, compared to blitz).
I don't know of any good websites, but I recommend a book called "Focus on SDL" by the same publisher that made your blitz book...
Learn SDL, don't become a DirectX whore...
DirectX would be your other choice, it only runs on windows though, so everybody using macs, and linux/unix isn't going to be able to play. SDL OWNZ DirectX.
Another option, Marauder knows much more is like orthroprojectile OpenGL or something. Since SDL and OpenGL can tie in together and are both platform independent, that would be a good choice.
JUST KEEP IN MIND!
SDL & OpenGL > DirectX & Direct3D
Posted: Fri Sep 03, 2004 4:04 pm
by Don Pwnious
Thanks about the compiler the one i have sucks really bad, i dont know the name of it, For DEV-c++ what mirror site did you got onto on SourceForge for the compiler?
Posted: Fri Sep 03, 2004 4:07 pm
by Falco Girgis
I dont' remember but they should all work just the same :?
Posted: Fri Sep 03, 2004 4:12 pm
by Don Pwnious
On the ones ive been on i have too search for it
Posted: Fri Sep 03, 2004 5:45 pm
by JS Lemming
How did I miss this conversation... o well.
I quit actually reading through my C++ book around pointers.
MAN I hated pointers!!!! I just didn't get it back when I was first learning them. But now I think they're holy, there is just so many possibilities opened with them.
My first little, easy C++ program
Posted: Fri Sep 03, 2004 8:27 pm
by Don Pwnious
uhhh i gather all the information of all 4 lessons to make this:
Code: Select all
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
int ID;
cout << "Enter your name ";
cin >> name;
cout << "Enter your ID number ";
cin >> ID;
cout << "Hello " << name << " or should I say " << ID << endl;
return 0;
}
Its not much, but i wanted to try something
Posted: Fri Sep 03, 2004 8:58 pm
by Don Pwnious
can someone help me i am making a guessing game and i need to know how to do random numbers. i am trying to find it in the book i got but no luck.
Posted: Fri Sep 03, 2004 9:18 pm
by Falco Girgis
OMFG! YOU NEED T3H POWER OF RAND()!
Aight whigga. I'll make yer random numbers. Just wait one sec, I need to go to the store. It's really easy. too...
Posted: Fri Sep 03, 2004 9:21 pm
by JS Lemming
Ah yes the guessing game. First you need to include the "time.h" header, which allows you to access the current computer time in millisecs.
Well, just take a look at this.
Code: Select all
//Include this...
#include <time.h>
//Then do something like this...
//Seed the random generator
srand( (unsigned)time( NULL ) );
//Set a var equal to a number between 0 and 100
randominterger = rand() % 100;
That was just a simple example, I'm sure you can manipulate it to fit your needs.
EDIT -
Sorry Super Sonic, I guess I posted at the same Time as you.
Posted: Fri Sep 03, 2004 9:22 pm
by Falco Girgis
JS Lemming wrote:Ah yes the guessing game. First you need to include the "time.h" header, which allows you to access the current computer time in millisecs.
Well, just take a look at this.
Code: Select all
//Include this...
#include <time.h>
//Then do something like this...
//Seed the random generator
srand( (unsigned)time( NULL ) );
//Set a var equal to a number between 0 and 100
randominterger = rand() % 100;
That was just a simple example, I'm sure you can manipulate it to fit your needs.
Allright, JS Lemming took care of that. I'd just like to add to what he said. Particulary this line:
What if you want a random number between 100-200? That is simple. Like this:
Code: Select all
randominterger = rand() % 100+100;
That is basically saying: "Get me some random ass number between 0-100 then add 100 to it. That means that you can never get below 100, and never above 200.
Posted: Fri Sep 03, 2004 9:25 pm
by Don Pwnious
ok Thanks
Posted: Fri Sep 03, 2004 9:35 pm
by JS Lemming
It might be a good idea to put parenthesies around that last one.
Code: Select all
randominterger = (rand() % 100)+100;
Just to make life easier on the pilgrimer.
Posted: Fri Sep 03, 2004 9:38 pm
by Don Pwnious
ok uhh lemming i edited your post a little i put a "t" behind the "i"