Tag: code

Daily EXO ONE Dev Log. 2 Days till Rezzed Submission.

Two days to go until I submit this build to Rezzed Left Field. I think I could probably do some testing today and submit, but with two days I think I’ll spend all today tweaking stuff, tomorrow doing maybe a touch more + testing, then submit.

Planned Tasks

Rolling over some tasks from yesterday

  • Wormhole fx don’t show in tutorial
  • No wind buffeting sound in clouds
  • Lightning tweaks (received new developer email with a fix)
  • Player starting position is crap, we start rolling backwards toward the camera. Starting on a hill would be best.

This shouldn’t take too long, I might tackle these, then I have an email to write for Hyperfocal Design that might take a little bit, then I’ll have a playthrough of a build with mouse/kb + XBox controller and see where I’m at, if I’m going to ‘call it’, etc.

Realtime Notes:

Making notes/observations/new tasks as I go:

Wormhole fx fixed, 5 mins

Trying to tweak the sound for wind in clouds but nothing happening – not sure if my fault or plugin’s! Doubt I’d get a fix in time if it’s the plugin, though, so going to have to find some other way.
Now just trying to track down how and why the wind buffeting sound is being held so low while in clouds.
And still trying… really baffled why this sound effect doesn’t go to full volume in clouds anymore!!

The reason I’m still on this is because people often tell me that getting in clouds is one of their favorite things in EXO ONE, and I think the sound is a big part of the whole experience, so I really wanna make sure this is working!

30 mins

Wind Buffeting Volume

When in clouds, Group Master Volume goes to 1 (great!), but the Variation volume only reaches 0.5 (boo!).

An event in Master Audio tells this sounds “Group” to go to 1 volume over 1 second when in clouds, and 0 over 1 second when out. Yet the variation is 0.5… Shouldn’t the variation stay at 1 at all times? I don’t know!

Checked that the sound distance/fall off was correct, check!
Turned off ducking, no effect.

Finally got it, it was a Bus Control volume setting, I think I was possibly confusing this control with Group Control! Ugh!

Since I’ve just realised this I’m taking the opportunity to adjust some volume levels I wasn’t happy with.

1hr

General Volume Tweaks

While tweaking the inclouds stuff, noticed:

  • Holding shift to glide doesn’t transform us (visually?) if we have 0 charge, then enter clouds (which gives us charge). Needed to release then press again…
  • General sound and music volume sounds good now, but Narrator gets drowned out

Adding a new Mixer group for when narration plays, should be pretty easy… Umm, I take that back! I kinda need a bit of a system to handle this as all I’m doing now is transitioning between Mixer Snapshots based on if we’re in clouds or not, and this would have to work with that… And it might need a priority system, so if we change to a Narrating Snapshot then enter clouds, we don’t just change everything back… Or for now I could fudge in some stuff into my inClouds SnapShot transition code that checked if narration was happening, and if not, transition… Umumumummmm…

This has taken a couple hours so far messing with volume levels. It’s almost there, the big thing is just that narration is drowned out… Well, I’m just going to go for the hackiest option of lowering all volume levels except the Narrator, so my game will be kinda lower volume than usual… No wait! One more thing I’ll try quickly – in the NarrationOn/Off functions, I’ll try setting all Buses lower volume during narration, then back again afterward…

Ok, implemented that, not toooo hard, still can’t seem to hear any volume adjustment happening on certain sounds though, which is annoying. Unsure if it’s just MA not updating in realtime or I’m not understanding something… It’s good enough, though.

1hr.

Lightning, Round 2

According to the lightning plugin devs email he just missed a file, so trying again.

Whoops, errors, still no good! Moving on!

5 mins

Player Start Position

Since EXO ONE has a procedural terrain, this will probably change, but I’m not changing terrain for this build, so I can just move the player to the top of a nice fun hill and let players drop down.

That was pretty simple, 5 mins.

Glider Transform in Clouds

This isn’t happening, at least the visuals aren’t. It’s total rubbish to have to release your finger and press it again to glide in clouds/after getting hit by lightning… The only thing I changed recently was the execution order of the Player, PlayerControls and PlayerRend scripts, so that might be related.

Realised this was caused when I changed Glider Transformation from a button held to button pressed system. Works well when you have charge, but if you have zero, then gain charge, but you don’t release and Press the button, nothing happens. I need to use one of these kinda bools I think:

if(!doingThing) {doingThing = true}

… to stop it firing every frame I hold the glide button, which I kinda hate cos I feel like they’re so messy and require a million bools, but not sure how else I’d do it.

Lol, I even found duplicate if(glideButtonPressed) code, I am amazing!!

This is actually a bit of a bitch of a problem, as I can’t just do:

if (PlayerControls.instance.glideButtonHeldDown)//need this for auto transforming when at zero charge and we enter clouds
{
if (!glideButtonHeld)
{
glideButtonHeld = true;
TriggerEXOTransform(EXOONEShape.Glider);
}
}

… do I have to go in and set glideButtonHeld false when we reach 0 energy? My logic brain hurrrrts! I wonder how many programmers read this and laugh? luls (no one reads this :).

The bool name for this is definitely misleading as well, but again in the vein of get shit done, this will do. I just did what I said above, it is foul but it works.

Here’s an insight into my code (probably terrible):

30 mins

Just realised lightning seems even worse than it was, I can’t even see it. Perhaps this happened when I was trying to update it?

Lightning Round 3

I feel like this happens a lot somehow, I finish doing things, then they change magically and I need to re-do them!

Done! 15 mins.

Lunch Break

Got up a bit late so just 15 mins.

Pulling Up

Feel like I need to tweak the glider pull-up mechanics some more too. It feels good when we are moving toward the ground or parallel to the ground, but you get punished by trying to pull-up when already going up (in my attempt to stop ridiculous heights). It could also help if perhaps EXO ONE doesn’t move in the direction it’s facing (its velocity) but instead zeroes out Y. This way you couldn’t hold forward and endlessly fly upward. I might try this first as this might be an easier fix with a tweak to how I handle pulling up.

This is taking too long, I’m trying to actually model a glider with my rather simple physics code by hacking things together. It gets close but I don’t know if I’m going to manage anything decent in time. I’m going to give this another 15 minutes then admit defeat for now.

Thought I’d try and record a video in the Unity Editor but I have yet to own video recording software that doesn’t crash everything(!)

Calling this done for now even though it aint!

30 minutes

Build Testing

Going to play with mouse/kb then XBox controller, and make notes on anything that sticks out as super broken.

Notes in order of importance:

  • RestartLevel from ‘demo complete’ is broken with a black screen
  • Unpin terrain to avoid the ‘snow bug’ in terrain (Map Magic/RTP issue)
  • Tiny draw distance (not being set correctly?)
  • Pull up costs no energy vs jump, which does.
  • Music too low. Are we returning to max vol after narration?
  • Alien signal too loud in intro
  • Sphere not lit in tutorial
  • Hud arrow in intro shouldn’t be visible.
  • Can’t glide and pull up from ground?

Plz Restart, Level!

Blarrrgh! What happened to you, RestartLevel!? Time.timescale = 1 yet we seem paused, and having trouble getting the damn black fadeout image off. If we restart anywhere else we still break everything… RestartGame() also no longer working, help me jebus! watafak!

Here’s another example of something that was working and now isn’t. Maybe this is just common? I feel like I need a better methodology for figuring out the cause, and probably some way to code things that doesn’t make them so susceptible to breaking in the first place! Having a lot of trouble with this, 30 mins + in.

Notes:

  • Clicking restart level seems to properly unload and then load the scene we are in. New intro starts to play but nothing happens from here. Game manager needs resetting or something?
  • Looking at the LoadEXOScene code (it’s garbage) and have nfi what the problem is
  • shiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiit
  • trying to build incase build is different to editor… (hail mary) … Nope!
  • OK, Debug.Logs, EVERYWHERE. This has taken me hours now for something that was working before…
  • Looked back through my tasks from yesterday and can’t understand what changes might have done this.
  • We seem to be staying in our Orbit state during the intro, after restarting… And my debugs tell me the player in orbit isn’t moving.
  • Checked Time project settings and while I swear to gawwwd it said 1 before, it just read 0 (paused), which is hopefully where my entire problem is.
  • OMG it’s working again, wtf! I have no idea why the timescaling decided to stop working but I’ve fixed it. Now on to restart()ing
  • Restart works but the intro text stays if we Restart right away…fixing

So now we are back to square one after most of the day spent redoing what I thought I’d completed already, and the menu > restart or reset level still doesn’t work. I think I may just need to get the black overlay/fader image to go away and this might be done.

RestartLevel is now working, but not RestartGame();

So many hours, 4?

Double Manager Scenes on RestartGame()

It helps sometimes to look at the inspector, #unitytips. So first guess, I don’t actually unload the Manager scene, then load another…

Whoops: //SceneManager.UnloadScene(SceneManager.GetActiveScene()); //can’t unload an active scene!

Where was the warning/error on this? I didn’t see one!

Rewrote my previous terrible code with some less terrible stuff, works!

20 mins

Remaining tasks:

  • RestartGame from ‘demo complete’ is broken with a black screen
  • Unpin terrain to avoid the ‘snow bug’ in terrain (Map Magic/RTP issue) 5 mins
  • Tiny draw distance (not being set correctly?) 15 mins
  • Pull up costs no energy vs jump, which does.
  • Music too low. Are we returning to max vol after narration?
  • Alien signal too loud in intro
  • Sphere not lit in tutorial
  • Hud arrow in intro shouldn’t be visible.
  • Can’t glide and pull up from ground?

And after testing, let’s add a big obvious one – controller support for menus, yikes! I’m a professional … game … makering … guy! Cross fingers I can actually pull this one task off in one day!

Tomorrow will feature getting RestartLeve() working from the demo end, plus controller menu support.

Suck at Coding, But Make Games Anyway

If you’re an artist or creative type, you may find that your ability to code seems opposite to your main talents, as I have certainly found myself! My main passion is game design, but without code, you can’t make a game, right? With tools like Unity3d and Playmaker(a visual scripting system for Unity) this isn’t necessarily the case.

After working part time on a couple of games, Zombie Outbreak Simulator and Class 3 Outbreak for a few years with Binary Space’s programmer/CTO Saxon Druce, I was looking to add more titles to my game designer belt, but at the same time I wanted to keep things small scale and achievable.

I had been playing a lot of iOS games while we ported Zombie Outbreak Simulator to iOS, and Tiny Wings in particular had me completely enthralled. From a gamer standpoint I loved the feeling you got of being in the zone, getting perfect jump after perfect jump. From a business standpoint I loved that it was essentially one level and extremely simple gameplay, hence quick development time. After toying with a few ideas for games, I ultimately decided to try a version of Tiny Wings that was 1st person, in 3D. Using just Unity, I struggled through some basic physics code to get a ball rolling around on their terrain engine (I can hear you laughing), and after a week or so, I was quite happy with the result. However, being the most hopeless coder of all time, progress was slow and infuriating. Not only was I trying to get my head around 3d physics and vectors, but also Unity itself, AND javascript! There are some creatives that can bash out some script without much problem, but I’m not one of them, and to learn this side of game development would set me back arguably years of study and practice, which at the ripe age of 32 I’m not willing to do!

Enter Playmaker

Somehow, I think while looking through Unity’s asset store, I saw Playmaker. Playmaker is a visual scripting system / state machine manager, which uses states (which house actions, each a snippet of pre written code) and transitions to develop a game. For a highly simplified explanation, you can attach a finite state machine or “FSM” to a character with the states “fighting”, “idle” and “walking”. Within each of these states, you can include animation actions, raycasting/shooting actions and movement actions. You transition between each state using events, ie within the idle state, you would add an action that waits for a left mouse click. This left mouse click triggers a transition event to the shooting state. Each action in a state is essentially a pre made piece of code that you can tweak and fit together to create a state machine, and eventually an entire game.

codeless game design
(Playmakers Test Lab example scene, which controls simple opening/closing doors)

You can see from the above image how, for creatives, these visual state machines are so powerful. When I look at a block of code, I see a wall of text, and try in vain to understand what it does, when it triggers, and what its doing at any given point. With Playmaker, I can glance at an FSM and see what it does in almost an instant. I can also see not only what it is doing in real time in the visual editor, but also in the game view, where each object will display which state it is in. I can’t tell you how good this is for debugging and just general understanding of what your FSM and the game in general is doing. Add to this things like debug rays, break points and more, and you get a very clear understanding of what’s happening.

Using Playmaker, I’ve just completed my first (mostly solo) creation, Unknown Orbit, where you can float, jump and fly around a surreal, 3D planetary system as a comet. Part time, this game has taken me about a year. Full time I imagine it would have taken 6 months, and now that I’ve learned Unity and Playmaker to a greater level, I think the game could be recreated in a few months if not less.


(Unknown Orbit Screenshot)

Here’s a quick example of an FSM for Unknown Orbit, where the player picks up snowballs. On the left is the states and transitions that controls when we move between states. The middle pane is currently showing the actions inside the “destroy self” action. In this FSM, when the player flies into a snowball and picks it up, an event is broadcast called “Add snow”.


(The state machine attached to a snowball pickup in Unknown Orbit)

The comet object hears this broadcast via a ‘global transition’, and enters a state that increases the radius of the comets ice core.


(The statemachine attached to the ice/snow object in Unknown Orbit)

Trade Offs

So what are the trade-offs you may ask? Well you will have some memory overhead loading everything in, and yes there are some small performance hits in some areas because of all the extra unused capability in the system. Playmaker isn’t optimized for any particular type of game, and neither is Unity. But today’s hardware is so powerful that unless you are doing something pretty crazy, you probably won’t hit the wall any sooner than you would using other approaches.

Another trade-off that I encountered was that due to a couple of levels of abstraction in the game making process, you can sometimes feel helpless to fix problems. I would find a bug and spend days trying to fix it, and be clueless to the source of the problem. I imagine this is common to some extent in most games, especially where you use someone elses engine/code/API, however when you are using an engine with a plugin to that engine, things can get tricky. Luckily both Unity and Playmaker have excellent support, and I further mitigated this by working directly with an expert in both Unity and Playmaker whenever I encountered problems I couldn’t solve.

Also while I have yet to encounter this, the more plugins you use with Unity, the higher your chances of conflicts, or of the creator disappearing/no longer providing support. If you are selecting a plugin/s to use with Unity, I suggest choosing ones that have been around for a while, receive frequent updates, and are active in their own forums. In my case, Playmaker actually supports my chosen interface plugin, which has also been around for some time, which was very handy.

The Advantages

In terms of game design, Unity and Playmaker are great in allowing you to focus almost entirely on building and testing ideas as quickly as possible. I’m personally focussed on game design, so this allows me to create ideas and prove/disprove them quickly, getting in as much practice and experience as possible in a short time span. I jumped out of games into a business and back again a few years ago, so I feel like I’m getting to make up some lost ground now! If you’re a game designer at a typical large studio, you might be making ‘safe sequel number 9999’, and while you may have some room to move, you can hardly flex your muscles and push yourself in terms of wildly different or unique designs. If for example you’re a designer “stuck” making say, racing games (happily or otherwise) you could practice in other genres with relative ease and low time commitment. I also believe that the less people you have on a project, the more unique and singular the design vision will be, creating more individual games. Using these tools almost puts you into a team that has created a graphics/physics/animation/etc engine and lets you run wild with whatever design you like, with little in the way of restrictions.

I’m also a big fan of Lean Startup principles, a concept that Eric Reis is famous for. Lean Startup is mostly a business approach where companies attempt to prove product or service ideas prior to launch, then quickly develop a minimum viable product (MVP), iterate on it, and get customer feedback as quickly as possible. This is the opposite to how games are traditionally created, where you define the game first via a design document, make the game, then hope it will sell well.

The Lean Startup?

For Lean Startup strategy, I think this combination of Unity3d and Playmaker is certainly something to consider for both large studios wanting to prototype ideas/MVPs quickly, or for solo/small teams, especially if you lack a coder and just want to dive in yourself! Throw in Kickstarter (a crowd funding solution), and you have a very nice Lean Startup strategy of games development where you can quickly create a prototype, develop a Kickstarter pitch, then prove whether people would pay for your game before you have heavily invested in it. Tyler York published an article on Lean Startup for games at Gamasutra.

So how did I follow the Lean Startup approach, exactly? Well, I did and I didn’t. Because this was my first Unity title, and I was going to be learning a lot, I picked and chose various concepts from Lean methodology while I decided to play it safe and attempt a fairly proven game concept. I looked at Tiny Wings, Dino Run, Dolphin Olympics and other games that were similar, and decided that because those games have had some success, that I was already aiming for a game that would have a good enough chance of success. If you like, you can go the whole hog and try to prove whether your idea would be popular by creating banner adverts or text ads on Google or Facebook, and see what sort of click through rate you receive. I then chose an art style that I was familiar with – I have 3D art/texturing as my background, with no animation required (I have no skills there), no AI, and just an extremely simple game mechanic that I could tune based on feel. My minimum viable product was done in days due to Unity’s built in physics – I showed some friends who approved and I was then on to the finished product. From my work on Zombie Outbreak Simulator, I was also familiar with freesound.org, where I sourced almost every sound in the game, quickly and free! For music, my friend Rhys Lindsay recorded me an awesome spaced out track. This left me to concentrate entirely on the learning process and fine tuning the game.

I would say that I followed Lean Startup mostly in respect to creating an MVP and final product with the minimum asset requirements, minimum spend, while iterating quickly and often. I honestly was a complete coward in terms of getting early feedback from anyone but friends, as I was genuinely scared that someone would steal my idea while I crept along at snail pace learning how to make it. I also just wanted to make something that was uniquely me, with little outside feedback. Funnily enough, towards the end of the project, I found it really helpful and great fun to work with testers and get their feedback. My apologies to them for not being able to add more planets! Perhaps in a future update!

Having now completed one Unity game using Playmaker on my own, I have the following advice for developers in a similar situation:

1. Aim for small, simple games you can do yourself, and play to your existing strengths. I thought UO would be so simple I’d get it done in a few months. If I’d cloned Tiny Wings, and not gone for a rather difficult 3d planetoid/moon setup, then perhaps that would have worked. However you should think about things that will take up a lot of your time, namely characters, animation, even simple 3d modelling will take you some time if you don’t come from an art background. My first job was a 3d modeller, but it still took me time to get back up to speed on Blender.

2. Use a simple art style with reuseable assets and gameplay loops (see this Lost Garden post on loops vs arcs). A story based game with loads of content and 20 unique levels will take a long time just to create the assets, whereas something like Super Hexagon is the perfect example of a game with little art assets.

3. Use creative commons assets, especially for sound and music. Freesound.org is the best! Make sure you don’t just note that there is a CC logo attached – read it and make it sure allows commercial use. I leave the file names intact so that I can go back and make sure everyone is credited properly.

4. Try to find an advisor of some sort. This can be anything from the guys on the unity and playmaker forums, to the unity chat channel, or the numerous playmaker/unity3d tutorials. I highly suggest looking at WellPlayedGames tutorials for learning Playmaker.

Without a helping hand or two, I would have spent a lot more time banging my head against the wall.

5. You will probably need at least one or two bits of code (shock horror!). I had Saxon, from Binary Space on my side to help with the highscore system. As Playmaker progresses, chances are we will need less and less code, but for now I think a good number of games will need at least a little. One recent addition has been an Array Maker that Jean Fabre has written, which I could have potentially used for the high score system.

So yes, coders might still be required for some games, but proving that you can make/release a whole game on your own will prove to yourself, potential partners, funders, kickstarters, etc that you have a work ethic and can get things done.

As a further note, strangely enough I’ve found that using Playmaker has actually solidified my understanding of things like object oriented design and other programming/design concepts. So I think it can be helpful in learning these concepts as well!

If you’re a creative or just really want to bang out a prototype with great speed, I highly recommend you try out this combo of Unity/Playmaker.

You can download a free version of Unity here: www.unity3d.com

Playmaker is available from Hutong Games on Unity’s asset store, and I’m pretty sure its still on sale: http://hutonggames.com/

Here’s the end result of a years worth of work (part time) on Unknown Orbit, by one guy with no programming experience, some 3D skills, and some game design background. Made using the iOS version of Unity3d and Playmaker: http://youtu.be/W1CRM5EMMYo

Unknown Orbit is developed by Jay Weston at Exbleative (www.exbleative.com) and will soon be on the app store for iPhone and iPad, projected release date December 4th! Unknown Orbit lets you float, jump and fly around a surreal, 3D planetary system as a comet. Find out more here: www.exbleative.com/unknown_orbit/

© 2024 Exbleative

Theme by Anders NorenUp ↑