A thing I have made http://www.quiet.net.nz/Games/Play/Choice
I wanted to do a step by step idea and see how I would translate that into a 2d game and what things take time and more planning than usual. It was about 2 nights work, lots of time spent on "art" and realising that planning out the game flow is really important instead of bolting extra bits on.
6 random endings, turn the key or don't. You might not die.
Showing posts with label unity. Show all posts
Showing posts with label unity. Show all posts
Wednesday, April 9, 2014
Polar Express preview
Decided to just throw some of the sandboxed work up on my site. Part of a story based game I've been kicking around for some time.
Bugs wise, yes, I know about the ejecting from the ship and that the URL has orbit and not express in it ;)
There's also terrible lighting in the first corridor in space, it's fine in the windows version, so some research to do.
http://www.quiet.net.nz/Games/Play/PolarOrbit
Tried making this in Unreal Engine 4 but gosh I'm bad at level design (as you will see I'm also bad at programmer art and such). UE4 is a fantastic tool though, good work Epic.
Bugs wise, yes, I know about the ejecting from the ship and that the URL has orbit and not express in it ;)
There's also terrible lighting in the first corridor in space, it's fine in the windows version, so some research to do.
http://www.quiet.net.nz/Games/Play/PolarOrbit
Tried making this in Unreal Engine 4 but gosh I'm bad at level design (as you will see I'm also bad at programmer art and such). UE4 is a fantastic tool though, good work Epic.
Tuesday, March 25, 2014
Networking and player owned object spawning
I keep having to drop back to basics with networking. I always try some bastardised version of authoritative and client server from grabbing snippets here and there, then confusing who owns what and how the clients behave.
Right, to put it down step by step for myself later; simple server creation via Network.InitializeServer and spawning of the server players prefab under OnServerInitialized. When a player connects, I notice it in OnPlayerConnected but do not spawn the players prefab here (my previous shots made this player owned by the server, which caused me confusion wrangling the items later on. I did have it working, but it was muddled in my head and seemed overly complicated for what I wanted)
Instead, spawn the player in OnConnectedToServer so that there is a clear separation of client/server making the scripting classes easier to read and use.
Now, I use a base class for all other items that need to exist or move relative to the origin based camera. All it does is toggle the render flags on the objects attached and stores a "relative to origin" vector3. When a player spawns, say, a radar satellite, it needs to be grabbed by the other players application and rendered in the right place.
And wa'hey
Right, to put it down step by step for myself later; simple server creation via Network.InitializeServer and spawning of the server players prefab under OnServerInitialized. When a player connects, I notice it in OnPlayerConnected but do not spawn the players prefab here (my previous shots made this player owned by the server, which caused me confusion wrangling the items later on. I did have it working, but it was muddled in my head and seemed overly complicated for what I wanted)
Instead, spawn the player in OnConnectedToServer so that there is a clear separation of client/server making the scripting classes easier to read and use.
Now, I use a base class for all other items that need to exist or move relative to the origin based camera. All it does is toggle the render flags on the objects attached and stores a "relative to origin" vector3. When a player spawns, say, a radar satellite, it needs to be grabbed by the other players application and rendered in the right place.
And wa'hey
Wednesday, March 19, 2014
Multiplayer enabled custom coordinate system with local area rendering.
Well, that's a long winded title. I also need to get all of these scripts sorted out and hosted somewhere for people to look at.
Custom coordinates (previous post) worked well and the localised renderer toggling worked well in conjuction with the other players.
My usual issue was the networking setup and re-learning all the things I forgot about RPC communications.
Ensuring that the NetworkView items are added and set for no state synchronisation or observed items set me back as usual. The "ownership" of items and initialisation of the known "world" objects (in this case, stand-ins for solar system objects) caused me trouble until I realised I should send those objects down to the network player via RPC instead of configuring it on server connection as that only updated the servers version.
My idea is that the local player needs a copy of these items coordinates in order to do the rendering in relation to themselves and being able to manipulate them without contention on the server.
I worry that the amount of traffic needed for a living place could be prohibitive so one of my next steps will be handing around a seed and doing some very late update synchronising.
For a starfield, there are some simple tweaks available using (in this case) multiple legacy particle generators. I'll follow up on this later as it doesn't work with repeatable results (I need to seed it). But it is rather pretty.
Custom coordinates (previous post) worked well and the localised renderer toggling worked well in conjuction with the other players.
My usual issue was the networking setup and re-learning all the things I forgot about RPC communications.
Ensuring that the NetworkView items are added and set for no state synchronisation or observed items set me back as usual. The "ownership" of items and initialisation of the known "world" objects (in this case, stand-ins for solar system objects) caused me trouble until I realised I should send those objects down to the network player via RPC instead of configuring it on server connection as that only updated the servers version.
My idea is that the local player needs a copy of these items coordinates in order to do the rendering in relation to themselves and being able to manipulate them without contention on the server.
I worry that the amount of traffic needed for a living place could be prohibitive so one of my next steps will be handing around a seed and doing some very late update synchronising.
For a starfield, there are some simple tweaks available using (in this case) multiple legacy particle generators. I'll follow up on this later as it doesn't work with repeatable results (I need to seed it). But it is rather pretty.
Wednesday, March 12, 2014
Double based custom coordinate system.
There's an ever nagging voice in my head that says "make a solar system and fly around in it".
To that end, I've produced a test scene.
First things first, multiple cameras. In order to get close and far viewing without z-buffer fighting, two cameras are bound together. The first should have its clipping set to near 0.01 and far 1,000. Ensure that this has a low depth priority (using a default scene camera, this should be -1). The second camera, with a near 1,000 and far 1,000,000 (or whatever you fancy) and a priority higher than the first (say, -2).
Depth priority means that the higher value is rendered first, then the lower values rendered over the top. It's important to set the first (lower priority) cameras clear flag to Depth only otherwise it draws over the far away items.
For a custom coordinate system, I crafted a small Vector3d setup using doubles. So far I've only needed to implement the constructor, magnitude, distance and the subtraction operator. The main idea here is to put an awareness bubble around the player (who stays at the origin in world space).
Moving the player object simply adjusts the Vector3d that belongs to it. Once the distance between the other objects and the player falls inside the awareness bubble I trigger the rendering of the non-player item and position it at the edge of the bubble. Its "local" position for drawing is then in relation to the movement values the player changes.
Throwing in some real planetary scales and distances brings the odd trouble, but probably require some shenanigans around faking scale ranges. This is a nice core double based system that should allow for some driving about.
Thursday, February 27, 2014
Top down 2d and map making
An interesting time wrangling my enemy NPCs this evening. They target, chase and face the player. The issue I was having was the rotation only worked in 90 degree increments.
After adjusting a few different values and methods I couldn't get it just right, endlessly bodging the angles. How hard is it to make a sprite rotate to face another sprite? Success finally came through this line:
tranform.rotation = Quaternion.FromToRotation(transform.up, target.position - transform.position) * transform.rotation;
(from: http://answers.unity3d.com/questions/590504/sprite-face-second-sprite-only-on-z-axis.html )
The differing situations appear to be in the choice I've made for top down.
I've used some of the functions from CoherentNoise (available on the Unity asset store for free) combined with modified scripts from my spherical world engines and generated a few terrain textures with normal maps that export to disk, a few seed values should create what I need and then I can test them out for placement of items. Scaling them should give a decent sized "world" to visit and run about on.

After adjusting a few different values and methods I couldn't get it just right, endlessly bodging the angles. How hard is it to make a sprite rotate to face another sprite? Success finally came through this line:
tranform.rotation = Quaternion.FromToRotation(transform.up, target.position - transform.position) * transform.rotation;
(from: http://answers.unity3d.com/questions/590504/sprite-face-second-sprite-only-on-z-axis.html )
The differing situations appear to be in the choice I've made for top down.
I've used some of the functions from CoherentNoise (available on the Unity asset store for free) combined with modified scripts from my spherical world engines and generated a few terrain textures with normal maps that export to disk, a few seed values should create what I need and then I can test them out for placement of items. Scaling them should give a decent sized "world" to visit and run about on.

Friday, February 21, 2014
Australian Azure in 2014?
With the beta of Titanfall over it, friends that played it seemed to not notice the forcing of traffic to the USA. Being located in NZ, we generally end up accepting a latency ~150ms. Australias announced Azure block seems to be happening, but probably won't go online till the end of 2014 (most mentions say "live 12-18 months from announcement" which was March 2013)
This does concern a few consultants I work with in regards to Microsoft's push for O365, VoIP all cloud all the time. Being a gamer means we know, almost automatically adjusting to our 150ms hop, and accept that things can be a little mistimed between the game and the locally hosted voice comms. But as a Lync user stuck in the cloud I've seen a fair whack of consternation coming out. Why that latency in the office?
Back to games. I've played a little with some of the services, standup time and latency bothered me a fair bit, especially since the Unity app I was made relied upon that data. It's a good choice though, as far as free options. Unity worked rather nicely with the Azure addon from BitRave.
The app: a Warhammer Badlands campaign was prepped among the gentlemen. I thought "I should make something for it".
Get Unity to render a hex map of individual items, throw a mapped background against them like a spritemap, then load players and their armies.
Each player can then take ownership of a tile and it adds a semi-transparent material to it denoting colour of owner.
This data is stored to Azure on save, and loaded when needed. Worked like a charm once I figured out the gotchas of configuring the SQL tables via visual studio vs hosted database management console vs tables management console and their interaction through webservices and the json responses.
Lesson learnt: Follow the setup using the samples! It'll save you having to delete and recreate parts in the management of Azure to find the right bit.
This does concern a few consultants I work with in regards to Microsoft's push for O365, VoIP all cloud all the time. Being a gamer means we know, almost automatically adjusting to our 150ms hop, and accept that things can be a little mistimed between the game and the locally hosted voice comms. But as a Lync user stuck in the cloud I've seen a fair whack of consternation coming out. Why that latency in the office?
Back to games. I've played a little with some of the services, standup time and latency bothered me a fair bit, especially since the Unity app I was made relied upon that data. It's a good choice though, as far as free options. Unity worked rather nicely with the Azure addon from BitRave.
The app: a Warhammer Badlands campaign was prepped among the gentlemen. I thought "I should make something for it".
Get Unity to render a hex map of individual items, throw a mapped background against them like a spritemap, then load players and their armies.
Each player can then take ownership of a tile and it adds a semi-transparent material to it denoting colour of owner.
This data is stored to Azure on save, and loaded when needed. Worked like a charm once I figured out the gotchas of configuring the SQL tables via visual studio vs hosted database management console vs tables management console and their interaction through webservices and the json responses.
Lesson learnt: Follow the setup using the samples! It'll save you having to delete and recreate parts in the management of Azure to find the right bit.
Thursday, February 20, 2014
Being creative
I post sporadically and it's rather annoying to come back here and go "oh yeah, I was going to write some words frequently".
So, more frequent updates time. Usually about Warhammer and code and such.
Unitys built in 2d setup has been about for a while, I finally got a look into it for a top down game. Have idea, make terrible programmer art, make idea work. I then spent far too long making better (but still programmer art) sprites for it. Tentatively called SG-R, a top down 10 mission/story based explore shooter.
Of which I do not have any screens of. Oh well.
Having completed my Ogre army I started missing sitting down and painting, so I fell back on my first army ever and picked up some Empire chaps.
Pictures after the jump
So, more frequent updates time. Usually about Warhammer and code and such.
Unitys built in 2d setup has been about for a while, I finally got a look into it for a top down game. Have idea, make terrible programmer art, make idea work. I then spent far too long making better (but still programmer art) sprites for it. Tentatively called SG-R, a top down 10 mission/story based explore shooter.
Of which I do not have any screens of. Oh well.
Having completed my Ogre army I started missing sitting down and painting, so I fell back on my first army ever and picked up some Empire chaps.
Pictures after the jump
Labels:
empire,
ogre kingdoms,
stargate,
unity,
warhammer
Tuesday, October 8, 2013
2D Epic Fight - The Beginning.
2d epic fight - the beginning (link to my drop box removed)
A fair few bugs, loads of features to implement, but it's a done one for now. More interesting parts you can't see but I needed to get something up.
Still want to finish up Colony Ship as well, but I'll get there.
A fair few bugs, loads of features to implement, but it's a done one for now. More interesting parts you can't see but I needed to get something up.
Still want to finish up Colony Ship as well, but I'll get there.
Thursday, April 25, 2013
Ogres, Unity, noise, cube spheres oh my
For a rather long time I've just been procrastinating about almost everything, but recently I've found a new kick of motivation.
The warhammer gents are finally getting finished off because, dammit, I want an army completed. 4 more ogres and a hunter for the stonehorn to go.
And a long recurring project in many different languages is a planet generator.
Using a stellar (bad pun, no donuts) link (http://forum.unity3d.com/threads/127292-Procedural-Terrain-on-a-Planet) on the Unity forums, combined with the great free noise library CoherentNoise on the store, I've gone from the elation of
"vertex lit but hey, at least something renders"
to "well, this looks horrible, but it's textured and bump mapped"
to "not bad at all"
I still need to fix the cube spheres texture issues at the seams (I read about a lot of the issues around cube spheres so expected this to crop up) and figure out a better texture system but hey, 3 colour games are in.
The Unity3d forums really are a great resource, there are some definite holier than though jerks but they're the minority. Really nice and helpful bunch indeed.
The warhammer gents are finally getting finished off because, dammit, I want an army completed. 4 more ogres and a hunter for the stonehorn to go.
And a long recurring project in many different languages is a planet generator.
Using a stellar (bad pun, no donuts) link (http://forum.unity3d.com/threads/127292-Procedural-Terrain-on-a-Planet) on the Unity forums, combined with the great free noise library CoherentNoise on the store, I've gone from the elation of
"vertex lit but hey, at least something renders"
to "well, this looks horrible, but it's textured and bump mapped"
to "not bad at all"
The Unity3d forums really are a great resource, there are some definite holier than though jerks but they're the minority. Really nice and helpful bunch indeed.
Labels:
games,
messing about,
ogre kingdoms,
planets,
unity,
warhammer
Wednesday, January 30, 2013
onegameamonth
ColonyShip1 (link to my dropbox removed) (needs Unity Web Player)
And yes, I constantly read that as "ColonShip". #1GAM is just a thing I jumped on to actually get some shit done to a point, instead of wandering off on stupid tangents. It's small, simple, a hundred or so lines and a bit of Unity learning but it's done.
The original plan was trimmed down so much due to work being a bit busy, my daughters first birthday and some side projects that reared their heads. Primarily it was procrastination and laziness which really annoys me. The main takeaway from this is, I hit a hobby deadline with a "complete" game, however limited.
ColonyShip2 plans:
The approach phase with only water landing selectable.
Impact velocity for crash/land.
Moving water platform.
Fuel.
And, you know, all those damn side projects.
And yes, I constantly read that as "ColonShip". #1GAM is just a thing I jumped on to actually get some shit done to a point, instead of wandering off on stupid tangents. It's small, simple, a hundred or so lines and a bit of Unity learning but it's done.
The original plan was trimmed down so much due to work being a bit busy, my daughters first birthday and some side projects that reared their heads. Primarily it was procrastination and laziness which really annoys me. The main takeaway from this is, I hit a hobby deadline with a "complete" game, however limited.
ColonyShip2 plans:
The approach phase with only water landing selectable.
Impact velocity for crash/land.
Moving water platform.
Fuel.
And, you know, all those damn side projects.
Subscribe to:
Posts (Atom)




