Followers 0
• entries
17
38
• views
21709

Video and a GiF

Last time someone asked for video/screenshots, so decided to try some image recording and uploading to youtube. Hadn't done the youtube thing before, but was fairly straightforward. Time to see if GameDev embeds video or not:

Also, here's a gif:

I've done gifs before, I don't think this game shows quite as well as my turn based tank game does, though here's one with an image shader

And as before:
[color=rgb(40,40,40)][font=arial]

Available for Android and WebGL:

[/font][/color]
[color=rgb(40,40,40)][font=arial]

Android:

[color=rgb(40,40,40)][font=arial]

Web:

[/font][/color]http://joshv.itburns.net/RollingWebGL/

Still puttering away

So I still poke at my games, I just forget to post here =)

Lets see if I can sum up all the things added since last time:

Water
Meteors
Swinging Wrecking Balls
Magnets Overheat, top and bottom magnets as well.
Better tutorial message improvements
Level change message
Some image shader effects for entering the goal, and on death
The goal sucks you in now
Bowling balls

And some minor bug fixes.

Available for Android and WebGL:
Web: http://joshv.itburns.net/RollingWebGL/

Integrating Google Play: An Early Open Alpha

[color=rgb(0,0,0)][font=Helvetica]

[background=rgb(252,252,255)]This is my first time playing with Google Play Services integration with Unity. It's pretty early Alpha, but should still be fun to play, and I've got an integrated google leaderboard that I'd like to test out. I look forward to seeing your high scores on the leaderboard![/background]

[/font][/color]

[color=rgb(0,0,0)][font=Helvetica]

[/font][/color]

[color=rgb(0,0,0)][font=Helvetica]

[background=rgb(252,252,255)](I should also get off my butt and try iOS, everything should work, just need to test it)[/background]

[/font][/color]

[color=rgb(0,0,0)][font=Helvetica]

[background=rgb(252,252,255)]It took a bit more work than intended, the plugin has lots of steps, and there was some mystery compiler errors along the way that had to be deciphered.[/background]

[/font][/color]

I need to fix the audio, (including the audio options menu), add a way to view the global high scores without dying first, tweak more sounds. I think I want to remove the rocket turret, though if I could make some art for it instead of the placeholder rocket it might work better. And bugs of abound, of course.

Turn based Tanks, an update

So with limited time, I decided to laser focus on just one thing, and that was optimizing my radial pathfinding. Honestly, probably didn't need to be the focus, but when you don't have a boss, or a time frame, might as well follow your passions.

So, first thing of course, was to profile things. Which is relatively easy to do in Unity, though their profiler's UI is really awful, after going about 10 calls deep, it starts to choke. And this is 100% the ui, not the recording, as it's while digging into an already recorded trace while the game is not running. I even ended up moving some of my code around to avoid the problem, which is sad.

Anyway, some easy fixes stood out. For checking a dubin's curve, which consisted of a start arc, a line and an end arc, I was checking in that order to determine whether they crossed any tiles. And well, arcs are more expensive to check than lines, and if one is blocked anywhere, the path is invalid, so I swapped my if to check the line first. I also noticed that there was a lot of memory allocations happening, and moved many of my smaller classes that were mostly data to structs. That had a consequence though, structs of structs in the crappy version of mono that Unity uses (seriously Unity, why don't you update, I also would like to use C# 6.0 features), cause a str.memcpy to show up in the profiler every time there is a copy. Now it might just be an artifact, as it's not showing up as taking a large percentage of time, just annoying that it's showing up at all.

Also, to improve memory, I moved to pooling my visited nodes. I also decided to dig into the priority queue I was using. It's Blue Raja's Queue. Which is mostly good, it just has a lot of features that I don't really need. For example, each queue node has a double priority, a long for 'InsertionIndex' and an int for the QueueIndex. The InsertionIndex is to prevent ties. You're supposed to then inherit from his structure and have your own data for the visited node.

I simplified that down to a float Priority and a unsigned int for the QueueIndex, and an int for an index into my visited node pool instead of inheriting. For tie breakers, since I always start at 0 in the node pool, I multiply my priority value by 10.0f and add nodeIndex/NodePoolSize. It's crude, and if my floats got big enough, could possibly run into issues, but that's unlikely considering the size of my navgrid. So my PriorityQueueNodes are more compact and take less comparisons when doing cascades up/down:return (higher.Priority < lower.Priority || (higher.Priority == lower.Priority && higher.InsertionIndex < lower.InsertionIndex));Mine is:return higher.Priority < lower.Priority
I also moved away from an array of Nodes, which contained all sorts of data about them, to simple boolean array of Open/Closed nodes. Eventually I may need to change that to something more complex, to more accurately reflect nodes that cost different amounts to move through, and to take account of different costs between Node0 To Node1 and Node1 to Node0. (aka, not just nodes, but edges) but for now, what I have is good enough. I also trimmed out unnecessary data, ie, don't keep the index of the node in the array, that's just wasteful, I also dropped keeping the position coordinate, and calculate it every time I need it, as it's relatively cheap to calculate on a uniform grid.

Anyway, so on a Deep Profile, which is really slow, I am able to pathfind across my map in about 300-400 ms in the Editor. Considering I started around 1200-1400 ms, that's a pretty decent improvement. And outside of the editor, a windows 64 bit executable is screaming fast to calculate. WebGL is still slow, I'm guessing the conversion isn't as good, and there are other oddities as well, like my camera controls don't work the same.

I'm tempted to try it as a C++ DLL and see if I get any further improvements. There would be some small benefits to doing so, and the managed to unmanaged barrier would be minimal, since it's only at the start of the pathfind.

Long time no post

I got sidetracked by life for a while. Then I tried to integrate google play services for the leaderboard and somehow broke my Unity project. (Fun times) That kind of killed my drive. That and adding sounds, I found to be mind numbing. I don't like the sounds I have now, I find the saw noise to be too grating on the ears.

http://joshv.itburns.net/RollingWebGL/
I have an APK if anyone wants to try it on their android phone.

I also got sidetracked trying to optimize my radial pathfinder, I'll post about that in a separate thread/article/post/entry/whatever.

I should show my progress

Okay, it's been a bit, I've been having a devil of a time getting a long enough block of time to both code some stuff, and update my journal. So I've been usually defaulting to just coding =)

I still need to do a tutorial / control explanation, a web based high score table, sounds, a credits page, and probably should get some real graphics, those you see are all free from the asset store. I need to double check the license on the font, I may need to swap to something else. The turrets are also a little buggy, and I want to delineate the obstacles (easy, medium, hard) so they come in a little more gradually. (There is code in there that every 5 levels, it spawns all the same type of obstacle)

I also should try making an iOS build, the Android one runs great.

Controls:
Swipe / LMB + drag to create roads, coins add score + time, get to the swirly vortex to get to the next level.

The GameObject Pooler

So another fellow was doing a journal and was a little nervous about posting code for review. It got me thinking that I should post some code up as well. (I do have a game update that I could do as well, but I'll save that for later)

Going Mobile

Oh, updated the webgl one, that link is here: Seems to work in Chrome now, yay. But oddly, it errored for me in FireFox at first.

So lets see, since last time, I have:

tweaked some physics
drastically reduced the time to remove a swiped brick that is touching the player, color them based on the time left, and have it fall instead of just disappear.
Added a cheesy spark effect. (not sure what I'll do with that one yet)
Added a +X to show the amount of score/time that is received from a coin. (it combos, +1 for the first +2 for the second, +3 and so on)

And I've built a win10 version, and tried it out on my win 10 phones. So far, so good. Though the high DPI on the Lumia made realize that I needed to tweak my Canvas settings, as all my text shrank down to really squinty levels. I was happy with the performance, super smooth on the Lumia 950, though that thing is a rather beefy phone, so I would have been disappointed if it ran poorly. I need to test on an android, I'm downloading the SDK right now, and we'll see how it does on my less high powered slate.

I want to look into doing Unity Ads. I'm thinking of a scheme where the player gets an additional 15 seconds to their timer if they watch a 15 second video. Which they can do once per game attempt. It was either that or something like let them unlock another player sprite, with different physics properties, but then I have to add a bunch of things to unlock. I'm a little bummed that Unity Ads aren't supported on Win 10 though. I may have to look into doing Banner Ads or something with the UWP SDK stuff

I also want to do a server side high score -- I started looking into it, but all the various editors I found for creating an SQL table crashed on install...not sure what that's about, I know my machine is a little wonky, so I may have to do something drastic like upgrade to win 10.

And I should do a tutorial like level, something with some text explaining swiping to create, and some text about coins.

I also really need to look into finding an artist or paying for some assets, or going the glowy route.

Okay, so its been a while...

Okay, so I fell off the coding wagon, and found it a bit intimidating to jump back to the big TBS game. I decided I'd ease myself into it by playing around with a quickie simple game, and learn more about the process of putting it up on an app store. (Of various flavors, I might try the Win 10 store first, I dunno)

Anyway, so without further ado, here's the prototype of RollingSwipe

Firefox/WebGL link. EDIT: Also works in Edge, whaddya now, though I didn't see any UI.

Old school webplayer, best with IE: Link

A quick how to play, since I haven't put that in there yet:
Goal is to get the tire into the center of the vortex, you can do that by swiping to create ramps for it.

The coins give both score and time. When time runs out it's game over. Falling off the world respawns you at the beginning, but otherwise is no penalty.

PS. Slightly annoyed that Unity can't manage to make a WebGL exporter that works on anything other than FireFox. But then again my project might be screwed up somehow? I noticed early that I was getting a bunch of crashes outside the editor because none of my UI canvas elements had a default material. Not sure if that's something to do with setting myself up as a 2d project or what.

TODOs: Need sounds, some fancier graphics, some animated text increases, some better coin pickups, and more obstacle types.

I'm pretty happy with my GameObject pooler, I started out looking at a free one online, quickly realized it was terrible, and completely rewrote it. But it's nice in that beyond the start, there are no game objects being instantiated (unless starting pool sizes are exceeded), and everything is being recycled.

Low hanging fruit

I updated the web player here, though Chrome I think disables plugins always now (works in IE, dunno about FireFox or Edge). But the last time I tried the webgl exporter, things were kind of funky and off. I'm not shooting to make my game as a web game anyway, but it is nice for showing other people my work. Though there's always youtube and Gifs.

So this time around, I decided to do some small stuff. I implemented clamping of the pitch of the gun, changed the gun to move towards the players targeting cursor at it's own rate, instead of just setting it to the cursor, did some smoothing on zoom / FOV, and futzed with some of the internal colliders, though I still need to go in and add the rest. Not sure how best to represent the turret ring, I'll probably have to make a set of small box colliders in a ring shape.

I need to do a cleanup pass at some point, there's some dead code, and some messy code.

Protip of the day:
Paste as New context menu from the component view....yeah, don't try to do that if the thing your pasting has a component requirement that isn't met. Crashes Unity. I filed a bug, though I'm guessing it's a known issue, seems like it should be common, right?

Playing with GIFs

Okay, so I've been doing a lot of mucking with the bullet cam, the damage system, etc. Lots of little stuff, haven't really gotten to dig into new features. Lots of tweaking of underlying things, trying to come up with not super ugly code.

Also here is my first attempt at showing a GIF

(I need to play with the the timescale curve a bit more I think, the more I see it, the more I notice a bit of a jump in time after the penetration.) You'll see some cylinders on the inside, those are crew member stand-ins. sooner or later I should go about learning how to get a hold of a basic human model in a static sitting pose.

That was from a free gif from flv site, IMGFlip, though the framerate isn't that great. I may have to look into youtube next. I'm fairly impressed with the tool I was pointed to for recording the video: https://obsproject.com/ It was free, and pretty easy to record.

Tank Tactics -- getting distracted by bells and whistles

Okay, so I have to admit, I dig the WarThunder Ground forces kill cam. And I'm attempting a rough duplication of it here. I'm learning a lot about shaders, rendering things always on top, and about the Animation class in Unity. Though I was a little disappointed by swapping materials through animation, this seemed broken, and I don't know why, other than in code, you have to swap the entire material array, and not just an entry at a time. (If it's broken, they shouldn't expose it...)

And I still don't like what I have here. I like the bullet outline, that's handy, it also always renders on top. I like the glow effect, but I don't like how it's the entire hull, which is what's getting penetrated here, i'd rather just show the surface portion that was penetrated. I might have to see if I can dig into all the vertices and do something, or maybe just give up and play a particle effect.

Anyway, I also fixed my turret turning slightly, i'm casting a ray from the muzzle to the target and setting the rotations on the turret that way, but introduced more bugs with it, silly PzII main gun being off center turret threw off my math. I'll have to do something there, maybe even mild IK. Though I'm tempted to cheat and just move to first person mode. I still need to finish remapping the collision texture I use. I've colored about 1/3 of it, and need to go in and assign armor values for the rest. It's boring work though. I also need to clean up the end of the bullet cam, it leaves things in a messy state, and do something about the timescale I have currently set. Ideally it would do some lerping between start and target. I could just get rid of gravity entirely and do a raycast to see what gets hit, or fire a phantom bullet first at full speed to see what I hit, then use an AnimationCurve to adjust the timescale as the bullet travels.

And Unity Physics never fails to disappoint, it seems to do all sorts of weirdness. Okay, I get not handling a projectile that's travelling at 1000 m/s, but even after lowering that to 250 m/s and lowering the gravity on my shell by the 1/4 as well, in a sort of pseudo time scaling, I still get strange collision behavior. And upping the solver iteration count and lowering the Fixed Timestep doesn't completely alleviate it either, though it does make it better. I've already marked the shell as Continous and tried both Extrapolate and Interpolate.

And then there's the setting to think about. I'm trying to justify WWII tanks and some sort of X-Com or Pirates like gameplay, with the player accepting missions for different factions and controlling a small hodge podge force of two tank platoons, with possibly some support infantry, if I can swing it. (or i could try to toss the WWII trappings)

First prototype for Tank Tactics game

So I finally got around to uploading a new prototype to the web for people to look. After doing all the work for the pathfinding with a turn radius, I didn't really like any of my initial schemes for then turning the turret toward a target, aiming at a specific spot on the target, calculating cover (I thought about render to texture for a fuzzy analysis, I'd done it before in an XNA prototype). So, I thought about doing it Valkyria Chronicle style, and here's the attempt. It's still really rough around the edges.

Basic Controls:

In movement mode (default):
Left click to select a tank, right click to select a new location, hold down right click to choose a final direction. You can also click and drag the transparent tank to move the destination around, or click and drag the arrow to change the direction. Click the Checkmark button at bottom center to confirm a move, or left click on the ghost tank.

In attack mode (after hitting the attack button with a tank selected)
Mouse look, mousewheel zooms, left click to fire, right click to back out to movement mode. This mode is still rough, I want to give a meter of turret rotation points, limit the up/down, add inaccuracy depending on the movement mode selected on the tank.

And of course, damage modelling. There is almost none. I've added track colliders =) Now it's pretty snazzy what I do have, I check the armor at the point of impact, adjust the armor thickness based upon the angle of impact, and adjust how far the shell will continue to penetrate after impact based on how much penetration value remains. But you wont' see any of that, because, as I said, only the tracks have colliders, and I also don't do anything with that info...yet.

My basic plan there was to add a collider per point of interest, but that got kind of messy, I think I'm going to move to a texture map. I don't' have a simplified hull, so that's going to kind of suck for perf, but oh well, turn based. Though I suppose I should learn to use a modelling program. After modelling the armor/collision model, I also need to add some components inside, like the engine, crew, etc. I also need to model HE / HEAT, etc.

*Also, the tank is just some freebie one from the Unity Asset store. I still haven't decided if I should go sci-fi, or try to come up with a setting that involves WWII era tanks.

http://joshv.itburns.net/MazeWarMulti.html

the UI is the default garbage Unity GUI, but it works and its easy, so it'll do for now as a quick placeholder to get to the new stuff. I also have a slider for the number of bots. I'm particularly happy that it supports dynamic joins, updating the map destruction for new players.

[/font][/color]

[color=rgb(0,0,0)][font=Helvetica]

[/font][/color]

1. Colors are not synchronized over games (I should do a hardcoded list of good color and distinctive colors, or pass a seed, was lazy, it's just random values)

[color=rgb(0,0,0)][font=Helvetica]

2. It's damned hard to find yourself in a 8+ player game, I should add some sort of effect, even just a light.

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

3. The AI gets confused when it gets too close to other AI. (actually a collision/movement issue)

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

4. I don't handle disconnect messages

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

5. Or have a way to restart a game

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

6. Or have a way to set the port (just a matter of adding the UI)

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

7. Or have a way to name yourself (or chat).

[/font][/color]
[color=rgb(0,0,0)][font=Helvetica]

8. I don't have a win condition.

[/font][/color]

[color=rgb(0,0,0)][font=Helvetica]

[/font][/color]

Another Unity Prototype: MazeWar

[color=rgb(78,78,78)][font=Helvetica]

So this is a remake of an old Atari game: http://joshv.itburns.net/MazeWar.html

[/font][/color]
[color=rgb(78,78,78)][font=Helvetica]

The basic ruleset is you can have only shot out at a time, hitting a wall causes it to explode shortly thereafter, sending shrapnel in the cardinal directions it wasn't shot from. If a projectile hits a projectile, it causes a backsplash.

[/font][/color]
[color=rgb(78,78,78)][font=Helvetica]

Still has a few things to do, player/player collision is borked, for example. I should add difficulty, number of zombies, scoring and if I really want to go nuts, I'd add multiplayer of some sort. I should probably try adding mouse controls, and maybe do some actual AI, the current zombie is really simple (doesn't even really do pathfinding, though I don't believe the original game had all that much either, it mostly speed up their move speed.

[/font][/color]
[color=rgb(78,78,78)][font=Helvetica]

The original game, by Mark Price is here:

[/font][/color][color=rgb(78,78,78)][font=Helvetica][/font][/color]

Added help text to my physics based tower defense.

Alright so http://joshv.itburns.net/WebAttempt.html has been updated with some help text to help guide users. If anyone finds it too terse, confusing, or anything at all, feel free to let me know!

I've also updated my path planning with a minimal turn radius (http://joshv.itburns.net/RadialAttempt.html), fixed a bug, and some other general performance improvements. I still need to add the width test, as you can pass through diagonals, and the routes will cause the object to penetrate the walls on the sides.

Adventures in physics based Tower Defense.

So, a while back, I decided I wanted to make a game using Unity, to get my feet wet in it. I wanted something fairly simple. So I went with a Tower Defense game. But of course, I had to put my own spin on it, by making everything physics driven. No hitpoints! To defeat the creeps, you have to push them off of edges, into the infinite pit below.

Anyway, here it is:
http://joshv.itburns.net/WebAttempt.html

I'm using NGUI (demo license), arongranberg.com's pathfinding (overkill, really, but I just wanted to get up and running quickly), and using open source sounds ..mostly, I need to replace some that aren't.

Honestly, I think it was probably more fun to program than it was to play.
Followers 0