Monday, September 24, 2018

Back to Work!


A moment of motivation smacked me in the head recently, so I decided to grab hold of it & finally get around to implementing the 'turbulence' system in Urban Tumbleweed that I'd mentioned awhile back!
Basically, one of the major missing things that was still missing from my desired 'feel' for the game was, well, actual 'wind'- randomly blowing around, occasionally changing direction & the like. Of course, not only does it look great, but it makes for interesting gameplay too- you might get unlucky & have a random gust blow you into the side of a billboard, or you could get lucky & hitch a free ride on a perfectly-angled breeze!

Perhaps the easiest way to explain it would be a direct demonstration:


(Check it out, no more horrible .gifs, I've finally upgraded to video-recording technology! ...and apparently twitter doesn't support videos. Eh well.)

If you watch the makeshift 'wind indicator' in the top-left, you can see what's going on a bit easier. The wind slowly varies in both strength & direction, and has two 'states' that can also occur which will radically affect it for a short time- gusts or direction changes.

I made the wind strength more likely to pick up if it's low, and more likely to calm down if it's strong- leaving it all up to random chance didn't make it very fun in practice. The direction, however, is all up to random chance- so on average, it should tend to not change overall by too much.

On top of this random 'noise', there's a small chance each tick that the turbulence enters one of the two aforementioned states- 'gust' or 'direction change':
A 'gust' causes the wind speed to spike for a brief (random-length) moment, before dropping back down again (and the dot in the wind indicator turns red to represent this).
A 'direction change' causes the wind to rapidly change bearing toward a new (slightly random) direction (& the wind indicator dot turns cyan).

As with everything still being worked on, more tweaking is needed to get all the lengths & strengths feeling 'right'. The demonstration above is really not an 'average' situation, by the way- the game's not actually that slow now, I was just lucky enough to have the wind rotate upwards & then increase in strength consistently enough to hover me in place (and I just thought it looked pretty neat).
Any rate, it's definitely feeling a lot more interesting now, if I do say so myself!

(Oh, and I also actually implemented a proper high-score system that'll actually save the data, encrypted, to a local file, regardless of device... but y'know, that's not quite as interesting to show off :P)

~~~

Originally, when I was first imagining how this game would look, I'd wanted to get some really detailed animations going to make the bag really look like it's dancing around in the wind. I've since come to realize that- without having the budget to hire a professional designer- I've really gotta just play to my strengths; those being mathematics & physics, apparently.
It is actually coming out better than I anticipated without having an animated sprite, so it's probably a better idea to focus on simplicity in design anyway- especially if I want to see this released before it gets abandoned!

- Lig

No comments:

Post a Comment