anyone wanna make an UGH! remake?
Moderator: Coders of Rage
Re: anyone wanna make an UGH! remake?
if you work hard, and do as i advice, i promise we will at least have a version that you can fly around in. with collisions.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Great, what's up next?avansc wrote:if you work hard, and do as i advice, i promise we will at least have a version that you can fly around in. with collisions.
Re: anyone wanna make an UGH! remake?
post the classes you made so i can see if we need to work on them
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
Re: anyone wanna make an UGH! remake?
my bad, i see em
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
Re: anyone wanna make an UGH! remake?
okay, those will work nice. no add some member functions to the level class.
we will need.
add_object(int x, int y, int w, int h);
move_object(&objectclass, int x, int y);
change_object(&objecclass, int w, int h);
we will need.
add_object(int x, int y, int w, int h);
move_object(&objectclass, int x, int y);
change_object(&objecclass, int w, int h);
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Can you explain how this functions is going to be like?avansc wrote: add_object(int x, int y, int w, int h);
Re: anyone wanna make an UGH! remake?
i just mean that you should putPixelP wrote:How is these functions going to work out?avansc wrote:okay, those will work nice. no add some member functions to the level class.
we will need.
add_object(int x, int y, int w, int h);
move_object(&objectclass, int x, int y);
change_object(&objecclass, int w, int h);
add_object
move_object
change_object
to your level class.
and actually move and chage object will have parameters
move_object(objecClass *obj, int x, int y);
i mean you can call then whatever you want. just functions that can alter the objects.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
Re: anyone wanna make an UGH! remake?
PixelP wrote:I've made the two classes:Code: Select all
//object.h #pragma once class ObjectClass { public: int x, y; int w, h; };
Code: Select all
//level.h #pragma once class LevelClass { public: ObjectClass levelData[10]; int ObjectCount; };
sorry, you should also have a count of how many object you currently have in your level
Code: Select all
new_Object(int x, int y, int w, int h)
{
this->ObjectCount++;
if(this->ObjectCount >9)
return
this->Object[this->ObjectCount].x = x;
this->Object[this->ObjectCount].y = y;
this->Object[this->ObjectCount].w = w;
this->Object[this->ObjectCount].h = h;
}
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Code: Select all
//level.h
#pragma once
class LevelClass {
public:
ObjectClass levelData[10];
void add_object(int x, int y, int w, int h);
void move_object(ObjectClass* obj, int x, int y);
void change_object(ObjectClass* obj, int w, int h);
};
void LevelClass::add_object(int x, int y, int w, int h) {
//????????????
}
void LevelClass::move_object(ObjectClass* obj, int x, int y) {
obj->x = x;
obj->y = y;
}
void LevelClass::change_object(ObjectClass* obj, int w, int h) {
obj->w = w;
obj->h = h;
}
Re: anyone wanna make an UGH! remake?
check one up
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Code: Select all
void LevelClass::add_object(int x, int y, int w, int h) {
this->objectCount++;
if(this->objectCount > 9) {
return;
}
this->levelData[this->objectCount].x = x;
this->levelData[this->objectCount].y = y;
this->levelData[this->objectCount].w = w;
this->levelData[this->objectCount].h = h;
}
Re: anyone wanna make an UGH! remake?
okay. great. now i'll let you have some input on the matters. do you wanna do some graphics first or moce on to the player object.
its up to you.
its up to you.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Hehe, I'm not that good at graphics.
- PixelP
- Chaos Rift Regular
- Posts: 153
- Joined: Tue Oct 07, 2008 12:23 pm
- Programming Language of Choice: c/c++
- Location: sweden
- Contact:
Re: anyone wanna make an UGH! remake?
Code: Select all
//debug.h
#pragma once
class DebugClass {
private:
std::fstream debugFile;
public:
DebugClass();
void DebugLine(std::string str);
};
DebugClass::DebugClass() {
debugFile.open("debug.txt", std::fstream::out);
}
void DebugClass::DebugLine(std::string str) {
debugFile << str << std::endl;
debugFile.flush();
}
Re: anyone wanna make an UGH! remake?
okay thats fine. lets make the player class.
what do you think are all values we should store???
what do you think are all values we should store???
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"