VR Research and Game Development (Update 6): Unity 2D Training Continued (not really)

I’ve got no real news today, I’ve just watched more tutorials over at: http://unity3d.com/learn/tutorials/modules/beginner/2d/sprite-renderer

It’s going slow, and it’s going to be going even slower this week since I’m going to have my room renovated! Problem is that the computer I’m using for all of my stuff is in my room, so I can’t use that in the next few days.

Because I didn’t wanna leave this empty, I wanted to show a thing I thought you might like if you want to start getting into game development. Unity is nice and fine if you don’t feel like learning much (like me), but if you wanna learn to make something from scratch, you should follow this guy: Handmade Hero

Here’s a big huge load of playlists that he’s made, allowing you to follow him as he makes a game from scratch, on stream, every day: https://www.youtube.com/user/handmadeheroarchive/playlists

Until next time!


VR Research and Game Development (Update 5): Unity 2D Training

Unity is still kicking my ass, but I’m looking at this guide:


Coincidentally, it’s their own guide to their 2D modules. 2D in Unity seems to work in a rather odd way. It is actually NOT 2D (GASP!). As a standard camera view, it’s an ortographically projected camera onto 2D sprites that you can assign different heights to. Or at least that’s who I understand it so far. Even a menu in a 3D game is actually just a 2D plane in a 3D space, but with a different camera and controls attached to it.

Now, to illustrate my point, here’s what the 2D sample game looks like in Unity when you Play it:


Looks perfectly 2D, eh?

Now, I’m gonna blow your mind. Here’s what the game actually looks like in Unity’s Scene Editor!

Boom! 3D

Boom! 3D

Had your mind blow yet? No? Tough crowd.

Now, here’s my interpretation of things:

The point is that the Unity 2D engine is actually a disguised 3D engine. That in and of itself can be a bad thing and a good thing at the same time (at least to my limited understanding). The bad thing would be that a 2D Unity game would run slower than a 2D equivalent made in another engine specifically made for 2D because that engine would be more optimized for the pipeline. Unity might have made optimizations in order to allow for more 2D stuff, like sprite animation and sprite deformation, alphas maybe, stuff like that, but I’m not quite sure because I haven’t read up on it yet. From what I’ve seen in a few 2D examples on the vast community of the nets, 2D seems to be handled just fine performance wise, but I suspect that might be because of the other thing that computers are really good at doing nowadays:

3D Acceleration! See, since Unity2D is just 3D sliced in a plane, that means that the principles through which the 3D pipeline still applies to the assets, which means that your huge overpowered monster of a video card. Because those are more and more ubiquitous, that means that we’re generally gonna see good performance. Another advantage that the 3D rendering allows us is having awesome stuff like albedo maps and multiple dynamic lights and even pixelshading all in a 2D game.

Example? This sexy thing made by Anton Kudin for his game Megasphere:

Pretty sweet, eh?

I’m an extremely long way away from being able to do that though, but Anton’s giving me hope by making something so utterly awesome in Unity.

Now, what I’ve said up here should be taken with a truckload of salt. It’s how I see things after trying to bump into how things are made behind the scenes. I do not actually KNOW if what I’ve said is true (but it sounds alright? maybe?). Or maybe it’s all a bunch of hooey.

Regardless, if you might be interested in trying out Unity, it’s free as long as you don’t have a hit out trying to sell. It’s a great training exercise for your noggin, and who knows, maybe the next great hit is one of your making.

VR Research and Game Development (Update 4): Nothing really to see here

I’m trying to remake the shooter java game I made in Unity. Problem is, I’m totally unaware of how to make a game in Unity. As such, as with any software that people say it’s very good for something, I tried it, and I found that it is very good at that thing (in this case game development). But I have no idea how to use it. It’s not obtuse to me, just unfamiliar. As such, it might take a while until I can do even simplistic things in it, and it will involve watching a lot of tutorials.

Here’s a screencap:

Die red arrow, die!

Die red arrow, die!

You might be thinking that it’s working. No, it’s not. I tried to figure it out by myself, and failed pretty spectacularly, mainly because I tried doing the same thing as I did with Photoshop – play around and click buttons until I figure it out. That approach worked when I had the bountiful time of youth, as well as the patience, but those are gone nowadays. Besides, a game tends to be a bit more complex than an image, even with a ton of layers.

It’s like building a Death Ray from IKEA without the manual. In the best case scenario, it doesn’t work, and in the worst case scenario it kills you.

Join me next time as I will have watched videos and tutorials and actually tried to do something which works.

VR Research and Game Development (Update 3): Unity panoramic camera experiments

It’s a tad annoying to be interested in both 2D game development and VR (which involves 3D). I can more easily make 2D sprites than 3D models. Animation is probably easier to handle in 3D than 2D, since you don’t have to draw as much, but the modeling experience is a bit against me. Until then, I’ve installed myself Unity and played around with the demos.

More than that, I tried to apply an equirectangular projection camera to Unity via five separate fisheye cameras and splicing it together with a bit of code. Result is a believable equirectangular image of a 360 degree field of view around the camera point of view, without much in the way of artifacts (except when there’s special lighting effects involved, and even then, there’s only a bit of bad stuff at the seams then).

Example of an equirectangular 360 projection

Example of an equirectangular 360 projection

Now, problem with having 5 separate cameras in a Unity game (or any game for that matter) is that you generally have to render those 5 different cameras at the same time. That, understandably, takes quite a lot of graphics juice out of your computer. It works just fine if you have a mighty rig and the scene isn’t that complex, but once you add some complexity, your FPS will plummet like a lemming off a cliff.

The second thing is how the cameras work – they will replace your main camera, and in order to maintain a good video, you have to be looking straight ahead, and never look up and down, since the video watcher will probably go dizzy if you do and the general point of view of the video will be tilted if the watcher looked to the side. You can see an example of that here:


The other matter is that some games just won’t let you have multiple cameras active at the same time. That might just be my own limited technical experience with Unity, but the cameras just show the backdrop and nothing else. I suppose it’s a matter that could use more research on my part.

Another thing is the matter of game perspective – an FPS game would work well enough with this kind of recording system, but you can’t look up or down to aim your guns (unless the aiming was a separate system, like in ARMA or any rail shooter). Racing games come to mind as being very good at being recorded in this way; you can see an example of that here:


Cockpit games are good fits for VR already, so they would work well enough in this recording system as well. I have applied this sort of camera to an isometric-style third person shooter, but you can’t look around (not that you need to with 360 recording) nor aim your gun without more modification in the code. The monsters seem to be glitching out due to it being an older version of Unity. The camera system I’m using is only compatible with 4.6 onwards. Here’s the video in question:


There is also the matter of resolution. Due to how the projection system on the video works, it’s best to have a 2:1 aspect ratio. Most games don’t support a 2:1 aspect ratio. You can set up custom resolutions, but it’s a pain in the butt. Even in Unity, where you make your own game, you still have to change some things in the registry editor in order to maintain the resolution you set for the final application (for some reason). Also, say you’re using a standard HD video resolution for equirectangular shooting: 1920×960. That looks and works well enough, but you might get quite a bit of pixellation as you look at the video, as the vertical field of view is quite a bit lower.

There are other projection systems that would look well for VR video, but I’ll go into those next time.

VR Research and Game Development (Update 2): Java fresh in my mind

I was planning to write about Unity and my efforts of getting an equirectangular projection today, but I had to actually make a game in Greenfoot for graduating the Oracle Java Fundamentals course I attended. At first I made a TicTacToe game, which works; it turns out it was a bit uninspired as someone else made the same game in our group. If you wanna play it, you can do so here (click the picture):


Do note that it requires Java. For some reason it’s 2 megs. I guess I’ve done something wrong somewhere.

The deadline was for tomorrow, and I still hadn’t made it. I’ve also forgotten I had to do it until I got a reminder today. As such, since I had some time when I finished work, I opened up Greenfoot and got the game done in a couple of hours. Considering I haven’t made a game myself in close to 12 years now, I’d say it was a great success. I’ve also hastily made the in-game sprites by hand.

Don’t expect any animation or anything beyond a simple explosion frame when you hit a helicopter with a rocket.

Speaking of helicopters and rockets, the game is called Sam Site, because you control a SAM site and shoot down helicopters that come at random intervals from the left side of the screen. Just run the .jar file and click Run, then click where you want to shoot. There is no score or levels or anything special like that, but hey, I whipped it up in less than 2 hours.

By the way, the game’s inspired by Night Raid, a game released back in 1992. Ahh, that brings me back.

If you want to play Sam Site, click on the picture below:


VR Research and Game Development (Update 1): What I’ve been up to

It’s been a while since I’ve last written anything on this blog before the last few updates, so I suppose it’s about time to fill you in. I won’t bore you with life-related stuff, but I will mention that I got a new job. I’m still an IT Tech, but it’s better now than it used to be.

The Durovis Dive

The Durovis Dive

In terms of gaming, it’s another matter. Playing has been sporadic, but I did get a chance to try out a few VR devices. The first thing I tried out was a Durovis Dive helmet, which, while rudimentary, I found to be a complete paradigm shift in the way I thought VR would work (considering I’d never tried anything like it before). It’s basically a plastic case that you put on your face, along with a couple of lenses that allow your eyes to focus on the phone you would use as the screen. Not much of a high tech solution, but it works well enough to give you a bit of a taste of what stands for VR these days.

The Google Cardboard

The Google Cardboard

Second I tried the cheap Google Cardboard. It’s basically the same thing as the Durovis Dive, but it’s made of cardboard – hence the name. A cheap alternative, and it’s still using your phone or tablet for a screen, but it’s also less comfortable than the Dive, and you personalize it much. You get what you paid for, I suppose.

The Oculus Rift DK2

The Oculus Rift DK2

Lastly, I tried out the Oculus Rift DK2. This is the step I needed to see to really believe that VR is going to become a thing, a real thing that is going to be successful and actually be used. The sense of wonder took quite a while to wear off, but it did once I realized that the tech is so new and unexplored that there really isn’t much you can do with the Oculus for now. It feels great, responsive and all, but you’re stuck to a chair. You can look around corners, but you barely ever need to, since moving in games independently from your own body will (probably) make you sick. I know it did make me sick when I tried playing TF2 with it. Games like War Thunder, or any other game that involves a cockpit, do work, and they work well. All others… I think need more work, or at least some sort of reliable input device that involves your hands.

Of course, since I’ve tried these, they’ve become obsolete. There’s been loads of announcements, what with the headset HTC is making with Valve, the Samsung Oculus Gear thing, Microsoft’s Hololens (which I rather like the idea of), as well as other assorted headsets. I’m still a bit wary about it all though. It is rather awesome the first few times you try it, but I tend to get motion sickness from it, which isn’t what I sign up for.

For next time I tried VR, here’s a teaser (apparently embedding does not work on free wordpress websites):


Use Chrome for this.