🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Off to the Races!!! :D

posted in Septopus for project Unsettled World
Published December 19, 2018
Advertisement

So, this is the post as it was started, at about 2am last night:

Quote

 

I love days where most of the code I work on is unattached to online APIs. :D  Been coding for 10+ hours and I've only done a WebGL build twice now.  And that might be it. ;)

We finally have NPCs that you can race against on the courses, and we have Gold, Silver, and Bronze rewards. 

You can also use your airBoost Fuel during races, I'm thinking about implementing a toggle of some sort or something so you can turn off the auto fire to save fuel...  But the races are pretty fun now and I've only spent a day tuning the logic.  Once I get some more time to work on the details(like when you can and can't use airBoost Fuel), it will be super cool.  With the optimizations and code improvements for the racing NPCs, the Rabbit has also improved in its behaviors, so it should be a little more interesting too.

 

And then I discovered that I introduced an ugly bug somewhere in v0.2.1 or v0.2.2 that was causing a game crash with web console outputting an error resembling "index out of range", you know when you try to access an array element that doesn't exist/etc..

It turns out that somehow in the compilation magics that happen between Unity Editor and WebGL "GameObjects" become array members and when you swap out one type of game object type for another( in my case a normal Text object for a TextMeshPro text object) and you DON'T update the changes in the code/inspector for the code, your WebGL error messages will send you in a wild goose chase for an array that doesn't even exist in your code.  haha.. ffasdjfaswejmafmsdl!!

I had to sleep on this build for that reason.

But it's here now and I think everything actually works!!  That means RACING!! There's still lots of work to do on the races, currently there are no point calculations being done, and this will add a lot.  Plus in-race items/boosts that I want to add as well.  I've also got some optimization to do, this build brings some significantly lowered FPS..  I'm afraid it might have something to do with all the fancy meshy text objects...  I may need to rethink that one. ;)

Anyhow: v0.2.3: https://www.kongregate.com/games/WilliamOlyOlson/slingbot-boarding

offtotheraces.thumb.png.06d6171e71c03d9babb192b0c81a2bd7.png

 

1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement