
Tuesday, 13 January 2015
Event Horizon released

Friday, 9 January 2015
Animated shaders!
I should probably link these because they're bigger than most of my gifs but-
Colour swirl
Weird windmill
I find this stuff such fun to play with. I can't wait to find a good use for it. I wondered how easy it was to do the teleport/menu effect in teleglitch but I reckon I could do it pretty easily!
I spent a few more hours doing Project Euler stuff and finally finished Problem 60. It seems like a lot of people gave up on that one. I'm still planning on getting to 100 but my progress has slowed down a lot so I think it'll take me a long time.
Colour swirl
Weird windmill
I find this stuff such fun to play with. I can't wait to find a good use for it. I wondered how easy it was to do the teleport/menu effect in teleglitch but I reckon I could do it pretty easily!
I spent a few more hours doing Project Euler stuff and finally finished Problem 60. It seems like a lot of people gave up on that one. I'm still planning on getting to 100 but my progress has slowed down a lot so I think it'll take me a long time.
Monday, 5 January 2015
Shaders!
Fishies!
I wanted to see if I could simulate school-of-fish type behavior with each fishblob deciding for itself where to go. I think I got something looking ok! They're supposed to stick together and try to stay in the lighter areas. It's so nice to work on something proper rather than weird bugs that took ages to fix and didn't seem to be caused by my code.
Sunday, 4 January 2015
Still broken
The fix to the stutter wasn't quite as good as I had hoped. I've spent days staring at moving lines and I need to try something else. My current conclusion is that the stutter is a universal problem with windowed stuff but is only really noticeable in cases like this. Gotta take some time off lines moving across the screen so I'm going to try to make a little thing I've had in my head for a few months. It's about fish!
Tuesday, 30 December 2014
Stutter and Frame-rate
I've spent a while working on annoying bugs so I thought I'd write about one of them.
I'm making a game currently titled "The Button" where you work on a call-in radio station censoring swear words spoken by callers. I'm using LibGDX for it and I thought it would be a perfect game for Android/iOS due to the simple controls.
When you play the game, you see the waveform representing the spoken audio, in the game it runs super-smooth except for every 8 seconds or so it judders back and forth for about 500ms. I thought it was something wrong with my waveform display or some stupid mistake I'd make in the game so I spent a few hours trying to fix it to no avail.
I eventually decided to simplify it and make a nice new simple project with just random lines moving across the screen. Try for yourself (simple source code). The stutter is still present. You might have to watch it for a few seconds to see it.
I played around with fixing the frame-rate, enabling v-sync, leaving the frame-rate uncapped and each time the stutter remained. It almost felt like there was a big garbage-collect slowing things down but nothing was being created each frame. With the frame-rate uncapped it ran at >2000 fps so it's definitely not my computer struggling to keep up. Floats can be weird sometimes so I switched to long milliseconds but that made no difference (clutching at straws there!).
After another few hours of messing about I decided to try another library, just to see if the stutter still happened. Love2D is one of my favourites due to how quick it is to get started so I mocked up the same code in there (look how tiny it is!) and to my surprise, the stutter was still present! At this point I was staring at my code, sure that I'd made a stupid mistake somewhere but I couldn't see it.
I started to talk to my friend at this point and we did some tests. If you fix the frame-rate at 60, ignore the delta time and just increment the index by 1 each time, it looks better. Unfortunately I can't use this method in the game because the 60 fps is an ideal target not an enforced limit so the audio would get out-of-sync with the graphics. So it must be something to do with delta time. We tried a lot of different things and managed to work out that the index was incrementing by 0 and 2 in rapid succession on the stuttering frames. It would increment by 0, 1, 1, 1, 2, 1, 0 ,1, 1 ,2 etc. on consecutive frames after a long period of non-stuttering frames (incrementing by 1 each time).
So I'm not exactly sure what causes the stutter to happen in waves but the stutter seems to be caused by frames not happening exactly before each time the screen refreshes. So frame 1 would cause the indexer to increment by 0.999 and this would not be enough to move the lines and frame 2 would increment indexer by 1.031 and this would cause them to jump by 2 pixels, causing the stuttery increments.
I've edited the update to be like this and it's a lot better. It's still not 100% smooth but it doesn't have the horrible jarring stutters of the first one. I might have missed something super obvious so please let me know if you notice anything or have any ideas.
I'm making a game currently titled "The Button" where you work on a call-in radio station censoring swear words spoken by callers. I'm using LibGDX for it and I thought it would be a perfect game for Android/iOS due to the simple controls.
I eventually decided to simplify it and make a nice new simple project with just random lines moving across the screen. Try for yourself (simple source code). The stutter is still present. You might have to watch it for a few seconds to see it.
I played around with fixing the frame-rate, enabling v-sync, leaving the frame-rate uncapped and each time the stutter remained. It almost felt like there was a big garbage-collect slowing things down but nothing was being created each frame. With the frame-rate uncapped it ran at >2000 fps so it's definitely not my computer struggling to keep up. Floats can be weird sometimes so I switched to long milliseconds but that made no difference (clutching at straws there!).
After another few hours of messing about I decided to try another library, just to see if the stutter still happened. Love2D is one of my favourites due to how quick it is to get started so I mocked up the same code in there (look how tiny it is!) and to my surprise, the stutter was still present! At this point I was staring at my code, sure that I'd made a stupid mistake somewhere but I couldn't see it.
I started to talk to my friend at this point and we did some tests. If you fix the frame-rate at 60, ignore the delta time and just increment the index by 1 each time, it looks better. Unfortunately I can't use this method in the game because the 60 fps is an ideal target not an enforced limit so the audio would get out-of-sync with the graphics. So it must be something to do with delta time. We tried a lot of different things and managed to work out that the index was incrementing by 0 and 2 in rapid succession on the stuttering frames. It would increment by 0, 1, 1, 1, 2, 1, 0 ,1, 1 ,2 etc. on consecutive frames after a long period of non-stuttering frames (incrementing by 1 each time).
So I'm not exactly sure what causes the stutter to happen in waves but the stutter seems to be caused by frames not happening exactly before each time the screen refreshes. So frame 1 would cause the indexer to increment by 0.999 and this would not be enough to move the lines and frame 2 would increment indexer by 1.031 and this would cause them to jump by 2 pixels, causing the stuttery increments.
I've edited the update to be like this and it's a lot better. It's still not 100% smooth but it doesn't have the horrible jarring stutters of the first one. I might have missed something super obvious so please let me know if you notice anything or have any ideas.
Friday, 12 December 2014
New projects
I've done a few tests with the map overworld mode and it turns out it's just not as fun as the arena mode. This is a shame because I had big ideas for this but there's no point continuing working on a game that won't be fun! I learnt a whole ton making this project and I think arena mode is fun in its own right. I was getting slow at working on it, maybe because I was realising it was going nowhere but luckily this leaves me free to work on other stuff now!
I have a couple of projects I want to work on-
I have a couple of projects I want to work on-
- Another space game with a friend of mine. This one is going to be a bit crazy- I'll start posting about this soon.
- A silly little mobile game I've been thinking about. Audio-focused, I've got a rad voice-artist dude I'll be working with I hope!
For now I want to try to learn more about creating files in code and how sound words so I'm going to try making some .wav files of my own.
Subscribe to:
Posts (Atom)