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

Pages: [1]
1
General / Dynamic DLL's in seperate folder
« on: May 05, 2016, 12:22:49 am »
Hi all,

I'm just curious. Would it be possible to compile dynamically but have the DLL files in a separate folder for distribution?

Cheers

2
General / Building for Android
« on: April 13, 2016, 10:01:53 am »
Hi Guys,

I am having terrible difficulty building SFML for Android on Windows. I have followed this guide to the letter: https://github.com/SFML/SFML/wiki/Tutorial:-Building-SFML-for-Android

This is the part I'm having difficulty with:

"Use it to build and then install SFML. For example, under Linux you'd issue the following commands:

make && sudo make install"

What would be the Windows equivalent to this instruction?

Thank you for your help.


3
Graphics / Draw a sprite but not at its coordinates.
« on: January 07, 2013, 06:05:43 pm »
Hi All!

I hope you had a good festive season!

Is there any way to draw a sprite at a position that is not the sprites actual position? Its very hard to explain what I'm trying to do, apologies if this is confusing.

Lets say I have a sprite at position x = 200, y = 100. I want my games logic update to hold these values. But I want my render update to show the sprite at say x = 210, y = 110.

Does this make sense?

Thanks for your help.

4
Graphics / Delta Time
« on: January 03, 2012, 11:26:12 am »
Im confused trying to implement delta time for my character movement. here is some code (Ive only shown important parts for simplicity):

Code: [Select]

sf::RenderWindow Game1(sf::VideoMode(800, 600), "Platform Engine", sf::Style::Close);

Game1.EnableVerticalSync(true);
//Game1.SetFramerateLimit(25);

//time in seconds
float deltaTime = Game1.GetFrameTime() / 1000.0f;

if(sf::Keyboard::IsKeyPressed(sf::Keyboard::Left))
{
    playerX -= 40.0f * deltaTime;
}

if(sf::Keyboard::IsKeyPressed(sf::Keyboard::Right))
{
    playerX += 40.0f * deltaTime;
}

playerSprite.SetPosition(playerX, playerY);


Problem is, when I run the game with frame limit set to 25, the character takes 20 seconds to cross the screen, as it should be. But if I have no frame limit, it takes longer for the character to cross the screen. Id like to release with no frame limit, but upon testing on other machines, both slower and faster ones, I'm still getting varying speeds of character movement.

Any ideas on what I'm doing wrong?

Cheers.

5
Graphics / CreateMaskFromColor
« on: December 12, 2011, 11:53:48 pm »
Hi All,

If I'm using an image I can use the CreateMaskFromColor function to remove pixels from the image. Is there any way I can do this with a render texture?

Thanks.

6
System / delta time
« on: August 15, 2011, 12:35:00 am »
Hi All,

After using version 1.6 for a while I move my sprites similar to how the tutorial suggested:

Code: [Select]
const float Speed = 50.f;
float Left = 0.f;
float Top  = 0.f;

while (App.IsOpened())
{
    if (App.GetInput().IsKeyDown(sf::Key::Left))  Left -= Speed * App.GetFrameTime();
    if (App.GetInput().IsKeyDown(sf::Key::Right)) Left += Speed * App.GetFrameTime();
    if (App.GetInput().IsKeyDown(sf::Key::Up))    Top  -= Speed * App.GetFrameTime();
    if (App.GetInput().IsKeyDown(sf::Key::Down))  Top  += Speed * App.GetFrameTime();
}


Now using the latest snapshot, I realise that time is handeled with UInt32. How would the above code work in 2.0? I have found that my games timing is gone very wrong since moving to 2.0.

Thanks for reading!

7
Graphics / EnableVerticalSync
« on: August 13, 2011, 12:53:03 am »
Hi All,

I'm working on a tile engine at the moment. Everything is going well. I have the characters moving using delta time to ensure movement is uniform on all platforms. There is slight jagged edges on sprites and tiles when the map is scrolling, if I set EnableVerticalSync to true on  the render window, I get lovely crisp graphics but the whole game slows down. Looking at the documentation for EnableVerticalSync (using latest 2.0), it says

"This can avoid some visual artifacts, and limit the framerate to a good value (but not constant across different computers)."

Is there any way I can use this function yet somehow ensure uniform speeds for my characters?

I hope Ive explained this properly and thank you for reading.

Kid.

8
General / Clean Up
« on: January 25, 2011, 01:11:35 am »
Hi All,

Apologies if this is a very noob question. I'm looking for information on what to do when my game closes. I understand that I need to  free up memory that is being used my my game ie. memory for images, sounds etc... How would I go about this? I've searched documentation looking for keywords needed but am not having much success. Should I free memory held by arrays, floats integers etc or just memory used by resources? Do you guys know of any good tutorials/articles that would teach me about memory management in C++? I'm just so used to C# and Java taking care of this for me, this sort of thing is kind of new to me. Any help would be appreciated.

Cheers.

Kid.

9
General discussions / Thanks
« on: November 01, 2010, 12:57:05 am »
Hi,

Not sure where to post this. I just want to say thanks to the SFML team for such great work.

Kid.

Pages: [1]
anything