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

Pages: [1]
1
Graphics / Check string width in pixels
« on: November 29, 2009, 09:49:20 pm »
How do I know the string width in pixels?

2
SFML projects / Earth Defenders -- Commercial game project
« on: November 19, 2009, 04:39:51 am »
Doesnt work for me either. And screens are missing :(

3
SFML projects / My small shmup
« on: November 11, 2009, 09:20:30 pm »
Quote
BTW - Great little game.  You just need to have a display of how many lives you have left, unless I didn't understand how it works.  Maybe it's all based on how many points you have?


There is a % in the bottom right corner. Displays how much armor/shield/whatever you still have :P

4
SFML projects / My small shmup
« on: November 10, 2009, 10:01:11 pm »
Added sounds :)

5
SFML projects / My small shmup
« on: November 09, 2009, 06:59:08 pm »
I added download links :D

6
Graphics / Image formats
« on: November 09, 2009, 04:39:22 pm »
What formats sf::Image support on LoadFromFile function?
It doesnt says in the documentation :(

7
SFML projects / My small shmup
« on: November 08, 2009, 09:30:43 pm »
Hello :D I'm working in my first game using SFML. Its a small shmup, we have to start small right?

Screenshot:


Source: http://www.4shared.com/file/149092192/4b5be5d2/Space_Game_source.html
Windows: http://www.4shared.com/file/149092034/5915c25a/Space_Game_Release.html

8
Graphics / One sprite, various objects, am I doing it wrong?
« on: November 08, 2009, 09:10:02 pm »
Thats what I'm doing. One sprite per image. One sprite for every object
I'm just not sure if this is the right way

9
Graphics / One sprite, various objects, am I doing it wrong?
« on: November 08, 2009, 05:57:52 pm »
I am new to SFML and I'm making a small shmup. I have this image of a star(its actually a white dot but whatever). Then  Ive to draw each of the 1000 stars in the screen. But instead of using one sprite for each star I use sprite for every star! And I'm not sure if this is the right way :(
Code: [Select]

    for(int i = 0; i < (int)cg->stars.size(); i++)
    {
        switch(cg->stars[i].kind)
        {
            case 0:
            {
                cg->sprites[sid_star0].SetPosition(cg->stars[i].x, cg->stars[i].y);
                cg->sprites[sid_star0].SetRotation(cg->stars[i].rot);

                wnd.Draw(cg->sprites[sid_star0]);
            }
            case 1:
            {
                cg->sprites[sid_star1].SetPosition(cg->stars[i].x, cg->stars[i].y);
                cg->sprites[sid_star1].SetRotation(cg->stars[i].rot);

                wnd.Draw(cg->sprites[sid_star1]);
            }
        }
    }

10
Graphics / Font segfault D:
« on: November 08, 2009, 02:04:49 am »
Hello, I added this code to my game

Code: [Select]
void draw_hud(){
    sf::String score, hp;
    std::stringstream ss;

    score.SetFont(cg->hud_font);
    hp.SetFont(cg->hud_font);

    ss << (int)cg->player.score;
    score.SetText(ss.str().c_str());

    ss.str("");
    ss << "%" << cg->player.hp;
    hp.SetText(ss.str().c_str());

    score.SetPosition(24,480-48);
    wnd.Draw(score);

    hp.SetPosition(400, 480-48);
    wnd.Draw(hp);
}


And now a segfault happens when I close the game D:
Call stack:
#0 08FEAFDA   igldev32!devProcessAttach() (C:\WINDOWS\system32\igldev32.dll:??)

I already checked, its that code that makes segfault happen.

11
Graphics / Flipping a sprite horizontally/vertically
« on: November 07, 2009, 11:57:38 pm »
How do I flip a sprite horizontally/vertically? I tried SetScale(-1,-1) but nothing happens :(

Pages: [1]