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

Pages: [1]
1
General discussions / I still get a bit of flicker....
« on: May 27, 2009, 07:52:33 pm »
I still see a bit of flickering, or it could just be that i am crazy... Here is my code
Code: [Select]

#include "stdafx.h"
#include "sfml.h"

using namespace sf;

int main()
{
// Create the main window
RenderWindow App(VideoMode(616, 387, 32), "SFML Window");
App.UseVerticalSync(true);

Image img_background;
if(!img_background.LoadFromFile("c://background.png"))
return -1;

Image img_ball;
if(!img_ball.LoadFromFile("c://ball.png"))
return -1;

Sprite background(img_background);
Sprite ball(img_ball);

ball.SetY(325);
   
while (App.IsOpened())
{    
Event Event;

while (App.GetEvent(Event))
{
if (Event.Type == Event::Closed)
App.Close();

if ((Event.Type == Event::KeyPressed) && (Event.Key.Code == Key::Escape))
App.Close();
}

if (App.GetInput().IsKeyDown(Key::Right)) ball.Move(100, 0);
if (App.GetInput().IsKeyDown(Key::Left))  ball.Move(-100, 0);

App.Clear();
App.Draw(background);
App.Draw(ball);

App.Display();
}

    return EXIT_SUCCESS;
}



I basically just had two simple images, one background image colored red that was the size of the window, and a white ball image that I moved back and forth...  The white ball tends to flicker sometimes though.  Any idea why it would?  I have solved this flickering issue in the past by just preforming some double buffering, but doesn't seem like you can easily add sprites with in sprites.  Any idea what I might be doing wrong?  Or is the flickering all in my head :-P

2
General discussions / Newb question about LGPL license
« on: May 10, 2009, 12:14:26 am »
Yeah it did :-D  It's all very clear now!  Thanks for the explanation everyone, it was very helpful :-)

3
General discussions / Newb question about LGPL license
« on: May 09, 2009, 07:33:55 am »
I see, so as long as I have those .dll files in there and I don't modify the source I don't have to share my projects source code?

4
General discussions / Newb question about LGPL license
« on: May 08, 2009, 09:03:10 pm »
Hey there I was wondering if some one could explain to me the whole deal with the LGPL, I read up on it and it's just so much to take in...  What I have taken from it is that you can use the code for both open source and commercial as long as you share your code?  Now that is what I am confused on...  So if I dynamically link the code and don't tinker with any of the source, does that mean I still need to share all of my projects source code to the world simply because I am using that library?  Or does it mean if I tinker with the source of the library under LGPL then I have to share the code I tweaked.  

I have a commercial project I want to start but I don't want to share my projects code and I don't plan to tweak any of the libraries I have implemented that are under that license...  Do I still have to share ALL my code?  I have no problem sharing any tweaks I make to library if I make them.  

So many different licenses it can all get very confusing...  At least for me anyways, an explanation would be greatly appreciated!

5
Window / Thanks!
« on: May 08, 2009, 08:53:24 pm »
Yeah felt kind of dumb that I didn't catch that @.@  I just setup some events and I am good to go :-D  You are a very helpful fello Laurent, THANKS! Such speedy response.

6
Window / CPU usage shoots up to 100 when generating a window
« on: May 06, 2009, 10:04:52 am »
I am using vs05, have compiled and linked everything fine except for some reason when it generates the window my cpu usage shoots up to 100 and the window locks up and I have to force it closed from the task manager...  Not sure why this is happening considering the only code I am using is the code for generating a simple window from the tutorial for version 1.4.  
Code: [Select]


int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {

        App.Display();
    }

    return EXIT_SUCCESS;
}


I am running on windows xp using 1.5ram, any ideas why this could would be such a memory hog?  am I missing something in the settings?

Pages: [1]
anything