[Updated on 25-2-2013: added a paragraph about lowering the voxel update frequency for faster dynamic update. The demo also added a combo box for choosing the update frequency]
In last year SIGGRAPH, Epic games presented their here which requires a DX11 GPU to run.
There are 5 major steps in voxel cone tracing:
0. Given a scene with directly lighting only
1. Voxelize the triangle meshes
2. Construct sparse voxel octree
3. Inject direct lighting into the octree
4. Filter the direct lighting to generate mip-map
5. Sample the mip-mapped values by cone tracing
The step 1 and 2 can be done only once for static geometry while step 3 to 5 need to be done every frame. The following sections will briefly describe the above steps, you may want to take a look at the original paper first as some of the details will not be repeated in the following sections.
The first step is to voxelize the scene. I first output all the voxels from triangle meshes into a big voxel fragment queue buffer. Each voxel fragment use 16 bytes:
The first 4 bytes store the position of that voxel inside the voxel volume which is at most 512, so 4 bytes is enough to store the XYZ coordinates.
Voxel fragments are created using the conservative rasterization described in this shader generator to generate the shaders for creating voxel fragments based on the material.
Scene before voxelize
Scene after voxelize
Octree building pass
I use a similar data structure that described in the giga voxel paper with a large octree node buffer storing the octree/voxel node data (with 8 node grouped into 1 tile which described in the paper) and a 3D texture storing the reflected radiance and alpha from the direct lighting at that voxel (I assume all the surface reflect light diffusely so only 1 3D texture is used which is different from the paper storing incoming radiance).
Each octree node is 28 bytes with the first 4 bytes storing the child tile index with another 24 bytes storing the neighbor node byte offset from the start of the octree node buffer:
As a performance conscious programmer in a soft-realtime environment I’ve never been too fond of garbage collection.
Incremental garbage collectors (like the one in Lua) make it tolerable (you get rid of the horrible garbage collection stalls), but there is still something unsettling about it. I keep looking at the garbage collection time in the profiler, and I can’t shake the feeling that all that time is wasted, because it doesn’t really do anything.
Of course that isn’t true. Garbage collection frees the programmers from a lot of busywork. And the time they gain can go into optimizing other systems, which leads to a net performance win.
It also simplifies some of the hairy ownership questions that arise when data is transferred between systems. Without garbage collection, those questions must be solved in some other way. Either by reference counting (error-prone) or by making local copies of the data to assume ownership (ugly and costly).
But still, there is that annoying performance hit.
I was pretty surprised to see that the developers Go, a language that looks well-designed and targets low-level programmers, decided to go with garbage collection rather than manual memory management. It seemed like a strange choice.
But recently I’ve started to see things differently.
One thing I’ve noticed as I delve deeper and deeper into data-oriented design is that I tend to allocate memory in much larger chunks than before. It’s a natural consequence of trying to keep things continuous in memory, treating resources as large memory blobs and managing arrays of similar objects together.
This has interesting consequences for garbage collection, because when the garbage collector only has to keep track of a small number of large chunks, rather than a large number of small chunks, it can perform a lot better.
Let’s look at a simple example in Lua. Say we want to write a class for managing bullets. In the non-data-oriented solution, we allocate each bullet as a separate object:
self.position = self.position + self.velocity * dt
for i,bullet in ipairs(self.bullets) do
In the data-oriented solution, we instead use two big arrays to store the position and velocity of all the bullets:
for i=1,#self.pos do
self.pos[i] = self.pos[i] + dt * self.vel[i]
I tested these two solutions with a large number of bullets and got two interesting results:
The data-oriented solution runs 50 times faster.
The data-oriented solution only needs half as much time for garbage collection.
That the data-oriented solution runs so much faster shows what cache coherence can do for you. It is also a testament to how awesome LuaJIT is when you give it tight inner loops to work with.
Note that in this test, the Bullet code itself did not create any garbage. The speed-up comes from being faster at collecting the garbage created by other systems. And the reason for this is simply that with fewer, larger memory allocations, there is less stuff that the garbage collector has to trawl through. If we add in the benefit that the data-oriented solution will create fewer objects and generate less garbage, the benefits will be even greater.
So maybe the real culprit in isn’t garbage collection, but rather having many small memory allocations. And having many small memory allocations does not just hurt the garbage collector, it is bad for other reasons as well. It leads to bad cache usage, high overhead in the memory allocator, fragmentation and bad allocator performance. It also makes all kinds of memory problems harder to deal with: memory leaks, dangling pointers, tracking how much memory is used by each system, etc.
So it is not just garbage-collected languages like Lua that would benefit from allocating memory in larger chunks, but manually managed languages like C++ as well.
Recently, I’ve come to think that the best solution to memory management issues in C++ is to avoid the kitchen-sink global memory allocator as much as possible and instead let each subsystem take a much more hands-on approach to managing its own memory.
What I mean by this is that instead of having the sound system (for example) send lots of memory requests to the kitchen-sink memory manager, it would only request a few large memory blocks. Then, it would be the responsibility of the system to divide that up into smaller, more manageable pieces that it can make practical use of.
This approach has a number of advantages:
Since the system knows the usage patterns for its data, it can arrange the memory efficiently. A global memory allocator has no such knowledge.
It becomes much easier to track memory use by system. There will be a relatively small number of global memory allocations, each tagged by system. It becomes obvious how much memory each system is consuming.
Memory inside a system can be easily tracked, since the system knows what the memory means and can thus give useful information about it (such as the name of the object that owns it).
When a system shuts down it can quickly and efficiently free all of its memory.
Fragmentation problems are reduced.
It actively encourages good memory behavior. It makes it easier to do good things (achieve cache locality, etc) and harder to do bad things (lots of small memory allocations).
Buffer overflows will tend to overwrite data within the same system or cause page faults, which will make them easier to find.
Dangling pointer access will tend to cause page faults, which will make them easier to find.
I’m tempted to go so far as to only allow whole page allocations on the global level. I.e., a system would only be allowed to request memory from the global manager in chunks of whole system pages. Then it would be up to the system to divide that up into smaller pieces. For example, if we did the bullet example in C++, we might use one such chunk to hold our array of Bullet structs.
This has the advantage of completely eliminating external fragmentation. (Since everything is allocated in chunks of whole pages and they can be remapped by the memory manager.) We can still get address space fragmentation, but using a 64-bit address space should take care of that. And with this approach using 64-bit pointers is less expensive, because we have fewer individually allocated memory blocks and thus fewer pointers.
Instead we get internal fragmentation. If we allocate the bullet array as a multiple of the page size (say 4 K), we will on average have 2 K of wasted space at the end of the array (assuming the number of bullets is random).
But internal fragmentation is a much nicer problem to deal with than external fragmentation. When we have internal fragmentation, it is one particular system that is having trouble. We can go into that system and do all kinds of things to optimize how its handling memory and solve the problem. With external fragmentation, the problem is global. There is no particular system that owns it and no clear way to fix it other than to try lots of things that we hope might “improve” the fragmentation situation.
The same goes for out-of-memory problems. With this approach, it is very clear which system is using too much memory and easy to fix that by reducing the content or doing optimizations to that system.
Dealing with bugs and optimizations on a system-by-system simplifies things enormously. It is quite easy to get a good grasp of everything that happens in a particular system. Grasping everything happens in the entire engine is a superhuman task.
Another nice thing about this approach is that it is quite easy to introduce it on a system-by-system basis. All we have to do is to change one system at a time so that it allocates its memory using the page allocator, rather than the kitchen-sink allocator.
And if we have some messy systems left that are too hard to convert to this approach we can just let them keep using the kitchen-sink allocator. Or, even better, we can give them their own private heaps in memory that they allocate from the page allocator. Then they can make whatever mess they want there, without disturbing the other systems.
About a year ago, Agora Games GitHub account. External open source work refers to projects that we contribute to in off-hours and may or may not have anything to do with video games because we’re swell folks like that.” How’d we do in our open source efforts over the last year? Read on…
THE BRASS TACKS
It is very easy for us to track contributions to all of our open source projects. All of the projects are setup with a service hook to notify our company’s “Open Source” chat room when events happen like code is committed or a pull request is opened or an issue is filed. Every week I create a new “shell” for the “Game Face” blog post after the last one is published. I set it to be published automatically at 9 AM on the following Friday. As contributions come in to our open source projects, next week’s blog post is updated.
I’m not sure if we’ll open source more projects than we did in 2012. 33 is a fair number of projects to have open sourced. We obviously want quality over quantity. I’m always pushing to see if there’s anything we can open source. One of the ideas being tossed around as a way to expand our open source efforts would be to hold a weekly “Office Hours” session where a few engineers hop onto IRC or a Google “hangout” for an hour or so and field questions on our projects.
We are happy to contribute back in any way we can to open source software, whether it be our own projects or the projects we use on a daily basis. Again, if your company does anything with open source, I’d love to know about it!
Two weeks ago I posted an article showing progress on a new type of touch screen joystick, that allows you to move and rotate using a single touch. The response to that was really positive, and so I’ve continued working on it in the background. This is a short post updating on progress.
Most of the update is covered in this video, which I’ve recorded on a camera so that I could narrate:
To cover the main points done on the road to improving the system:
To alleviate the issue of not being able to see where your thumb is on the stick, I’ve added a mirror joystick in the centre of the screen that appears when you’re touching the main one.
I’ve added a nice orange dot to show you the direction you’re walking in. This was first done by Eric Raue on his own implementation of the original article (Eric also added a web player build of his version here).
Rotation arrows now appear when you touch the rotate gizmo. This seems to have been the turning point for ease of use: without these arrows people struggled to understand why they were rotating, with them they get it much easier.
The faster you rotate the slower you walk. This makes it possible to perform much tighter turns, which seems important as a lot of people don’t turn until they’re at the point they want to (unlike myself, who tends to use it more akin to driving a car).
This version has been focus tested quite a bit now, and is showing a lot of promise. Most people get it within a minute, a few take a bit longer. Eased into the mechanic though I think this is very good, especially when compared to the learning curve of dual sticks.
I’m going to keep working on this when I can, but it might be a little while before there’s another update. Which may well be about starting a kickstarter 🙂
So, just recently, I was asked to give a 90 min lecture in my home city regarding crowdfunding after managing to run a successful campaign myself in mid 2012. The lecture is pretty long, but I’ll include the video at the end in case anyone’s interested in sitting through the whole thing. If not, I was also asked to write a shortened version of it for people to read, so I thought I’d share it here.
Keep in mind this whole lecture purely relates to my own experience with crowdfunding and not to that of others, but I hope that any prospective crowdfunding applicants can get something useful out of it!
Hi, my name is Alex Norton, and in mid 2012 I ran a successful crowd-funding campaign for my procedural RPG, Malevolence: The Sword of Ahkranox, earning over 500% of my requested total. How did I do it? Well, I’ll tell you – but it’s not an exact science. The best I can do is to give you what advice I can.
First of all, why did I even look into crowd-funding? Many campaigns you see on places such as Kickstarter are looking to fund an entire project – sometimes asking for hundreds of thousands of dollars to do this. To me, that seems a bit much, particularly given that all that is offered up on these campaigns are some design drawings and an empassioned speech by a director of some sort. My tact was different. I already had a product, but a rough one. It worked, but wasn’t as pretty as it could be. To make your project pretty is often the part that takes up most of your money, so that’s what I looked to crowd-funding for. Polish is often what makes or breaks a product. No matter how impressive something is technically, without the right shine it just becomes hard to “sell” to an audience.
In addition to polish, crowd-funding my game gave me an insight into its market viability. Would it sell? Is the idea sound? How will the public react to it? All of these questions and more were answered purely based on the social response that my project got on the network, and on blog sites that talked about it. So that’s another angle for you to look at.
The first time I attempted crowd-funding, however, didn’t go so well. I made up a video for my product, slapped together a few screen- shots and gameplay videos and left it there for a month on IndieGoGo, expecting to find the account full of money at the end of it.
Needless to say, the excersise was fruitless. Not only did it get to barely an eighth of what I needed financially, it copped a fair amount of negative publicity, which put me to thinking.
Now please, don’t get me wrong, the fault for this lay with me entirely. IndieGoGo is a fantastic site (and available for use by people in Australia) but my strategy for running my campaign was entirely wrong. So I took the lessons I learned from it and made the move to Kickstarter via one of the American members of my team.
After doing significant research on other, more successful, crowd-funded projects, I came to the following conclusions:
– Communication is key! Talk to your pledgers and potential customers. Answer their questions when they have them and keep them engaged.
– It all comes down to how you sell your product, and how you sell yourself and your team as people.
– Be aware of your target audience and gear every little thing you do towards them and only them.
– Market your campaign. Send links to blogs, reviewers, journals, magazines and spread it across social networks. Get traffic to it.
– Be willing to put in the hours that it takes to make regular updates, answer all questions and keep the customer engaged at all times.
On top of this, I decided to change my tactics to include the following:
– Show the customer that the project is being made by people. Good quality, friendly, nice people. If they like you, they’ll be more
inclined to like what you’re selling.
– Don’t just show them why your product is special. Show them why it’s special to YOU, and why it should be special to THEM.
– When you’re selling your product, you should also be selling the people making it. It makes the customer feel a part of something,
rather than a simple ‘browse and buy’ scenario.
– Write lots of updates. At LEAST 3 per week. Show them you’re working at it. Show them how dedicated you are. Try and use video where
possible. People respond to video. Get your best speaker onto it.
– Talk to the pledgers, not just as someone who answers questions, but really engage them in conversation. Show them you’re real.
So after doing all that, I had an interesting campaign. It took work, to do all that, I won’t lie, and that’s something you have to be prepared to do. It’ll be more work than you think it will be, too. So, for the month that your campaign is running, prepare to turn away friends and family, to decline invitations and to tell everyone to leave you alone. If this project really means that much to you, then you need to be willing to dedicate your life to it for a month.
I did this myself, and the response was massive. My project was fully funded within the first week, and after that it just kept climbing and climbing. I had to move on to add stretch goals quite quickly, which was something I’ll admit I had not planned for, but when it comes to crowd-funding, you never know what might happen, so you have to be prepared for not only the worst, but the best, too!
Once it was all over and done with, I had the aftermath to deal with, which was another thing I wasn’t expecting. It’s not as simple as all that. To suddenly go from being a penniless developer to having all that cash sitting there… It’s a hard thing to be responsible and look after it properly, but you must. Don’t go nuts with it as some people have done in the past. Be responsible, be well-managed and you’ll reap the benefits of it.
Another thing you’ll have to deal with is the public hatred. Yes, it’s strange, but some people don’t like to see other people succeed, and if you happen to have a particularly successful campaign, some people will hate you for it. They will make you feel terrible, but trust me when I say that it’s best to just ignore them. If you’ve handled your campaign as I stated above then you’ll have a vast and loyal following behind not only your product, but you as well, and they’ll always make you feel welcome!
Not all campaigns work though, and it’s not always your own fault, or because your product is a bad one. Sometimes the planets just don’t want to align for you, and that’s alright, too. If that happens, it is definitely worth your time to analyze the wreckage and find out what could have been done better, so that you don’t make repeat mistakes next time. That information is PRICELESS, I cannot stress enough. A failure is only a failure if you fail to learn from it. Remember that. You can always try again.
So, what would some last-minute advice be to a potential crowd-funder? The following is the best I can offer:
– Just because you CAN crowd-fund, doesn’t necessarily mean you SHOULD. Make sure your product has GOTTEN somewhere first, otherwise jumping
into a crowd-funding situation can bring some pretty nasty PR down on your project.
– Don’t do it unless you’re prepared to deal with it. I cannot stress to you just how much work it is if you do it right, and that is
something that you really have to be ready for. PROPERLY ready for.
– Be sure to market your campaign EVERYWHERE. Don’t rely on people to just happen across it one day. Spread the word EVERYWHERE. Don’t be
shy about it!
So that’s all for now! This is a cut-down version of this topic, but for the full version, feel free to watch the video at the link below. I wish you all the best in your campaign and your projects! Good luck!
So this being AltDevBlogADay, I’m sure that a lot of people reading this have done at least one game jam. I’m sure that a good deal of people also haven’t had the pleasure yet, so this little write up is for them. This isn’t really a full article, just a jot-down of some musings that are kind of rushed because I’m most busy when an article on it is most timely.
In a few days, thousands of people around the globe will gather at pre-registered locations, and attempt to make a game with a specific theme within 48 hours at the 2013 Global Game Jam. Game Jams are an amazing place to have fun, make new connections, and learn new skills. And of course, there’s the ever-valuable fact that you walk into a place, and 48 hours later you (hopefully) have a functioning game with YOUR name on the credits. Boom. 48 Hours. Game. Done.
So what can you expect from a one of these events? Well every locale is different, but typically you all meet at the prescribed location at the prescribed time, watch a video, and then get pseudo-randomly assigned to teams (unless you come with your own team). Once the 48 hours is up, an expo is held where everyone shares their games and talks about the process. Once that’s over, some people will continue to punish their bodies by the intense imbibing of spirits. That least bit I can’t recommend, but I do it anyway.
Anyways, the goal is to have fun. The goal is also to make a game, and it sucks when a team just can’t get it together in time. Unfortunately this will happen to some teams, so I’m here to kind of help keep that from happening. So without further ado, here is a small list of thoughts and hard-learned lessons to help you out on your maiden voyage.
I’m not huge on caffeine, but here’s where you’re going to see cases of red bull and pots of coffee all over the place. I personally like to stay hydrated with tons of water, naked juice to boost my energy, and snacks high in fiber and vitamins. I’ll also go through about 6-7 red bulls. That’s just me. You can also get by fine on Bawls, tasty cakes, and bugles, but don’t blame me if you’re feeling gross and your body starts producing neon waste after the 24 hour mark. I also advise that the team at least once physically remove themselves from their chairs, and go for a walk to a nearby eatery. First off, breaking bread together is just great teaming. Second, everyone gets a much needed break and some decent hot food. If you aren’t jamming next to a place to eat, consider ordering delivery and eating in a location where you aren’t working. I go to the Game Jam in Orlando, so we have the luxury of comfortably being outside without bundling up. I know some of you may not be that lucky.
Shower before you go! You probably won’t for two days. Nobody wants you to stink.
Try to get some rest. Some people can power through for 48 hours and do fine. If you’re one of those people, then good for you. I can be, depending on my mood. I recommend getting some sleep around the 30 hour mark. Maybe 4 or 5 hours. I knew a guy that refused to sleep and around hour 40 started wandering around aimlessly before falling asleep in the cupboard. Fun times. If you don’t sleep, take a break. When I do a Game jam, I get up and go outside for ten minutes every hour. Keeps my mind sharp, keeps my limbs moving, and keeps my energy up.
What should I bring?
– Your rig, obviously, with any spare stuff you can afford to lug. People are always forgetting cables, headphones, mouse pads – stupid little stuff.
– Drinks and snacks for you, plus room for it to get mooched on. Don’t be the guy that brings nothing, but don’t be the guy that’s a tightwad with the snacks when the less prepared run out. You’re all in this together, after all.
– Pillow, blanket, bedroll. You’ll likely be sleeping on the floor, so do what you can to make that a better experience for you.
– Change of unmentionables, fresh t-shirt, overshirt, and maybe a sweatshirt or hoodie if you want.
– Toothbrush, toothpaste, deodorant, meds, etc.
– Your talent!
Well programmer, artist, and audio engineer seem pretty self explanatory, but the designer is a little harder to define. As much as it pains me to say, a designer’s talents aren’t optimal for a game jam, but they can still be super useful. As a designer, I do design work, but I also step into a producer role, a runner role, and an “oh my god we need three more artists and we have ten hours go find them” roll.
I wouldn’t advise for a team to take on more than one designer, unless you’re working in an engine like UDK or Unity, and all the programming is already done. Just remember designers, it’s not that we’re not useful, it’s that a Game jam isn’t a nurturing environment for us to really get going. Don’t believe me? That’s fine. Just do the game jam before you get on the comments section and call me an idiot.
Making the Game
You’ve got your team. You’ve got your red bull. The coordinator has announced the theme. Here’s some advice. Pick a simple game idea, with one simple mechanic, and get it working. Then figure out how to get your theme to work with that. At one GGJ we went through a list of simple games like pong, asteroids, and connect four. We ended up going with an on-rails platformer where the sole mechanic was jumping. To be fair, it was for the kinect, so you could maybe get a little more complex than that if you’re not putting together a kinect game in 48 hours.
Ideally you should have your game functional and running within a few hours, then spend the rest of the time making it your own and iterating. This is advice I was given for my first game jam by a very smart person. It is really a winning way to ensure you get a game done.
Well that’s it! If anyone out there has any more advice, add it in the comments! Good luck and happy jamming!
My wife and I just had our first child. While our daughter was baking in my wife’s belly, we would talk about what kinds of video games she would like to play when she grew up or if she would wind up liking them at all. I thought long and hard about what games I would want her to play. Which games in my library would I leave on the table for her to discover, and at what ages? What I’ve been looking for are games that teach morals and lessons, particularly ones that do so in a way that cannot be done in other media. A game puts the audience in control, which brings a high level of teaching possibilities to the table.
Aesop was a person who may or may not have existed, but Aesop’s fables are well known. Even if you’ve never heard of them, you most certainly know one of the tales. The story of The Tortoise and the Hare and The Boy Who Cried Wolf are Aesop’s fables. They’re fun stories, and are great for children because they have good lessons behind them. The story is crucial because it drives the point home. You can tell a child “slow and steady wins the race” and they’ll think you’re a loony. Silly daddy, you’re supposed to go fast to win races! If you go on about the over confident hare and the determined tortoise, then you have planted the seed of knowledge and enlightened that youngster.
You can take a story with a good lesson, and smack that narrative into a game. There’s nothing wrong with that, but that’s not what I’m looking for. Instead, a game can teach through its mechanics and the choices presented to the player. This is like a lesson on steroids because the player needs to consciously make the correct decisions on their own in order to succeed (let’s pretend gamefaqs.com doesn’t exist for a moment). There is no better teaching tool than that! Think of the saying, “you can lead a horse to water but you can’t make him drink.” A horse must drink to complete a game, and if you design a game well then they will learn to drink on their own. I’m sure there’s a market for horse drinking games. Part of our art is in making that learning experience better. It’s no easy task, but this is what separates games from other art forms. This power cannot be found elsewhere.
But, with great power there must also come great responsibility!
Teaching the player how to think rather than what to think is the goal. Otherwise, you’re brainwashing, and that’s no good. There are many studies that try to prove games are great for psychological and social development, while others try to convince us that they desensitize us and encourage excessive aggression. It seems like Gamasutra.com has an article about new research every week or so. Studies that try to definitively mark games as good or bad are ridiculous, because it’s impossible to pin either side as the absolute conclusion. The power is in our hands to design a game that is healthy or harmful.
Labeling even a single game as one extreme or the other isn’t easy, either. There are few games I’ve played that have no health benefits. Those I’ve seen that are trash are found on Facebook. I don’t mean to knock Facebook games, and I have seen a number that are enjoyable and worth playing. The problem is that most of these games try to make everybody overly happy so that they play the game, and to do that they instill a false sense of accomplishment and never inflict penalties on the player. Even if they sit back and do next to nothing (they’ll probably have to hit a button), players will advance in the game. There’s nothing gained from that except wasted time. My wife calls these gerbil games because players bring their nose to the tube to get a drop of achievement water. Water is healthy, but a game is meant to have value in the way the water is obtained.
Some folks may mark violent or vulgar games as unhealthy, but I will not denounce these games. The target audience needs to acknowledges the same way medicine’s instructions and dosage are. Such games are not healthy for a young child, but nor is 1000mg of Tylenol*. They can be useful to adults as stress relief, or perhaps work as a sort of reverse physcology. As I’ve grown older, I have found myself thinking “I’m sure glad I don’t have to do this for reals” while playing war centric games. That would be an interesting research topic: can a violent games be designed to encourage people to be less violent? Regardless, I will let my little girl sticks with IRL games of cops and robbers and cute games of boyfriend+girlfriend+puppy for a good long while before letting her play adult games.
It’s not inherently bad to allow the player to make “evil” choices in a game, either. Most RPGs I’ve played recently had a good/evil meter or presented me with choices that were fairly black and white. Letting the player be a bad guy is ok. In fact, it’s the sign of a healthy game because it lets the player decide which path to take. If these games were to make it more advantageous to be a bad guy then it might be unhealthy, but the games I’ve been playing are pretty well balanced and sit in the grey area until the player starts to make decisions. That’s a good spot for games with moral meters to aim for, the neutral bull’s eye. If instead they were to lead the player to one side or the other, then they would be telling the player what to think. Having the world react reasonably to their decisions gives them the ability to decide how to proceed on their own. That makes a beautiful game.
But back to my task…I need to find a few games now that I want to store away so my daughter can play later. Here’s a few of the games I’ve picked out for my daughter, along with the lesson I think it teaches. Mind you that it’s going to be a few years before I let her play most of these.
Demon’s Souls – always keep your guard up
There were a few points early on in that game where I was reamed and killed with one or two shots from a sneaky demon because I was strolling around observing my surroundings with my shield and sword by my side. I learned quick. Any player who treads new territory without holding R1 is a fool. The lessons I learned in this game stayed with me while I played the sequel, Dark Souls, and I was better for it. This is generally good advice for somebody who is about to embark on their own adventures in the world: stay on your toes and don’t leave yourself vulnerable.
Pixel Junk Monsters – Time not dancing is time wasted
In this game, you build towers to kill dudes who are coming to eat your babies. If you stand in an area occupied by a tower, you dance to give that tower experience so it can be upgraded. If you’re sitting in the middle of nowhere, you’re wasting valuable dancing time that can be strengthening your towers (unless you’re dealing with the hive tower, but you shouldn’t be standing away from a tower for long). And who doesn’t love dancing? It’s fun, good exercise, and you don’t even have to be good at it for those two features to hold. If you are not enjoying what you’re doing, you’re wasting your time.
Resident Evil – Choose your battles
You have two shotgun shells, five 9mm bullets, and no green herbs. You walk up a set of stairs, see a zombie staring at a wall in a far corner of the room. There’s two other zombies doing the same in a hallway you need to travel, and you know that the door on the other end of that hallway is a door that leads outside. There are probably hunters outside, and they are mean sons of guns. That first zombie can stand there all the doo dah day. He’s not going to bother you. The other two zombies are slow, and you can weave through them no problem. Ignore them, because those two shells will likely be just enough to keep the hunter at bay while you dart through the garden. It’s just not worth taking on every challenge full force, and sometimes you just have to ignore them. Save your energy for the bigger challenges that really matter.
Mega Man – Practice makes perfect
I dare say that in every Mega Man level, something will kill you without warning on your first time through. The game is designed that way. There are some surprises that are meant to knock you down, and you just have to learn where they are and be ready for them next time. Each time you die, you try again and aim to get just a little bit further. Eventually, you build the muscle memory to get through the levels and you can almost perform them without thinking about it or maybe even without looking at the screen. Repeat something enough times, and you will become an expert.
Once Upon a Monster – ???
I don’t know if there’s a main lesson in this game, I haven’t played it yet. But I will get this game because it requires two players, a parent and a child, and puts them together in an ultra co-op mode. In many cooperative games, you can get through with another player without ever really interacting with them. You can just play alongside them (excluding the harder difficulty modes). But Once Upon A Monster naturally has you play together. It’s beautiful really. I can’t believe this game would fail to impress me, because Tim Schafer is dreamy and everything that comes from Double Fine is great.
Braid – ???
I have a tough time pinning a lesson on this one. I’m fascinated by this game because it tells the story through the game mechanics, and that’s just awesome. But, it’s also very abstract and that means its moral can change depending on how you interpret the game. I myself thought Tim was a young man trying to make his mark in the world, and the princess was a metaphor for The Big City. Others thought it was a nuclear bomb. Whatever it is, this game is a shining example of the power game designers wield, and how to use it for great justice. If my daughter is a gamer, she will play this game.
This is only the top of my list, there are many more. I hope these help show how both core game mechanics and tiny details can be used to teach a lesson.
* I am not a doctor. If a doctor tells you that your child needs this dosage of Tylenol, do not cite me as an argument against it.
This post is going to be a little different to my usual posts, as it’s going to be more akin to how I write a document for a mechanic. The mechanic in question is a challenge I set myself: try and design a touch based joystick that, in a single stick, provides the functionality that usually requires two. I’ve decided to call this task “Single Joystick”.
Read on to see how I went about finding out if such a this is possible…
For lots of types of games, touch screens are a fantastic input device. They currently don’t offer any sense of tactile response, though I’m sure that’s coming in time. Today, the games which are most successful on our phones and tablets are ones that use touch screens to their advantage. There is demand, however, to put games that have been very successful on PC and console straight onto our phones and tablets; by which I refer to first person and third person action games.
To date, this has often been done by drawing two virtual joysticks on the screen, one in each corner. These react in a similar fashion to how the physical joysticks do on a traditional console controller, with the left stick controlling XY movement and the right stick controlling rotation and looking up and down.
This approach has two main flaws:
The amount of screen space required for the joysticks
To hold the device so you can use both thumbs, you effectively remove the ability to use any other fingers at the same time.
In addition, such approaches:
Assumes that the user is familiar with twin joystick controls from console games, which requires a significant amount of skill and dexterity.
Often does not offer support for left handed players
Does not offer support for gamers with reduced mobility
I think these are all fairly well known, but it’s still an accepted approach because there doesn’t seem to be a better alternative.
Or is there?
The initial concept is to combine moving and rotating into a single joystick. This is something that is only possible on a touch-based device, as the user can be very precise about exactly where they are touching the screen.
The joystick is made up of 3 core elements:
The move gizmo
The rotate gizmo
The nub graphic
Arranged as such:
The Move Gizmo
The move gizmo works the same as in an ordinary two-stick system:
The centre of the graphic is stored as (x,y).
The radius of the gizmo is known (stored as a variable, InnerRadius, to allow for tweaking)
When the user touches the screen, a check is done to ensure they are inside the move graphic.
If they are, then the touch location is stored as (x1, y1):
The amount to move the player by is simply calculated by:
Position.x = (x1 – x) / InnerRadius
Position.y = (y1 – y) / InnerRadius
This returns a value between 0 – 1, which gets applied directly to the player movement code per frame, where a multiplier is added as a scalar to allow for faster movement if required.
Because of the size of the stick, there is unlikely to be any need to apply an acceleration curve to this movement. There may be a need to implement a dead zone, to be decided in testing.
The Rotate Gizmo
The rotate gizmo fully encompasses the move gizmo, and has an internal size stored as the variable OuterRadius. The rotate gizmo is only active when the user’s touch position is between InnerRadius and OuterRadius.
To calculate the rotation amount, the gizmo works off angles rather than absolute location of the touch. This is very different to how rotate joysticks usually work.
At the point where the user’s touch enters the rotate gizmo, the position is stored and a vector is calculated from that position back to the centre of the joystick (x, y):
The user is now required to keep their touch within the rotation gizmo, and the position they move to creates an additional vector, current vector. The angle, θ, between this new vector and the original determines how much the user rotates per frame:
If the user rotates clockwise past the initial vector then they turn clockwise, and likewise turning anti-clockwise past the initial vector turns them that way.
There may need to be a maximum rotation speed, to be determined with testing.
If the user’s touch moves outside of the OuterRadius then the joystick deactivates and resets.
If they move their touch back inside the move gizmo, the rotation stops and movement resumes from where the updated touch resides.
Releasing the touch or moving outside of OuterRadius stops all movement and rotation, and resets the joystick to its initial phase.
If the user’s initial touch is within the rotate gizmo then the user can look around on the spot.
The key to Single Joystick is this:
If the user starts touching inside the move gizmo and then moves into the rotation gizmo, (x1,y1) remains at the point that they ‘pierced’ the rotation gizmo. This allows for circle strafing on a single touch.
This is just a simple graphic that moves to reflect the current touch position, assuming the user is inside the OuterRadius.
The one downside of the Single Joystick is that it doesn’t have any support for controlling vertical look. There are several possible solutions to this by using additional touches or lock-ons, but for initial prototyping a simple height check slightly in front of the player camera (2m) is performed. If the check is lower than the player height then make the camera look up, and likewise look down if it is higher:
Testing the theory
Writing a game mechanic requires a leap of imagination and, for me, often involves a great degree of holding the input device, closing my eyes and moving my fingers trying to imagine myself playing the game.
This is great, and helps iron out any major flaws with a specification. But nothing beats actually playing it.
As I’m currently freelance, access to programmers is limited. However, access to game engines isn’t: especially with Unity available for free. I already had a licence for iOS deployment, and once registered as an Apple developer I could very quickly build projects and get them running on my iPad. Note: this is not to say the mechanic is only devised for Apple devices, but purely to say that’s what I had to hand and thus it made sense to use it.
So, here’s a prototype of this mechanic running. The stuttering is due to my capture method off my iPad, rather than framerate – as you’d hope / expect, it runs at a solid 60fps currently.
As you can probably see, the concept works to a decent degree but isn’t yet completely robust. I’ve been playing with this for about a week now, tweaking bits here and there. If you’ve read everything above, you’ll notice no mention of the icon that lights up when the touch is inside the rotate gizmo: that came about simply because you can’t see the nub (or, in fact, half of the background) when you’re actually touching it.
There’s quite a few more improvements to make, but I thought that this project had hit a point where I should write about it and see if anyone else has any feedback. I’ve tested it on a few people, with varying degrees of success – everyone needs to be told how it works, so at the ‘intuitive’ point from the brief it’s not quite there yet.
I’ll hopefully do a follow up post in a few weeks with improvements I’ve made. For now though, hopefully I’ve started to set designers everywhere a challenge: find a way to make touch screen joysticks better.
In June 2011 I wrote an article called Social Media Cafe, discussing similar thoughts with 18 months worth of additional future taken into account. Parts of what I discussed in the original article still hold true, and I elaborated upon them in my talk. This article is an amalgamation of the original article, the talk, and a few more bits that I realised I could have discussed at the time.
Before reading on, please understand that my definition of the AAA gaming model is thus:
A game that you go to your favourite store to buy for £45 / $60, take home and play on a console or PC in the comfort of your own home. You expect that there’s a single player component that will last you at least 8 hours, if not quite a bit more, and a multiplayer component that will be polished and fun.
With that in mind:
Is AAA is dead?
Eighteen months or so ago, this wouldn’t have really even been considered. There were signs that the model was struggling, but sales were still plenty high enough on the big hits of the year and there were plenty of rumours that Sony and Microsoft were working away on the next consoles – a sure fire way to inject new life into the fire.
These are averages – naturally there are games that go against the grain, both up and down. If we take the middle-of-the-road for all of these, it took 19 man years to make a PlayStation 1 game, back in 1995. Fast forward to 2001 and it took 124 years to make a PlayStation 2 game. Today, it takes 420 man years. That’s 22 times longer than it took in 1995, yet games still cost £45 / $60 at retail. Thanks to mobile gaming, people are starting to become unwilling to pay £45, even though in real terms they’re cheaper than ever. In fact, people don’t even want to pay 69p – a lot of people expect entertainment for free. Currently, no one expects Assassin’s Creed III on their mobile phone for 69p, but, as the speed of mobile phones increases, so do customer expectations.
The number of copies you’d need to sell at 69p to make a profit on a game that’s taken 420 man years to make is astronomical, and highly unlikely to happen. Something has to change.
Technology will save us
The two most time consuming elements of making a AAA game are making the game engine and then creating the content to go in. A modern day game engine has a lot of boxes to tick:
Texture and Geometry Streaming
Online Multiplayer Support
Blended Animation System
Rigid Body Physics and IK Solutions
Full Body Rig
SSAO (Screen Space Ambient Occlusion)
Not all of these boxes have to be ticked to make a game, but to get anywhere near the visual quality expected by the audience and gaming press your engine is going to have to do a lot. Technical accomplishments will only get you so far of course – your game needs solid art direction and high quality assets, so you’ll also have to spend a lot of money on high calibre artists, animators and sound designers. When so much money is being spent, it’s rare for a team to be afforded the ability to experiment too much with game mechanics: instead it’s safer to tread the well worn path that successful games have already laid.
As a games designer, this feels wrong to me. Thankfully, it feels that the tide is turning.
This power starts to give game makers a little bit of breathing space, because it begins to reduce the requirement to squeeze every last ounce of processing power out of the hardware to get the same results. That, in turn, gives you the ability to make more use of pre-written software libraries. In the past, these might have been avoided or rewritten to be tailored specifically to your exact needs and any additional code removed. As well as software libraries, CPUs and GPUs continue to advance and provide specific processing units for performing some of the heavy work on the chips themselves, such as physics, and this frees up valuable coding time down the line.
In addition to on-chip improvements, GameStick and a handful of others, and that’s before even considering that the Wii U is only just out and Microsoft and Sony might have something new this year too. That’s a lot of potential fragmentation, and I’ve not even mentioned mobile phones or tablets…
How about, instead of buying a specific device to play games on, you just run the platform of your choice on whatever you have to hand. Think of something like DirectX, but imagine it as a whole console layer. Imagine if you just wrote your game for Steam, and let the APIs, libraries and protocols do everything else to make sure that it runs on the device in your hand, from providing the input layer to rendering the graphics. This is a few years ahead, but I think it will happen. For instance, it wouldn’t matter how many buttons a device has, as long as it adheres to the interface protocol. That layer may be physical buttons, a touch screen, a motion sensor or something else entirely. The device would deal with how the user interacts with it, and push that information to the game as a series of standard inputs.
This might sound slightly ridiculous, but this is already how browsing the internet works. The websites you visit don’t know if you’re using a mouse, a touch screen or a TV remote. They don’t need to: the browser on your device deals with the input layer, and also does all the rendering of the data that gets sent back. Could this be a future for game engines too?
Shorter term, asset creation is going to benefit greatly from more computing power. As with the engine, the requirement to optimise a model to within an inch of its life is reduced if there’s more processing power and memory available. Equally, as engines continue to become more sophisticated, they can offer perfectly acceptable optimisation of models on the fly. The requirement to create multiple LODs reduces and, soon, should disappear. This will save a lot of time.
In addition to this, the tools that create the content will continue to improve. It makes full financial sense: if you put resources into better tools, you need fewer people using them. If, for instance, six coders working on tools could reduce your art team by twenty, surely that’s the best thing to do?
The ability to scan objects in real time and generate models is becoming a reality. Faceshop for Photoshop can take a 2D image and create a 3D head from it. The results aren’t professional quality yet, but in time tools like this will get better and better.
Finally, the way we interact with computers is constantly evolving. There are a PaperTab and having a tool turn that into 3D for you.
With all these developments, and many more, combined:
Gameplay becomes king
If development teams aren’t focused on ticking engine feature boxes, and art teams can produce high quality art in a fraction of the time currently required, then the focus will hopefully shift more onto just making great games. This has already been kickstarted by the mobile and independent scene, and it’s where AAA development is heading. But wait a minute… didn’t we say that AAA might be dead?
Well, yes and no. There will always be a market for high budget entertainment, and there will be developers that will cater for that. They may have to seek a different funding model, possibly a combination of a kickstarter campaign, a traditional publisher deal and in-app purchases. With development cycles being shorter and it being sold as purely a digital download, it should be possible to sell a game for less and still make a profit. See the Steam model.
Will technology have an impact on the type of gameplay? Motion controllers and Kinect opened the door to different types of gameplay interaction, and it’s hard not to assume that new interfaces will bring new gameplay experiences. New controllers are great, but inherently create fragmentation. If you look at mobile games, the ones that are successful aren’t necessarily breaking new gameplay ground. In fact, if anything, they’re relying quite heavily on paradigms that made games successful in the 1980s and 1990s. They are very highly polished, and very well defined – distilled almost down to a few core mechanics. Interestingly, too, is that mobile and independent games often offer a greater challenge than AAA games. Getting 3 stars on every level in Angry Birds is not easy at all, yet people who can’t finish the first mission in Halo will happily sit there for hours until they get them. I still haven’t managed to complete a game of Faster Than Light, but I’m having a lot of fun trying. I could list 50 such examples, but this article is already far longer than I originally intended.
The point I’m trying to make here is that there will be a meeting point of polished gameplay experience that looks as good as the top budget games of today: but for a fraction of the development cost. At the point that it doesn’t cost tens of millions to make Call of Duty, people will have room to take bigger risks with the gameplay.
Wrapping it up
Quite a bit has been made of Project Glass (aka, Google Glasses), it’s not hard to imagine that you could be playing games all the time, as you walk down the street or go shopping.
The technology to synchronise data automatically between devices is already with us, as is the ability to connect your mobile phone up to your TV – effectively turning it into a Wii U controller (iPhones achieve this via Apple TV, whereas other manufactures are looking to incorporate Intel’s WiDi protocols).
All of this means that we’ll be able to play games wherever we are, whenever we want. Whether or not that’s a good thing… I’m not sure because it doesn’t take into account why we play games. Partly we play them for a distraction, a way of turning the mundane into something more. But one of the biggest pleasures of any leisure activity is making time for it. You may be meant to be doing something else, but you’ve decided that for the next few hours you’re going to play a game. This is important, and isn’t going to go away.
The great thing is, there’ll be a huge amount of great games for you to play on whatever you’ve got to hand.
Wow, it’s been a long time since I’ve posted to AltDevBlogADay! Life has been massively crazy for the past six months or so, and I’m nearing the end of my time in school. In almost 30 days, I will be a college graduate! In the midst of our final project sprint, I was asked by a friend of mine if I ever thought about doing a blog post about networking.
Now, some of you may be wondering who I am to tell you about networking, to whit I like to reference Hitchhikers Guide to the Galaxy by saying “I’m just this guy, you know?”.
In my three years as a student, designer, contractor, and employee, I have picked up a few tips and tricks that may or may not appear to be common sense to you. Yet I consistently get people coming to me saying how outgoing I am, or how it’s insane how much I network, and I’m here to tell you a dirty secret. Networking, to me, is one of the hardest things I have ever done.
I’m actually a pretty huge introvert when left to my own devices, so the physical and mental act of getting out there and meeting people is just daunting. I share this with you because maybe you’re the same way, and feel like I’m being too casual with my advice, but the plain and simple fact is, Network and you will make friends and reap dividends. I have no advice for the introvert short of “get over it and do it”, because that’s how I pull it off. But enough about me, let’s go over some networking tips. This first part will be about your online presence, and some best practices for both online and in person, and then the next part will be about in person and online follow-ups!
Rule #1: Think Before You Post
So we all know that our online presence is a huge deal nowadays. Make one off-color comment that has the potential to be misconstrued, and you’re hosed. An actual example I saw a few months ago comes to mind.
Designer A shares a picture he thinks is funny on social media. Designer B thinks it’s tacky and wrong. Designer B loses respect for Designer A. Designer B will remember that if he is ever in a position to hire Designer A.
Over a simple laugh, Designer A is potentially out a contact, a positive relationship with an acquaintance, and a gig. Awful, yeah? Well it happens all the time.
It may be common knowledge, but I must say it. Think before you post.
Rule #2: Get Your Own Dot Com (And Maintain It!)
This is probably the hardest piece of advice I can give, because maintaining your site can be a pain in the butt. I could go on about your site for an entire post so for brevity I’ll try and boil it down into a few bullet points.
Make the URL easy to type and relevant. Your name is always a good bet, provided it isn’t far out in how it’s spelled.
Don’t put up your Works in progress. A recruiter may only look at your resume for 30 seconds. Do you want them to see polished content, or half finished content? Worse, do you want them to see half finished content that they don’t read as WIP, and assume that it’s your polished content? **shudder**
Put your contact info on every page. EVERY. PAGE. That’s name, number, email address. I know that some people like to break up their address as “my name at domain dot com” to thwart spammers, but come on. Again, people looking at your site have a lot of stuff to look at. Let them click on your email address, and have it come up in outlook. The less energy they exert to contact you, the better your chances.
Have a tab for your resume. In that tab put your resume down online in plain text, and then provide download links for your resume in both Word and PDF. Give them a choice in how they can view it.
Update it. All the time. Think your site is good enough? It isn’t. Tweak it. Tweak it again. Never stop being great.
Finally, there is an amazing keynote from GDC by Jacob Minkoff from Naughty Dog. It is hands down the best 50 minutes you will ever spend on your portfolio. Watch it, learn from it, and follow it.
Rule #3: Social Media is a Tool Chest.
A lot of people use social media in a blanket way. Maybe Programmer A uses every account they have to share lolcats. Maybe Programmer B uses every account to be political. In my opinion, that’s paying a disservice to the strengths and weaknesses of each type of social media. Below is a small list of my social accounts, and how I handle them.
Twitter is how I make new friends. I try to be interesting, share relevant and fun “geek” links, and get into thoughtful and informative discussions. I can approach anyone I want on Twitter, and be seen. When I post to Twitter, I am posting to an audience of devs I don’t know, recruiters, colleagues, and friends. I am still myself. I still curse a bit. I am still opinionated, but I mold it for a certain audience. Everyone I meet at a convention also gets followed on Twitter, provided it’s on their business card.
Facebook is my next tier of friends. In Facebook you get a glimpse into more of my private life, my photos, my politics, and my overall thoughts. In here lurk family, longtime friends since childhood, and colleagues. If I add you on Facebook it means that we have had numerous conversations, and we both seem to agree that we are rather friendly. Sometimes I will make an exception and add someone on Facebook cold, if they don’t have Twitter and I think they are an especially cool cat.
Here I keep every single thing I’ve ever done professionally. I keep it current, and tweak it bi-weekly. I connect with anyone that has similar interest to me, and I likewise get the same connection requests from others. I am constantly expanding my network and meeting folks. I also hook my Twitter feed up to LinkedIn.
LinkedIn has a highly underused tool for making connections. I use it all the time. If I see someone I want to be connected with that’s out of my network, I’ll find a friend that is connected, and ask for a recommendation. Here’s the thing, LinkedIn is for one thing and one thing only. Networking. Don’t feel like you’re being ruthless by pointedly networking. The only caveat I can really add is make sure you don’t try and jump too far out of your area when asking for connections. For instance, I wouldn’t ask my buddies at Ubisoft for a connection with a CEO or something, because for one it’s not relevant, and for another it’s level-jumping, and I would be putting my friends in the awkward position of saying no, or feeling uncomfortable and doing it anyway. You never ever want to make anyone feel uncomfortable. Ever. With that in mind, I’ve gotten tons of great contacts just by asking for an introduction. Likewise, I am constantly recommending contacts (but more on that in a bit).
Klout is a great site that hooks up to your various social media and tells you, in a numerical way, how influential you are within your circle on a number of topics. It’s a great site to check out if you’re interested in seeing what sort of footprint you’re leaving on the internet. If your biggest sphere of influence is Vintage French Nude Lithographs, then maybe you need to reassess. Or not. That’s actually kind of awesome.
So that’s social media. You don’t have to follow my template, but remember that each site is a tool that can and must be used differently to be effective. Finally let’s look at a rule that bridges the gap of online and real life networking.
Rule #4: Don’t Be Selfish.
I mentioned earlier in the LinkedIn section about recommending contacts, and it’s so important that I thought I’d give it its own section. This is good for both online and in real life, so take heed.
If you are to become a crazy whirling dervish of networking, you’ve gotta spread the love. You have to share. If you don’t pay it forward, then it stops with you and doesn’t go any further. That’s no good for anyone, and is just plain selfish. When you see two people with common interests, introduce them! There is a classic method of introduction which is a bit formal, but I absolutely love. It goes like this:
*Talking with Artist A, when Artist B walks up*
Me: Oh, hey Artist B! Have you met Artist A?
Artist B: No I haven’t.
Me: Really? Well let me introduce you. This is Artist A. Artist A is an Environmental Artist at Treyarch. Artist A, this is Artist B. Artist B is a Concept Artist at Epic. Now, Artist A and I were just talking about (Blank), what do you think, Artist B?
Boom! Introduction! What you have done is repeated names at least twice, given relevant information, aligned interests, and included everyone in the conversation. Now gently steer the convo until you feel you are no longer needed, then excuse yourself. You have just connected two professionals, and potentially started a long and healthy acquaintanceship.
The thing is, you should want to get your friends gigs. Your friends should want to get you gigs. If you hear about something that isn’t up your alley, pass it on to a buddy. Furthermore, don’t be a mercenary cock. There’s an awesome studio that a few of my friends have been INTENSELY courting for the longest time. I would love to work there, but why would I try to? First off, I don’t have the relationship these guys have built. It would be a waste of my energy with so many places out there. Second, it’s just a dick move. Let them get the gig unobstructed. Getting a gig is hard enough without your friends pulling a fast one. Besides, once your friend gets in, he can try and help you out. Win/Win. Now, if that same studio comes to YOU and says they want to interview you, for the love of god don’t turn it down. All bets are off at that point.
Come back later for my next part, where I talk about networking in person, and how it folds back to the interwebs!