Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ActionBoy

Pages: 1 2 [3]
31
Graphics / Ingame Paper doll
« on: July 16, 2010, 03:05:11 pm »
Here is my little function:
Code: [Select]

void loadPaperdoll()
{
    if (!mPaperdoll.mImageBody.LoadFromFile("res//vd//body//1.png"))
    {
        cout<<"Could not read file!!!";
    }
    mPaperdoll.mImageBody.SetSmooth(false);

    if (!mPaperdoll.mImageComplete.LoadFromFile("res//vd//body//1.png"))
    {
        cout<<"Could not read file!!!";
    }
    mPaperdoll.mImageComplete.SetSmooth(false);

    if (!mPaperdoll.mImageClothes.LoadFromFile("res//vd//clothes//1.png"))
    {
        cout<<"Could not read file!!!";
    }
    mPaperdoll.mImageClothes.SetSmooth(false);

    if (!mPaperdoll.mImageHair.LoadFromFile("res//vd//hair//1.png"))
    {
        cout<<"Could not read file!!!";
    }
    mPaperdoll.mImageHair.SetSmooth(false);


    sf::IntRect rct(0,0,0,0);


    mPaperdoll.mImageComplete.Copy(mPaperdoll.mImageClothes,0,0,rct,true);
    mPaperdoll.mImageComplete.Copy(mPaperdoll.mImageHair,0,0,rct,true);

    mPaperdoll.mSprite.SetImage(mPaperdoll.mImageComplete);
    mPaperdoll.mSprite.SetPosition(10,10);
    mPaperdoll.mSprite.SetScale(2.0f,2.0f);
}

The problem is that it don't want to overlay the images.

32
Graphics / Ingame Paper doll
« on: July 16, 2010, 01:48:59 pm »
The reason I don't want to draw them separately is that(because of my bad coding) sfml render them slightly of sometimes. I get one pixel off sometimes when I render, zoom and move around. This is because of bad floats and bad zooming(all my fault). I don't know how I missed image::copy. It was in my mind that the image had to be onscreen to copy. Thanks again for some great info and a great lib. :D

33
Graphics / Ingame Paper doll
« on: July 16, 2010, 12:36:56 pm »
Me and my friend have been working on a character system that lets you change the skincolor of your character and haircolor. But what is the best approach?
As the game is really lowres, I was thinking about having a 'hairsprite' and a 'bodysprite' and then later join them so you just render one sprite. But how do I join sprites offscreen pixelperfect. I think this could also be used to create different monster at random.

Here is some screens for the game, called 'The Wastelander':
http://img820.imageshack.us/i/wastelander1.png/
http://img228.imageshack.us/i/wastelander2.png/

34
Graphics / sf::string, newlines and getline
« on: May 27, 2010, 09:24:13 pm »
Tnx. That makes perfect sense.

35
Graphics / sf::string, newlines and getline
« on: May 26, 2010, 11:00:08 pm »
Sorry to highjack the topic, but I wonder is it possible to load a line with getline that contains \n in the text file and make SFML render it as a new line?

For Example:

Hi I have a dog.\n Whats your name?

and have it rendered as

Hi I have a dog.
Whats your name?

The reason is I have some old gamefiles from the DOS days that looks like this so I dont want to edit them(replace \n a new line).

Edit: Just read what I wrote again and it sounds dumb, but I still like to know.

36
SFML projects / Simple Platformer
« on: December 05, 2009, 11:43:15 am »
Been working on a platformer for a couple of days now. The idea for the whole thing is that you load images and create a level and then draw shapes over it that works as the collision layer.

Right now it works like this:
- Loading png to a resource library
- Create sprites from a map file and the resource library.
- Each sprite can be edited. Scale, pos, rotation and color can be changed.
- Then checks collision from the shapes in the scene.






Pages: 1 2 [3]