Day 5


Some tiles didn't look right to me so I broke out GIMP and fixed them.  I added code to accept input from the keyboard.  It's the standard roguish h,j,k,l (and y,u,b,n for the diagonals) as well as the arrow keys (and page up, page down home, and end) for movement.  Normally I use Q for quit but it was not easy to get SFML to recognize shifted keys so I gave up and changed it to escape.  I then implemented the functions behind these keys.

So after all that, I prepared to be able to move my player around the screen but something was wrong.  The screen was flickering as if being repeatedly redrawn and pressing a movement key was sending the player shooting across the screen. It turns out I had been using SFMLs blocking pollEvent() function in the input phase of my game loop so it was in fact constantly updating. Changing to waitEvent() which blocks fixed that.

Get The Untitled Action Tolkien Show

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.