NEStix: Programming (C++/SDL)

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
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 »

God damn you Marcel. What the FUCK are you talking about? I'm this close to deleting you from this forum. Freaking lussac.
JSL wrote: How could perl be better then c++ in anything besides working with string and text things, which the game would not have much of or any.
What? Who ever said that C++ was the supreme leader of programming? Perl can freaking OWN C++ at many things (but yes C++ generally pwnz perl).

I'll find so many examples for you that you'll be drooling for an embedded perl interpretter.
JSL wrote:besides working with string and text things
Nobody ever said anything about text and strings being the only thing perl is useful for. You poor naive soul. I'll show you....
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 »

What? Who ever said that C++ was the supreme leader of programming? Perl can freaking OWN C++ at many things (but yes C++ generally pwnz perl).
Yes, show me how Perl can OWN C++. If perl were so powerful in game developement, it would be more widely used (I've never heard of using perl in with c++ for game dev). Show me examples foo.

BTW Arce, what were you talking about? An interpreter?
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 »

Obviously, the break has been over for a while. What should I be doing? I've been perling my ass off though. The day after tomorrow, I'll show you guys my results.

I don't know what to be working on for NEStix. I was thinking that once the level editor was done, we'd make one level. Then, we'd go through the level. If we see "hrm... Mario doesn't die when he falls off cliffs yet", we make him die. If we see "Umm... There needs to be a goomba here or somethign", we make goombas.

I don't know what order to be doing things right now. I was just thinking having an actual level will show us what needs to be done.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

Try sitting down and making a list of what you need. A hard-coded level would probably work for testing. Then list what you need for an engine.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
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 »

See thats the problem. If we want this to really be succesful, we HAVE to design almost everything before we start programming. Thats what the big guys do. But since we aren't working that way, we'll end up blindly programming stuff for the game that will either have to be accepted and possibly not wanted, or thrown out all together (waste of the little time we have).
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

http://uml.sf.net

Yeah. You need AT LEAST a skeleton design. That's what I'm working with in MrAdventure.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
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 »

. . . Don't make me beg for something to program!

Gimme some pilgrimage! I've had enough perl (I'm still doing it, so don't freak out). I just want to get back to my beloved C++...
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've got a couple of things on my mind.

1) It's obvious that we're going to be using lots of linked lists here. I should make a generic linked list creater/updater or have 2 functions for every list?

2) What if I want something to belong to a belong to a class, but I don't really want every instance of it to have that variable. Like the base stats for goombas. I don't want their base stats to be reallocated into memory for every goomba, I'd like for them all to use one base stats. Any other way besides just using standard global variables?
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 »

Yes we NEED to make a standard link lists system, we can work on it together on MSN sometime maybe.

About the base stats thing... I think makeing them constants/globals is the best way to go with that. What else is there?
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
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 »

Yeah but I think if were going to use Inhertiance, then we should use it on alot more then just base stats. Maybe draw and update functions aswell.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

GyroVorbis wrote:I've got a couple of things on my mind.

1) It's obvious that we're going to be using lots of linked lists here. I should make a generic linked list creater/updater or have 2 functions for every list?
vectors == linked lists
GyroVorbis wrote:2) What if I want something to belong to a belong to a class, but I don't really want every instance of it to have that variable. Like the base stats for goombas. I don't want their base stats to be reallocated into memory for every goomba, I'd like for them all to use one base stats. Any other way besides just using standard global variables?
Inhertiance

Code: Select all

class NPC {
    string desc;
    string name;
    int hp;
    string picture;
};

class GoombaBase {
    vector<Goomba*>instances;
    string sharedOne;
    int sharedTwo;
};

class Goomba : public NPC {
    bool doesJump; //or something goombaspecific
    GoombaBase* master;
};
Last edited by MarauderIIC on Fri Dec 10, 2004 9:03 pm, edited 2 times in total.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

No, really? /sarcasm

That'd probably be in NPC.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
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 »

MarauderIIC wrote:No, really? /sarcasm

That'd probably be in NPC.
Well excuse me.
Small girl at the harbor wrote:Look Brandon, that crab's got ham!
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

By the way,
I wrote: Inhertiance

Code: Select all

class NPC {
    string desc;
    string name;
    int hp;
    string picture;
};

class GoombaBase {
    vector<Goomba*>instances;
    string sharedOne;
    int sharedTwo;
};

class Goomba : public NPC {
    bool doesJump; //or something goombaspecific
    GoombaBase* master;
};
GoombaBase* master is something like so:

Code: Select all

void initialize() { //iow, only run once
    GoombaBase GB = new GoombaBase; //error check for free mem
    Goomba newGoomba;

    for (i = 0;i < mapData.totalGoombas();++i) {
        newGoomba = NULL;
        newGoomba = new Goomba; //error check for free mem
        newGoomba->setMaster(GB);
        GB->addGoomba(newGoomba);
    }
}
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Tvspelsfreak
Chaos Rift Junior
Chaos Rift Junior
Posts: 272
Joined: Wed Sep 29, 2004 5:53 pm
Favorite Gaming Platforms: NES, SNES
Programming Language of Choice: C/C++
Location: Umeå, Sweden
Contact:

Post by Tvspelsfreak »

C++ Vectors != Dreamcast compatible

At least unless GyroVorbis feels like installing a complete cygwin + newest KOS development version and do everything through a DOS console and text editor. :mrgreen:
Post Reply