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

Pages: [1]
1
SFML projects / Re: Dwell - A Retro Sandbox Survival MMO
« on: September 21, 2014, 04:27:55 pm »
Great title too btw, "Dwell" is a perfect name for it.

2
SFML projects / Re: Dwell - A Retro Sandbox Survival MMO
« on: September 21, 2014, 04:27:34 pm »
This looks like one of the best / coolest / most fun games on this whole forum.

I rarely get excited for games, but this looks really cool.
Even rarer, I usually dislike this style of art, but yours looks amazing and makes me want to play.

GREAT JOB!

When does it release? :P

3
Window / Re: Function similar to SDL_SetClipRect ?
« on: May 25, 2013, 12:50:37 pm »
Well, it is good to know it is Issue #1   8)

4
Try separating the animation choice from the actual input. A possible way to do this is by choosing the animation based on the delta movement from the previous frame(or maybe a fractional second ago).

This way you should still trigger the correct animation even if you move perfectly horizontal or vertical for a single frame.

Thank you! I am pretty sure this is exactly how I did it before.

It doesn't lag universal input, which is very important to me. The last thing I want is putting a delay in processing inputs.

For how my brain works, the delta works as a medium between the input and the actual movement.
I believe it was a long time ago in a game engine, where I solved the same problem using this solution. I had forgot how, until your post refreshed my memory.

Thank you again :)

5
Window / Function similar to SDL_SetClipRect ?
« on: April 25, 2013, 01:37:09 pm »
With SDL, it was very simple to make the gameplay window smaller than the actual window itself. The result would be a black border (my cleared/fill color) around the actual rendered window.

It was as simple as typing,

SDL_SetClipRect(_mainWindow, g_ClipRect);

With g_ClipRect being a Rect(x,y,w,h). Sortof like a window within a window.

I was curious as to whether or not SFML has a similar function?

6
I have googled and search these forums for a solution for 30 minutes and can't seem to find anything. It's not a simple google search given the lack of definitions for the problem.

The player moves in 8 directions, using either the NumPad or ArrowKeys/WASD. The NumPad has no problems given its 8 directions are all separate keys. However, arrow keys and WASD require 2 keys down to move diagonally.

if( (sf::Keyboard::isKeyPressed(sf::Keyboard::Down)) && (sf::Keyboard::isKeyPressed(sf::Keyboard::Right) )
    {
~walk walk walk~
    }


Everything works fine, until I want to STOP MOVEMENT while facing a diagonal direction. Input is detected so quickly, that 9 times out of 10 you will end up facing N, E, S, W- because even a faster user cannot release both keys at the exact same time. One key is always released after the other.

I've read a little bit about ONE possible solution: Taking out the logic in the keyboard if's, and replace it with a variable.

I am new to SFML, so I am not sure this is the best way to handle this. I would prefer not to slow down detection of input either, or make overcomplicated code if there is an easier way to fix this.


Thank you- I am sure any help to solve this will help me save hours of time trying to solve it or research the deepest depths of google to find the logic behind this instead of diagonal speed (sin / cos).  The engineering is pretty simple if I remember correctly, which is why I ask for a solution. I actually remember long ago kind of how I handled it in a different framework, but I do not remember enough to get it done quickly.

Pages: [1]
anything