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

Pages: 1 ... 10 11 [12] 13 14 ... 34
166
General / Re: Just started, but can't start
« on: April 20, 2019, 09:47:04 am »
A couple of things - you don't want sfml-window.lib AND sfml-window-s.lib The -s files are only used for static linking and you'll never need both versions in a project. Look at the function names in the error, for example sf::CircleShape. The docs will tell you which sfml module this is in (in this case sfml-graphics so you need to link that). Oh, and also remember to use the -d versions when linking the debug build :) HTH

167
Hehe, well done! Yes you can get better than optimum on quite a few lawns, which is why there's an achievement for it ;) The Braved the Weather one is a bug however, but I've fixed it so the patch will hopefully be out tomorrow. Thanks for playing! :D

168
Thanks! :D

169
SFML projects / Re: Mow Problem! - Puzzle Programming Game
« on: April 12, 2019, 09:20:18 pm »
The game is released! You can get it on Steam for macOS and Windows here (currently with a 15% launch discount)

https://store.steampowered.com/app/1037140/Mow_Problem/

Oh, and it also works on Proton for linux users  ;D


170
General / Re: sf::CircleShape getPosition() returns big number
« on: April 02, 2019, 07:22:59 pm »
If circles.size() is ever 0 or 1 then subtracting 2 from it is going to cause the value to wrap around (size_t is an unsigned value) and you'll index your vector with a very large number. This means you'll be effectively trying to read some random memory which is most likely why the position has an apparently odd value stored in it.

171
There's a few things you could do to try narrowing down the culprit. After all it could be something such as bad drivers (Intel GPUs are notorious for bad OpenGL support)

  • Try updating your graphics card drivers if possible :)
  • Try your executable on someone else's machine - preferably with both a similar and different manufacturer GPU. If it doesn't flicker you've at least narrowed it down to your machine. Otherwise it's probably code related
  • If you don't have access to another machine try building the demo from my repository. I've never seen problems with it so if you do get flickering, again it points to potentially hardware/GPU drivers
  • Try a GPU profiler such as nsight, CodeXL or GPU PerfStudio. They might be able to shed some light on what's going on under the hood.
  • Clean and rebuild your dev environment. Yes it's a chore, but sometimes headers from older versions of libraries can stick around and cause obscure bugs. Make sure all the libs you use, such as SFML are up to date, preferably building from source

Also don't let it get to you too much - I've had many frustrating bugs in the past, but I find that if it's something which doesn't break the actual gameplay then carry on regardless. You can always come back to a problem, and working on something else might even reveal an inadvertant solution :)

172
It's certainly possible to draw a loading screen in a new thread while loading resources in the main thread. I do it like this:

https://github.com/fallahn/xygine/blob/master/xyginext/src/core/State.cpp#L90

and launch it like this:

https://github.com/fallahn/xygine/blob/master/Demo/src/MenuState.cpp#L99

The resources used to draw the loading screen obviously have to already be loaded of course, and are loaded in the main thread. You can probably get away with doing this once when the game first starts. Bear in mind you can't process events in the new thread because, as far as I remember, events have to be processed by the thread which creates the window. HTH

173
SFML projects / Re: Mow Problem! - Puzzle Programming Game
« on: March 06, 2019, 08:10:44 pm »
Thank you! :D

Currently working on some unlockable 'mutators'... some are just cosmetic, others change how the game is played


174
I started this project as something to do over the Christmas holidays - only to have it turn into a full game :)

The idea is to use a block programming interface to create a 'program' which guides the automated lawn mowers around the garden. Clear the entire lawn in as few moves possible, eventually unlocking the lawn editor, a mutator mode - and maybe even find an easter egg hidden away ;) Features achievements and high score tables provided by Steam, and available for Windows and macOS



Thank you to all the SFML community who have helped make the library such fun to use over the years :D

Steam store page
DRM-free itch.io version
Twitter
xygine github (engine the game uses)

175
General / Re: opengl what to use instead of glbindbuffer
« on: February 23, 2019, 12:05:41 pm »
<SFML/OpenGL.hpp> will only give you the most basic OpenGL functions (version 1.0 I think). If you want to use any kind of modern OpenGL you'll need to load the correct functions via something like Glad, which you can find here: https://github.com/Dav1dde/glad or glLoadGen: https://bitbucket.org/alfonse/glloadgen/wiki/Home

176
Graphics / Re: How to draw Texture with black and white colors?
« on: February 22, 2019, 11:02:39 am »
It's entirely possible with shaders, where you can control the output of individual channels or desaturate the image entirely, and do it dynamically at runtime. A crude example would be to sum the rgb values and divide them by 3, although there are many more accurate methods of doing this. Google is you friend here! :)

177
You can set the blend mode to sf::BlendAdd when rendering in SFML, or, as the example I linked shows, use a shader which adds the values together:

https://github.com/SFML/SFML-Game-Development-Book/blob/master/08_Graphics/Media/Shaders/Add.frag

I highly recommend getting a copy of the book if you can, don't let the fact that it's a few years old put you off - the contents are still very relevant :D

178
There's a good example of this in the SFML Game Development book, the source of which can be found here. The main difference that I can see is that the luminescence values extracted in book example don't have a transparent background, rather they remain black. This is because when the blurred image is reapplied it is done additively, not by multiplying. The black pixels are effectively 0, so adding 0 the original image has the same result as if the dark pixels were transparent.

179
General / Re: procedural map filling
« on: October 21, 2018, 09:59:33 pm »
If you can bear to read it all I wrote a few posts a while back on creating an 'infinte' procedurally generated map. The first part is here.

180
Graphics / Re: A question about VertexBuffer::update
« on: October 08, 2018, 12:11:19 am »
update() calls glBufferSubData() immediately, which submits the data to your graphics card there and then - although whether it's batched with other calls or copied right away is down to your graphics card driver.

Pages: 1 ... 10 11 [12] 13 14 ... 34
anything