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

Pages: [1]
1
Graphics / How to detect OnScreen Sprites when using views?
« on: July 10, 2012, 06:46:07 am »
I'm using a custom sf::View for my RenderWindow in my tile-based RPG. Now I use sf::View's Move() method to scroll around the map. Now the problem is, how do I detect the sprites that are currently on the screen? I tried this:

/** pro::Tile is derived from sf::Sprite **/
bool LevelRenderer::OnScreen(pro::Tile& tile, sf::RenderWindow& app)
{
    return (tile.GetPosition().x > 0 && tile.GetPosition().x < app.GetWidth()
            && tile.GetPosition().y > 0 && tile.GetPosition().y < app.GetHeight());
}

However, although it initially works fine, after I Move() the view, the sprite's positions aren't updated and new sprites that appear on the screen are not drawn. What should I do?

2
General discussions / Does SFML 1.6 Do clipping automatically?
« on: July 08, 2012, 11:17:52 am »
I'm creating a rogue-like tile-based 2d RPG game. What I want to know is, say there are sprites outside the screen which are drawn with the `App.Draw()` method. Now, will the `Draw()` method automatically not draw the sprites which are off-screen, or will I have to personally write code to prevent the drawing of off-screen sprites? I've made some games with Java2D and Swing, there the toolkit automatically does not draw off-screen images, does SFML do the same?


3
General / Main Menu
« on: April 26, 2011, 07:51:45 am »
Awesome menu, I sure hope the game is equally good. What is the game , by the way, Rpg? The menu reminds me of visual novels, is it one of those? I sure hope it isnt some idiotic arcade game.

4
General discussions / Cant Compile SFML Program on codeblocks
« on: April 03, 2011, 04:55:31 am »
hello, i have linked all the libraries and completely set up everything. Everything else works fine but when i add a sprite to my program an error occurs:
multiple definitions of rf::Sprite

followed by 27 more errors of the same kind.

Pages: [1]
anything