Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

269 Neutral

About jhocking

  • Rank

Personal Information


  • Twitter
  1. At work this past month I’ve been implementing some interesting visual tricks on a mesh-based map. While we aren’t making a game, I could totally imagine these techniques being useful for a strategy game, or maybe a tactical RPG. Let’s say you have a hex map. Well, you could easily do hexagons with a 3D mesh, and then boom you can can use all sorts of visual tricks developed for 3D games. As just one example, you can easily tint the map with vertex colors. And this could even be overlaid on a pixel-based map visual; the mesh could just be semi-transparent tinting of the polygonal map spaces, while the underlying image could be a hand-drawn map. And not just visual tricks actually, but user interaction and controls too. This may seem really mundane, but building a mesh representation of your game’s map is an awesome way to do mouse picking of spaces on the map. Just keep a Dictionary correlating triangle indexes with your map’s spaces (hexes, tiles, arbitrary polygons, or whatever your map is composed of). Then you can easily do a raycast directly against the map’s collider (as opposed to a general raycast into the scene) and Unity’s RaycastHit object includes a triangleIndex property (remember to put a Mesh collider on your map, not Box). Easy peasy! View the full article
  2. Quite some time ago I had posted that I was thinking of recording a few videos on the fundamental mechanics underlying computers. As in hooking up a bunch of wires and switches to a battery, and demonstrating how to do useful things with that. Well, I finally got around to doing that! Early this month I went down to the library a couple times to use the video recording equipment they have, taking a toolbox of electronic components with me. If you’re interested in watching as I wire up a NAND logic gate and a transistor, check out the playlist: View the full article
  3. Still haven’t had much to blog about lately, so this may be a short post. I didn’t even make a post last month, but there were a couple interesting new techniques I’ve been mastering since my last post. One is using the stencil buffer in custom shaders, and the other is using web sockets to implement multiplayer. If you are new to the concept, the stencil buffer is simply another array of pixels you can draw to, just like the color and depth buffers. As the name implies, it’s useful for drawing stencil masks. As in, you can draw a shape on the stencil buffer, and then have that shape cut out of subsequent render passes. I found this to be really useful for rendering UI elements in the scene. In my case, I wanted lines drawn on top of the ground that appeared under other objects. What I did was simply draw the silhouette of objects into the stencil buffer while rendering those objects. Then I drew the lines last, on top of everything, but cutting out the silhouettes in the stencil buffer. Perfect! As for multiplayer using web sockets, there’s not a ton for me to explain, other than that it was super fun to implement. The server is written in Node.js (here’s one simple explanation of how) while the Unity client simply uses a C# web sockets library. I’ve been using this library, but as that link says it’s been deprecated, so I might switch to this library, or even drop some money on this very highly rated asset. Then I simply send JSON strings back and forth over the sockets. The messages are as simple as a “type” field so the receiver (client or server) can tell what to do with a given message, and then a “payload” field with the data they respond to. I gotta say, building this has been very interesting. Right now as I type this, I’m suddenly having an idea where a community of players are all interacting live in a mostly text-based game. hm I just described a MUD didn’t I? I wonder if an ad-supported MUD would do well on mobile… View the full article
  4. As I pointed out last month, I’m putting my personal projects on a hiatus for a while. Instead, I’m going to talk a bit about interesting game dev and graphics stuff that’s come up at work. Naturally I can’t blab too many details about our internal projects at PEAK6, but I do want to point out some of the publicly available technologies and/or resources. The project I’m currently working on has involved a witch’s brew of proc gen techniques. I want to focus on two in particular: convex hulls, and triplanar mapping. In this project I have a bunch of objects spawning on a plane, and I wanted to generate the terrain underneath them. That means I needed geometry that surrounds the entire collection of points, which is exactly what convex hulls do. Here’s one explanation of the concept: as illustrated, you start with a cloud of points, and then the algorithm calculates a shape which fits around that cloud. Fortunately for me, there’s already a pretty good library for generating convex hulls in C#, called MIConvexHull. Now that library isn’t designed for Unity specifically, but I found someone had already packaged it for use in Unity. Note however that this library won’t create a visible mesh for you. It’ll calculate where to put all the vertices and triangles (referred to in this library as “simplexes”) for the hull, but you still need to generate the actual mesh. I explained how to do that in Unity in my tutorial about generating mazes. So that took care of the shape. However I still needed to texture my terrain. That could have been tricky, since the convex hull library wasn’t calculating UV coordinates, only the vertex positions and triangle indices. Because of that, I decided to take a UV-less approach to texturing. If you’ve never heard of triplanar mapping before, allow me to introduce you to the concept. Basically, you project textures across the geometry along each of the 3 primary axes, resulting in stretch-free texturing in every direction. Obviously this approach doesn’t give you very detailed control of the texturing, so you wouldn’t want to do this on something like a character model. However this works great for procedurally generated terrain. While there are some triplanar shaders on Unity’s Asset Store, I figured someone must have posted one online, or alternatively it can’t be that hard to write one myself. Sure enough, I found this article. So with that shader assigned to a material, I slapped some grass on top and dirt underneath, and my convex hull looked like ground! View the full article
  5. I didn’t really do anything for my personal projects this month, and in fact I may be taking a hiatus from working on them for a while. As mentioned a couple posts ago, I just started a new job that I’m pretty busy with, not to mention I just had a second baby (which obviously is also keeping me pretty busy!) Just so this update has one pretty picture, here’s a smoke effect I created at work. This was supposed to just be some programmer art for testing, but turned out unexpectedly good: View the full article
  6. jhocking

    Lightweight Management Sim

    I teased my new project last month: a lightweight management sim in the vein of Drugwars or Urban Dead. Unfortunately the partnership didn’t pan out (no falling out, we just realized I wanted to work much faster than he did) but I’m going to keep working on this solo. Indeed, a very manageable scope is a large part of why I was interested in this project. This is basically all menus, and that’s all I have time for currently. The other main motivation for me is that it’s a good excuse for me to finally learn Xamarin. That’s a cross-platform mobile app development framework programmed in C#; I’m very familiar with that language from programming in Unity, so this seems like another good tool to have in my belt. I spent most of this month working out the practicalities of how to build an app like this in Xamarin. For example, it’s fairly simple to install Json.NET using Nuget, and then I just had to lookup how to load a text file embedded in the app so that I could parse the data in it. Loading and saving binary files was even easier to work out, since that code worked with basically no modification when copied out of my Unity projects. Meanwhile, from a design perspective I’ll probably make a single-player version of Urban Dead. I’m hoping to actually spin out a series of lightweight management sims with different themes once I have the technological underpinnings in place, but I gotta start with something right? A game about surviving in a zombie apocalypse is kinda cliche, but Urban Dead is multiplayer-only so a single-player version could be interesting. Plus I’m already thinking the zombies will just be what players see at first, but eventually they’ll face other supernatural creatures in a Cthulhu-esque world. View the full article
  7. jhocking


    Merry day-after-Christmas! There’s not a ton in this update, and I’m more or less continuing the theme of last month’s update: regrouping and setting up my next projects. Unexpectedly, I seem to be onto yet another new project. I was really intending to get back to my turn-based dungeon crawler (really) but an opportunity came up that I’m jumping on. Specifically, I got to talking with a development partner for some projects we are both interested in working on, so yeah I’m doing that now. Good development partners are hard to find, and while I only just met this guy he seems promising, so I’m giving this the ol’ college try. Basically, he was asking some questions on reddit about how to go about cloning Car Thief. Well as it happens, I’d been considering a series of lightweight management sims like that. I’m a fan of games like Drugwars and Urban Dead, so those seemed like a good way to make some ad-supported games on mobile. Long story short, that conversation turned into an offer of partnership. Incidentally, there are two major personal developments that will greatly impact my projects going forward. One is that I’m about to start a new job. I’ll be working at Peak6, which is a financial investment firm. I was initially confused why a trading company would be hiring a game programmer, but they are doing some really interesting things with internal tools. Hope the new job turns out well! Even more significantly, I just had a daughter! This is my second kid, whoo View the full article
  8. jhocking

    Rebuilding year (er, month)

    Not a ton to report this month. I released Demolo last month, which allows me to reflect on it. Meanwhile I’m gearing up to resume working on my first-person dungeon crawler. And then I’ve also been considering a little video project, so I’ll describe that too. Demolo hasn’t been a huge hit, which is mildly disappointing but mostly expected. Slightly disappointing in that you always hope it’ll be a hit when you release a game, but I wasn’t expecting a giant response considering it was a pretty limited audience. I mean, VR games in general have been a smaller market than companies banked on, and I specifically targeted just one device, the Oculus Go. Anyway, I did learn a lot from doing this project, including the simple fact that the Oculus Go is a lot of fun to develop for. In particular, it has me looking forward to the Oculus Quest, because I may breath new life into Demolo on that platform when it comes out. As for the RPG game, I’ve come up with a couple new things to put in the mix. One is aiming for even shorter playthroughs, and then making it so players will want to play it over and over in order to experience everything in the game. I’m thinking along the lines of a couple hours to complete the entire quest. To go along with this, I’m probably going to implement a system to upgrade your character’s class. At a certain level you can choose to either dual-class or promote a character. Dual-class would mean you warrior can cast spells too, or your mage can cast both fireballs and healing, that sort of thing. Promoting on the other hand would simply be turning your lowly warrior into a Knight. Thus players can customize their party more than just the initial class, encouraging repeat plays to experiment with different parties. I’ve also been thinking I might shift focus from mobile to a PC release, I’m not sure. Certainly, I was already planning to release both mobile and desktop (monetized through rewarded ads on mobile, while it’d simply be $6.99 or something on Steam) and the PC version will have some advantages, in particular basic modding support. That plan is still on the table, but I’ve come up with a new game concept on mobile, so maybe it makes more sense to just do desktop for this one. The little video project isn’t directly related to game development; it’s about computing in general. While there are lots of resources out there that explain how to use computers or how to program or whatever, I’ve found little that explains how computers work from the ground up. As in the physical mechanisms underlying computers – how a bunch of wires with electricity running through them can do anything useful. Thus I’m thinking of doing a few YouTube videos where I simply take some wires, hook them up to a battery, and explain that stuff. View the full article
  9. jhocking

    Demolo is released!

    This is a very short update given I already said most of it last post: Demolo is now out for Oculus Go! https://www.oculus.com/experiences/go/1836211156444019/ View the full article
  10. jhocking

    Demolo review update

    Well Demolo is currently being reviewed by Oculus, so that’s certainly forward progress. I’m hoping to release on Oct 31 but don’t know if that’s feasible. Shortly after last month’s update I submitted Demolo to their store for review, and it’s still not ready to release, so that’s very frustrating. Admittedly the hold up was not entirely on their end (more on that in a bit) but quite a bit of this time has been their normal review time, which is just crazy to me. UPDATE Email I just got from Oculus: review is completed and we should be ready for release on 10/31/2018. At least here’s a pre-release video review, so that you can see the game in action running on Oculus Go: I thought Apple’s review time for iOS apps was bad, but this is another league of annoying. I get that Oculus is trying to preserve a high standard of quality in their store, but come on. The email confirmation when I submitted warned that the review time could take several weeks, which initially I’d hoped was just overestimating to keep my expectations low. No such luck! Now when I said it was not entirely on their end, that’s because I made two mistakes that have contributed to the holdup. First off, in my mad dash to generate all the requirements for submission (various screenshots, videos, etc.) I forgot to check the performance requirements. Turns out Demolo was experiencing a significant framerate dip from one visual effect, and they require apps maintain a solid 60 fps at all times other than loading screens. This particular issue was detected almost immediately (under 24 hours) and that misled me into thinking the entire review process would be fast. However that performance check must be an automated test, because the rest of review takes weeks. The other mistake I made was related to fixing that performance issue. That problem was caused by just one visual effect (specifically, outlines around the blocks) but in my attempts to fix the issue I went overboard and turned off a bunch of graphical effects, including turning off shadows. As soon as I got the framerate solid I submitted the fix, but I really should have waited just a bit because immediately after re-submitting I kept fiddling and realized I could turn the shadows back on and not harm performance. A few days ago they finally told me Demolo had passed review and was ready to release. However the version cleared for release had shadows turned off, so I decided to submit the update so that Demolo can be released with the best graphics possible. Well now I’m worried that was a strategic blunder. While I assumed that, since the app was already cleared for release, the small update would be approved quickly, now I’m worried that I triggered an entirely new multi-week review process that will have to complete before release. doh View the full article
  11. jhocking

    Woohoo, about to submit!

    Man, there was a lot more to do than expected to prepare Demolo’s submission to the Oculus Store. However I’ve prepared the mass of promotional images and videos they need, so I’ll submit the game very soon, possibly this weekend. Indeed, I probably could have submitted it the day after I finished the trailer, except I had to pause to put together my GDEX presentation. I’m going to be delivering a talk there this weekend! In my last blog post I thought the biggest time sink remaining for submission would simply be their review time, but I didn’t realize there were so so many promotional images needed. A hi-res logo on transparent background, store icons in a variety of specific sizes, a VR cubemap, etc. Here’s just a taste: Besides all those still images, I also made a video trailer. The date on the YouTube video indicates I made it a week and a half ago, and that was the last promotional asset I needed to make. The only other things I need to do before hitting the Submit button are adjusting settings in the Android manifest, so I’m really really hoping I can find the time to do that right after presenting at GDEX. View the full article
  12. As laid out last month, there are 3 main tasks in order to port Demolo from the web build to work on Oculus Go: HMD controls, adjusting the UI, and replacing mouse with tracked controller. Well, I’ve done all three, so all the main tasks are done! Now there’s just assorted polishing left to do (mostly glitches in the UI) and then submitting Demolo to the Oculus app store. I haven’t done a ton of research on their submission process, so I have no idea how long it takes (eg. is there a review period like iOS apps?) Aside from the unknown submission time, I estimate another week and Demolo will be released on Oculus Go! I will of course be posting another blog update with a link to the live app. The final week will just be spent on visual polish, not actually changing anything fundamental. The game is complete and playable, which is pretty awesome for me to test! It really does feel just as cool as I imagined to spin around the blocks and make matches in VR. Getting the UI to respond to the Oculus Go controller instead of a mouse was tricky (and as mentioned, still kinda glitchy) but making block placement respond to the tracked controller was a piece of cake. I must say though, implementing the controller absolutely did not take an entire month. I’m rather cross with myself for waiting until the last week of August to get around to that, but at least I have a good reason: I moved at the beginning of the month, so I’ve been really busy setting up the new house. When I abruptly realized Demolo will still not be released on Oculus Go after another month has passed, I went into a frenzy of implementing the tracked controller. View the full article
  13. My bestselling and highly recommended Unity book has been fully revised! Unity in Action, Second Edition teaches you to write and deploy games with the Unity game development platform. You'll master the Unity toolset from the ground up, adding the skills you need to go from application coder to game developer.Foreword by Jesse Schell, author of The Art of Game DesignDon't take my word for it being good, look at the sky-high ratings on GoodReads.You can order the ebook directly from the publisher's site, or order the book on Amazon to get both the physical book and a coupon to download the ebook!
  14. These are simple Python scripts for Maya and Blender. Free to download from itch.io and use for placing objects in your own projects.   From the description on the website:     https://jhocking.itch.io/dropper-for-maya   https://jhocking.itch.io/dropper-for-blender
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!