Just starting up

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post by Don Pwnious »

I already knew that i meant on sourceforge.
1/8th time- 14secs
1/8th speed - 110mph
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post by Don Pwnious »

WHAT i have to learn SDL to have graphical games???????????

does anyone know any good SDL sites?
1/8th time- 14secs
1/8th speed - 110mph
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post 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?
1/8th time- 14secs
1/8th speed - 110mph
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

I dont' remember but they should all work just the same :?
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post by Don Pwnious »

On the ones ive been on i have too search for it
1/8th time- 14secs
1/8th speed - 110mph
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post 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.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

My first little, easy C++ program

Post 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
1/8th time- 14secs
1/8th speed - 110mph
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post 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.
1/8th time- 14secs
1/8th speed - 110mph
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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...
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post 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.
Last edited by JS Lemming on Fri Sep 03, 2004 9:21 pm, edited 1 time in total.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post 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:

Code: Select all

randominterger = rand() % 100;
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.
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post by Don Pwnious »

ok Thanks
1/8th time- 14secs
1/8th speed - 110mph
User avatar
JS Lemming
Game Developer
Game Developer
Posts: 2383
Joined: Fri May 21, 2004 4:09 pm
Location: C:\CON\CON

Post 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.
Last edited by JS Lemming on Fri Sep 03, 2004 9:35 pm, edited 1 time in total.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
Don Pwnious
Chaos Rift Devotee
Chaos Rift Devotee
Posts: 833
Joined: Tue Jun 15, 2004 5:32 pm
Location: on the streets wit my j23
Contact:

Post by Don Pwnious »

ok uhh lemming i edited your post a little i put a "t" behind the "i"
1/8th time- 14secs
1/8th speed - 110mph
Locked