🎉 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!

All the Optimize! SlingBot Boarding v0.2.5

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

Well, maybe not ALL, but all I can fit into one of my days. ;)

UI sprites packed into an atlas, all other materials/textures are correctly instancing and taking up as few draw calls as I can manage, it floats around 15-30 per frame, at the moment, depending on activity.

My build size has doubled though because I'm essentially using two copies of the ground terrain mesh.  It's a shortcut on the way to getting better performance... hahaha

First, I exported the Unity Terrain to .obj using this handy script: http://wiki.unity3d.com/index.php/TerrainObjExporter

(it's 10000x10000 units/meters) Then I took it into Blender where I, by hand(box select) cut it up into 110 pieces, so now I can assist with the culling with some simple distance calculations.

The reason for the doubling of the mesh is because I'm currently using 1 copy of the full terrain mesh for the ground collider, and the other mesh(s) for rendering the visible texture/geometry.

This is all so the player doesn't spin out unexpectedly on a seam..  Which it did, readily..  This is also a hack I'm employing on my main project until I code a better way.

I may try to merge the meshes together at run-time instead, but that might have to be a later update.

I remodeled the board itself, so you may find it catches here or there a little(lot) differently than it did before, had to get it down to a reasonable number of vertexes for instancing.  And I think it almost adds a touch of chaos which is nice.  You sometimes find yourself spinning when you didn't intend to, but it's reasonable and possibly more correct, for the physics anyhow.

What else...  Just lots of texture shuffling, switching out shaders to the mobile versions and adjusting lighting settings until they are tolerable.

I converted ALL the text objects to TextMeshPro(just a free version) components as they manage to instance better than the default text objects do.

I made sure to replace all the Unity default sprite objects I could find(Background,Knob,etc..) as those can't get packed into an atlas, at least I don't know how to get them there...  They cause all kinds of draw calls on their own.  Just a few simple images.

Nearly EVERY quality setting in Unity has been set to the lowest it goes.

So...  Does it run any better?  v0.2.5: https://www.kongregate.com/games/WilliamOlyOlson/slingbot-boarding

I'm not entirely sure at this point, but I want to say yes... haha.

And here's 3am again.. ;) Enjoy.

1 likes 0 comments

Comments

Septopus

v0.2.7 out now, I fixed the colliders up a bit more, now using a mesh collider on the board for the way it moves across the ground as well as a capsule collider to keep it from getting stuck in things and spinning out extra-unreasonably. ;)  Most of the builds prior to 0.2.5 I was using two capsule colliders to keep the board level and out of trouble.  That seemed to contribute to some weirdness in collisions between player and NPC, something I still need to work on.  A few other mesh/lighting tweaks/optimizations as well.  Getting well into the 120fps range in the editor now. :D

Also, the NPCs in this build are actually steering a few degrees at a time now instead of instantly rotating, which was causing a lot of bad looking behaviors.  I still need to tweak it a bit because now they get lost/stuck on race courses a lot easier, so I need to put in some exceptions to the new rules here or there... anyhow.. back to it.

Enjoy!

 

December 22, 2018 05:37 AM
Awoken

That is great!  I played it and it's so nice to be able to just snowboard where ever I wanted.  The sound effects are a nice touch too.  In your previous post I read you had a 10+ hour day of programming.  Nicely done.  It's been awhile since I've been really in the zone like that.

Are you going to focus mainly on the racing aspect?

And...

Are people able to play together on the same terrain and see each-other?

December 22, 2018 09:26 PM
Septopus
44 minutes ago, Awoken said:

That is great!  I played it and it's so nice to be able to just snowboard where ever I wanted.

Sweet, I was hoping somebody else would enjoy that part as much as I do. ;)

44 minutes ago, Awoken said:

  The sound effects are a nice touch too.  In your previous post I read you had a 10+ hour day of programming.  Nicely done.  It's been awhile since I've been really in the zone like that.

Several actually, that's my thing these days, trying to make a go of becoming an actual Independent.. haha :D

44 minutes ago, Awoken said:

Are you going to focus mainly on the racing aspect?

Well, that's a darn good question..  This was intended to be a 25 day project, just to grease some of my wheels a bit and to "complete" something.  But the more I get into it, the less I want to call it done.  So for the next couple of days I'm focusing on making it something of a "complete" game, so some more work on racing and things like that, probably a bit more UI stuff and I might create some kind of player "leveling" system too..  Just to make something of the 25 day goal for a complete game I set myself.  After that it I want to do something for the dungeon crawler contest as that's what my intro area for the main project will be.  So I'm going to have to figure out some working priorities here soon.  Right now this is the closest I've gotten to a "product" and I want to keep the momentum up on it.  I think it could be pretty darn fun on a console too, so I might explore Xbox here soon, since it's pretty easy to develop for(logistically).

44 minutes ago, Awoken said:

And...

Are people able to play together on the same terrain and see each-other?

Not yet, but as you can see I've done a lot of work with recording and replay, which is my form of precursor to multi-player online. ;)  I have considered doing something like most mobile racing games do and just use recordings of other players on race courses to generate the competition, but I think that would take about the same amount of work as multi-player(considering I already have working net/server code I can use) and I would want to control the server side fully for that as well.

I'm still working on getting my own servers online so that side of things will need to wait 'til then.

 

December 22, 2018 10:27 PM
Awoken

Nicely done, incredible progress.  I'm excited to see you ideas for the dungeon crawler.  I think it's great that everyone will have two months on it.  Gives people time to collect and focus.  I won't be participating though, I have to focus what time and energy I do have these days on my main project.

2 hours ago, Septopus said:

Several actually, that's my thing these days, trying to make a go of becoming an actual Independent.. haha :D

What angle are you thinking of taking, better yet what's your strategy?  That's great that you've managed to do so much programming.

I especially like that your games are playable on the internet.  Makes playing them a breeze. 

December 23, 2018 01:19 AM
Septopus

Thanks, yeah the rapid progress is mostly due to the fact that I've had to do very little as far as assets go. ;)  99% code with this one, very few hours spent pondering the next move in Blender.  haha!

Quote

I won't be participating though, I have to focus what time and energy I do have these days on my main project.

Good to hear, I'm excited to see more from that!! :D

Quote

What angle are you thinking of taking, better yet what's your strategy?

I'm a brute force kind of guy, so I'm mostly trying to focus on the meat and potatoes of building fun games.  I'm fairly independent in all other ways already, so I've got just a very few chosen distractions.  I have a good friend who has some experience in management, spent some time as my boss actually, I'm waiting on him to finish his holiday seasonal sprints and then we're going to collaborate on the business side of things.

Quote

I especially like that your games are playable on the internet.  Makes playing them a breeze. 

The trade off comes in debugging builds...  Especially since I'm relying on 3rd party servers/API(s) at the moment.  WebGL builds take their sweet time to compile, and then you're dealing with error messages generated by another language with at least 2 or 3 degrees of translation between it and your actual code.  I put in c# and I get JavaScript error messages..  lol..   But I will happily keep going this route as long as I can squeeze the performance I need out of it.  Like you say, makes "deployment" a non-issue.

December 23, 2018 01:46 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement