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.


Topics - lorence30

Pages: 1 2 [3]
31
Graphics / undefine reference
« on: May 24, 2015, 07:06:13 pm »
undefined reference to `_imp___ZN2sf5ImageD1Ev'|

why i keep getting this error? i cant start my program.
im using C::B 13.12, SFML 2.1

but i can use the other classes in graphics like texture and sprites fine.

32
Graphics / cannon and bullet
« on: May 22, 2015, 08:10:18 pm »
what would be the best idea to write cannon and bullets?


class Cannon{};
class Bullet : pubic Cannon{};

or write them separately?
class Cannon{};
class Bullet{};

33
Graphics / sprite filled with white color
« on: May 17, 2015, 05:50:09 pm »
it says that you will get white screen when the texture the sprite is pointing is no longer alive.

heres my constructor
Quote
WeirdAlien::WeirdAlien()
{
    _sprite.setTexture(loadAlien());
    alien_position[ctr].x = ctr * 32;
    ++ctr;
}

void drawAlien(const int alien_count,const std::vector<Alien*>alien,const bool isAlienAlive[6],sf::RenderWindow& game_window)
{
    for ( int a = 0; a < alien_count; a++ )
        if (isAlienAlive[a])
            game_window.draw(alien[a]->setSprite());
}

im still getting white square problem, why?

34
General / building sfml in cmake
« on: May 15, 2015, 07:12:12 pm »
when im trying to configuring sfml with cmake to build it.
i always get this error in cmake

35
Graphics / deleting texture
« on: May 13, 2015, 07:46:04 pm »
sprite.setTextureRect(sf::IntRect(0,0,32*6,32*6));
i created multiple aliens from 1 alien,
is it possible to delete the selected alien from the window?


36
Graphics / sfml 2.3
« on: May 10, 2015, 01:44:42 pm »
I get this run time error when i try to use SFML 2.3 ( see picture below )


37
Graphics / extra images appearing at 0,0 coordinate of window
« on: May 10, 2015, 11:51:57 am »
http://pastebin.com/4QwmkZX6

can someone test my program?
here is the code: http://pastebin.com/4QwmkZX6
and download the images below and put the folder in the working directory.

if you notice,
if you play it slowly the game is fine,
but when you try to play it like spamming the key and mouse left button you will notice theres sometimes extra images appearing at 0,0 coordinate of window

38
Graphics / texture and sprite
« on: May 09, 2015, 06:15:07 pm »
Can i load more than one image to texture and set texture to sprite?

example:
sf::Texture texture;
texture.loadFromFile("image1.png");
texture.loadFromFile("image2.png");

does the image1 get destroyed? if not how can i choose which image i want to render.
example:
sprite.setTexture(texture.choosewhatiwanttoset("image1.png"));
sprite.setTexture(texture.choosewhatiwanttoset("image2.png"));
...
same question for sprite,
window.draw(sprite.choosewhatiwanttorender("image1.png"));

thanks



39
Graphics / program crashes when rendering
« on: May 06, 2015, 08:21:33 pm »
#include "SFML/Graphics.hpp"
int main()
{
    sf::RenderWindow w(sf::VideoMode(500,500),"test");

    sf::CircleShape player(10.0f);

    while( w.isOpen() )
    {
        sf::Event event;
        while ( w.pollEvent(event) ){
            if ( event.type == sf::Event::Closed )
                w.close();
        }
    w.clear();
    w.draw(player);
    w.display();

    }

}

hello, good morning.

can i ask why the program above crash when executing w.draw(player); ?
Im using SFML 2.2
thanks.

40
Graphics / no symbols loaded for sfml-graphics-d-2.dll
« on: May 02, 2015, 07:07:42 pm »
it looks like this is the problem why i keep getting transparent window when running sfml program.

can you guys take a look at the picture below?
i see that when i use the debugger tool of vs express for windows desktop
ive been trying to fix my problem for almost 4 days

thanks

41
Im done building the SFML with cmake and I am compiling it right now with Code::Blocks 13.12
Im compiling it with Build target "all".
But a window that says "You must select a host application to "run" a commands-only target" keeps popping up.

42
Graphics / Not appearing anything on the graphics window
« on: April 30, 2015, 12:06:14 pm »
Can you take a look at the picture?
its not drawing the green circle shape
im using visual studio express for windows desktop

43
Graphics / something on my screen in sprite
« on: April 19, 2015, 03:14:14 pm »
i am writing space invader game.
im creating multiple aliens from a single alien image , so i could save space.
heres my code:
sprite.setTextureRect(sf::IntRect(0, 0, texture.getSize().x*  2 , texture.getSize().y));
when i run it, i get this green thing, see picture below

44
Graphics / my path is correct but still cannot load the file
« on: April 15, 2015, 10:36:11 pm »
can someone take a look at the picture below?
why im getting that error?
the image is already at the working directory
this is the code

if(!texture.loadFromFile("airplane.jpeg");
{
std::cout <<"error";
}

45
Window / SFML draw function of Window class
« on: April 15, 2015, 01:49:56 pm »
Ive been trying to figure out my problem for a week and and i have searched thouroughly in google
i dont know why im getting this run time error "unhandled exception"

i suspect that theres problem in draw function of window class

im linking 2.2 sfml.

i tried this solution:
i replace the dll files of sfml 2.2 with 2.1 and it all works, but it seems its like im using 2.1

Pages: 1 2 [3]