Re: anyone wanna make an UGH! remake?
Posted: Fri Dec 05, 2008 10:20 pm
The Next Generation of 2D Roleplaying Games
http://elysianshadows.com/phpBB3/
Man, that's great! You can't say that I made the game.avansc wrote:http://download352.mediafire.com/nn9dem ... 4y/UGH.rar
in all its glory.
PixelP made this game!
Well damn, I was gonna check it out, but a spyware install popped up when I tried to download it.avansc wrote:http://download352.mediafire.com/nn9dem ... 4y/UGH.rar
in all its glory.
PixelP made this game!
PixelP wrote:It's 5:40 here and I'm going to bed...
I've been reading trough all the code and I get everything but the update_Player function...avansc wrote:PixelP wrote:It's 5:40 here and I'm going to bed...
yeah i can, you gave the design ideas. the collision code. i just implimented it for you.
tomorrow we will make a level saver and loader, so that sohuld eb fun.
Code: Select all
void physics::update_Player(player *p)
{
float g = 9.8;
g *= p->weight;
g *= 0.0001;
p->yA += g;
p->x += p->xA;
p->y += p->yA;
for(int a = 0;a < this->temp->object_Count;a++)
{
if(this->col(&this->temp->data[a], p))
{
p->x -= p->xA;
p->y -= p->yA;
p->yA = 0;
p->xA = 0;
return;
}
}
}
Code: Select all
#include "object.h"
#ifndef _level_h
#define _level_h
class level
{
public:
level();
void add_Object(int x, int y, int w, int h, int r, int g, int b);
object data[10];
int object_Count;
private:
};
#endif
Code: Select all
#include "level.h"
level::level()
{
this->object_Count = 0;
}
void level::add_Object(int x, int y, int w, int h, int r, int g, int b)
{
if(this->object_Count < 9)
{
this->data[this->object_Count] = object(x, y, w, h, r, g, b);
this->object_Count++;
}
}
Code: Select all
#ifndef _object_h
#define _object_h
class object
{
public:
object();
object(int x, int y, int w, int h, int r, int g, int b);
int x;
int y;
int w;
int h;
int r;
int g;
int b;
private:
};
#endif
Code: Select all
#include "object.h"
object::object()
{
this->x = 0;
this->y = 0;
this->w = 0;
this->h = 0;
this->r = 255;
this->g = 255;
this->b = 255;
}
object::object(int x, int y, int w, int h, int r, int g, int b)
{
this->x = x;
this->y = y;
this->w = w;
this->h = h;
this->r = r;
this->g = g;
this->b = b;
}
Code: Select all
void GFX::draw_Object(object *obj)
{
rectangleRGBA(this->screen, obj->x, obj->y, obj->x+obj->w, obj->y+obj->h, obj->r, obj->g, obj->b, 255);
}
PixelP wrote:The collision is not perfect, I think... http://willhostforfood.com/files3/7821061/col.wmv
Looks like objects can't be smaller then the player...
Good.avansc wrote:PixelP wrote:The collision is not perfect, I think... http://willhostforfood.com/files3/7821061/col.wmv
Looks like objects can't be smaller then the player...
yeah i saw that last night. its an easy fix tho.
Hell yeah!avansc wrote:so pixelp, do you wanna make a level loader and saver for our game?
PixelP wrote:Hell yeah!avansc wrote:so pixelp, do you wanna make a level loader and saver for our game?
Sounds good... have a nice meal.avansc wrote:PixelP wrote:Hell yeah!avansc wrote:so pixelp, do you wanna make a level loader and saver for our game?
okay buddy. im just gonna go out to supper. i'll be back in 45 min. then we will get cracking.