SPLAT DEATH SALAD blog post, SPECIAL MAKING-OF EDITION!
Posted: June 30, 2012 Filed under: Uncategorized 13 Comments »— GAME: —
so I made a a game for 7DFPS called ‘SPLAT DEATH SALAD’, it’s a multiplayer unity game, and if you’d like to give it a go, head here and tell your friends to join you :).
— MAKING-OF: —
So a few people have asked me to cover how I went about doing the networking in unity and I said I’d make a post explaining it. it’s one of those issues that is a little tricky to get your head around in one go, so a lot of people (including myself) have put off learning it. but I set aside a week before the 7DFPS event to do just that, and it’s really not as scary as it seems. so here goes some talking about that!
The first thing to know is that the unity documentation covers everything you actually need, that’s kind of what it’s there for.
you should probably go ahead and bookmark this page right now 🙂
also, you’re welcome to look at the latest source for the game, or even the earliest backup I have of working networking if you want less clutter.
so then, the thing that often scares people off is NAT punchthrough, partly because anyone who is familiar with network gaming knows it’s a problem, and partly because the unity docs talk about it at some length. but there really isn’t any need to be scared, since unity takes care of it. here’s the code I use to initialise a server:
bool useNat = !Network.HavePublicAddress();Network.InitializeServer(32, 25000, useNat);
not exactly a nightmare is it? and a little after that OnServerInitialized() will fire (assuming no errors). it’s at this point we can register our server with unity’s master server so other clients can find us (fyi; the unity master server is free to use for any and all unity projects).
void OnServerInitialized() {MasterServer.RegisterHost("name clients search for", "server's game name", "comment");}
there, that’s a client set up! that’s one half of getting players connected down, the other half is getting a client to connect to that server. this is pretty much just as easy, first we ask the master server for a list of available servers to connect to:
HostData[] hostData = MasterServer.PollHostList();
we display this info to the user and let them pick a host from the list, then connect like so;
Network.Connect(hostData[selectedHostIndex], "password string");
and after that, OnConnectedToServer() will fire (again, we’re assuming no errors). at this point, we have 2 (or more) players connected across the internet. yay! as you can see, it really isn’t anything to be afraid of. I had laid out a week to explore this stuff, but I had the basics covered in about an hour without much difficulty. I just needed to get stuck in and stop dilly-dallying (like most all game-dev problems really!)
before I go onto how to get these players talking now that they are connected, I just want to point out it’s important to make sure you disconnect when players quit the game, something like;
void OnApplicationQuit(){if (connected){if (Network.isServer) MasterServer.UnregisterHost();Network.Disconnect();}}
Ok, for sending information between players, I use RPCs (Remote Procedure Calls), this is one of 2 ways of sharing information between players, the other is State Synchronisation. but I’ve not tried that, RPCs were enough for me 🙂
RPCs basically work like function calls, you say “Run this function”, pass it some parameters, along with just who should run the function, and then the function is run for everyone who gets it. here’s an example:
networkView.RPC("LogMessage", RPCMode.All, "Hello World!");
what this does is tells everyone connected (because the RPCMode is ‘All’) to run the LogMessage() function, and pass it the string “Hello World!” as a parameter. so if everyone has a function set up that looks like;
[RPC]void LogMessage(string msg){Debug.Log( msg );}
then everyone connected will get “Hello World!” printed to their output log. oh, and the [RPC] is specifically a C# thing to make it so the function can be fired by RPC calls, for javascript I think it’s @RPC instead.
you can send a bunch of different things in RPCs; strings, floats, ints, Vector3s (maybe more types, I forget!). and AFAIK you can send as many parameters as you like too. so I use them for everything, players requesting match information from server, server providing match information, announcing that a player fired a bullet along with where, what type of weapon and what direction. I even use it for players to say where they are, where they are looking, what direction they are moving in etc.
it’s important to know that some of the RPCModes are buffered, that means if you send a buffered RPC call, it will be called for everyone who connects, even if they connect *after* the player who sent the call has disconnected. this can be pretty useful in some cases, I use it so players joining and leaving announce their information (avatar styles, player name), so whenever anyone joins they see all the players who are already connected without having to ask the server with their own RPC call.
that’s more or less it I think, obviously there’s more advanced stuff you can learn, but you can make a game with this stuff so it’s plenty, and if you want more you already bookmarked the networking part of the unity manual right? 😉
Stop being such an asshole to people who don’t start from scratch
Posted: June 15, 2012 Filed under: Uncategorized 67 Comments »I make games, lots of us do these days. and we are crazy productive too. mostly because we have tools that make it easier than it used to be.
some people like to imply that those of us who use easy tools are less skilled, or lazy. and in some cases that our games are less valuable because of it.
some people are assholes. and should shut the fuck up.
I won’t pretend I can’t relate to these assholes, back before I learnt how to make games, I was really passionate about my 3D art (it was originally my intention to never program at all, I was all about the visual art) I hung out on deviantArt and shared my work and it was cool. but then tools appeared that made certain things easier; poser, terragen and similar software let people make 3D models without even requiring an understanding of the 3D building blocks; faces, vertices etc.
I was seriously miffed, I had worked crazy hard to make character models, and these people had the nerve to submit poser models alongside mine as though they were equal? it wasn’t right, it wasn’t fair. I had worked hard and these people had barely worked at all.
Ladies and Gentlemen, if you find yourself thinking like this you are an asshole, and you are in the middle of a tantrum.
my particular tantrum lasted a few years. it gradually waned as I matured and gained more experience doing 3D art (both the hard way and the easy way). Ultimately I eventually realised, my prejudice against people doing things the easy way was a combination of petty jealousy, and a fundamental misunderstanding of what was important about my work.
The jealousy is understandable, it’s ugly but it makes sense. other people had similar or better results and didn’t have to struggle as I had.
The misunderstanding is where I really let myself down; in learning to make 3D, I had forgotten what was important to me when I started out in the first place. The actual process of crafting a 3D model was a skill that took effort to develop, and it’s a skill that I took a lot of pride in (and still do). I let that pride get in the way of what I developed the skills for in the first place; to realise my vision.
I had spent so much time amongst all the vertices and UV co-ordinates I couldn’t see past them on this issue. The people using poser were simply realising their vision, as I was trying to do.
I had assumed that because the skills required to do things my way weren’t required for people doing things the easier way, they weren’t as skilled and their work wasn’t as valuable as a result. I was an idiot for thinking it, and I was an asshole every time I voiced my opinion on the subject.
I’m going to say something, and it might blow some people’s minds, so prepare yourself;
THE AMOUNT OF EFFORT REQUIRED TO CREATE SOMETHING, HAS NO BEARING AT ALL ON THE VALUE OF WHAT YOU CREATE
just because something is hard to make doesn’t mean it is good, and likewise just because something is easy to make doesn’t mean it is bad.
for creations that require great effort, dedication and/or skill; we admire the creators. their acts are impressive. but if they could accomplish the same vision without so much strain, and don’t, these creators are fucking morons. and if they insist everyone else do things the hard way when it isn’t necessary, they are assholes too.
Personally, I use Unity. it’s a game engine and editor that has been put together, it saves me a ton of time. I don’t need to program a renderer for every game I make, I don’t need to study any particular model of physics to add collisions to a game, I DON’T NEED TO SPEND YEARS OF WORK TO BUILD SOMETHING THAT, WITH UNITY, I CAN MAKE IN HOURS.
I could make my own game engine if I wanted, I spent enough time in computing lessons, I dabbled with C++ enough to have a healthy appreciation of pointers and memory allocation. but why should I fuck with all that stuff if I don’t have to? I’ve written down hundreds of game ideas in my life, but at no point have I ever added “needs to be coded using <blah>, otherwise the game won’t be fun” Â to a design doc.
is there value in writing things yourself? yes, but it’s value for you, your experience of creation. you have a more intimate connection to what you are doing. but I don’t make games to feel connected to my code,
I MAKE GAMES BECAUSE I FUCKING WANT TO MAKE GAMES
I use unity because whilst it may be easy, it does not limit my vision at all. I love Unity, it has been great for me personally and professionally. but I would drop the bitch in a heartbeat if I wanted to make a game and unity was holding me back, I’d grab the gnarliest, most unwieldy, abstract piece of shit tool available if it was the only way to make what I wanted.
it’s stupid to encourage people to do things the hard way if their creative vision isn’t hampered by simpler tools, if you do that it makes you an asshole.
But what really pisses me off? people who do this are turning newbies away from making games. or at the very least making our community less than 100% comfortable and welcoming for them. people starting out should be able to use whatever the hell they want, I like to suggest they try everything they can get their hands on, different tools are good for different jobs after all.
These people, starting out with a vision (even if it’s just to try something little and have a go) don’t need to see you being a prejudiced asshole. at best you are making their day worse without good reason, at worst you are giving people a reason to give up.
So, I’m pretty much out of points to make, I could go on swearing a bit more on the topic for some time, but I think you get the idea. There’s nothing wrong with doing things the easy way if it’s going to help you create what you want to create. and there’s nothing wrong with doing things the hard way if it helps you do things you want to do. If someone complains that they are limited by their tools, offer them an alternative by all means, but if they are happy with their tools and their creative output, don’t criticise them for their choice of tool, it’s an asshole move.
~~~~
Edit: “if they could accomplish the same vision without so much strain, and don’t, these creators are fucking morons.” – I wasn’t clear here, if you want to create something difficult when you don’t have to, I consider that part of ‘your vision’. you’re welcome to make your stuff however you like. it’s not my place to tell you what to do, especially in a post telling you not to do that to others. sorry if I offended anyone with this (not sorry at all if I offended anyone with the rest of it though 😉 )
Adventures in teaching wordpress tricks
Posted: April 1, 2012 Filed under: Misc Crap, Uncategorized 3 Comments »so I’ve managed to get wordpress to build a list of games from blog posts in my ‘games’ category, here’s how!
first of all, everything here is based off of this, I suck at php and wordpress and my system is just a mod of that. so here goes!
Pirate Kart, hacked site, pixexix for mac and more!
Posted: March 1, 2012 Filed under: Uncategorized 4 Comments »so then, coolest news first, this weekend I made 16 games for pirate kart! 😀 you can play them all in the browser here, and you can download the unity source project over here. and if you have a taste for rushed, silly games (you classy person you!) you can take a look at some of the other entries here.
in other news, some robot or asshole decided to make a bunch of work for me and hacked my website! I’ve changed all my passwords now, reinstalled a few things and will finish clearing up some corners of the site I’ve wanted rid of for a while now. and if I can find the time, I’ll figure out a way to move the games page over to this wordpress blog too, since wordpress is nice.
in other other news, I have new toys! not sure if I can really talk about it, but this is a thing:
I totally got Pixexix working on OSX, it’s the number one demanded feature after .PSD support, and .PSD support is hard, SO HERE WE ARE!
Pixexix for OSX is only available for the pro version (free OSX version will be available when the software hits v0.7), and is a temporary, alpha-alpha super sketchy release, but it works (and has features the windows version doesn’t have yet!) so if you’re one of the handful of people who own pixexix and want it on your apple whatsit (and don’t mind using a half finished version), head to the download page!
Oh, also I will have the new SSX soon, if you want to add me on your sony gaming device, I’m ‘GirlFlash’ (warning, I’m goooood at SSX 😉 )
THAT IS ALL, MORE INFORMATIVE UPDATES SOON I HOPE! 😀
Halloween exchange with Dock
Posted: October 31, 2010 Filed under: Uncategorized | Tags: halloween, sketch Leave a comment »this is dock as EVA01 from neon genesis evangellion, didn’t know what to draw him as since I don’t know him all too well, at first I figured I could do him cosplaying bayonetta, whose clothes are her hair, but since this requires more hair than dock has it would be a naked dude with high-heel-guns, I figured that might be funny, but in the end I went with an evangelion costume, since, who doesn’t like evangellion?

(better plug the costume in or you'll only get 5 minutes trick-or-treating!)
you can see dock’s rendition of me in costume along with all his other halloween exchanges here, his stuff is awesome as always, I strongly recommend checking him out 🙂