Showing posts with label adventurers. Show all posts
Showing posts with label adventurers. Show all posts

Monday, March 07, 2016

Disturbing

I messed up the animation script for the roguelike tutorial in Unity.  It's a little worrisome looking.  I said at one point he was just standing around wanking.  Seems even shadier in this video.


Saturday, March 05, 2016

Adventure Game, Progress

I took a short break during some coding to go for a bike ride.  Darn nice out there, although still a bit chilly on the gloved hands if you're moving fast.

I ran into a few issues getting the basic board controller working.  I dragged the sprites onto the game objects rather than into the sprite controllers, so when I ran the board creation loops, there was nothing to create.  Had me at a loss because my code looked spot on but I was still seeing a great big empty field.  Took a lot of work to clean it all up because modifying the prefabs resulted in messing up my board controller.



The tutorial walked me through a singleton pattern attaching the game controller to the camera by checking for the singleton instance.  I'm never going to believe a Unity programmer again when they tell me they don't know any software patterns.

There's my Win32 meltdown that crashed Unity.  I'm pretty sure it's because I made an instance of the prefab and then deleted the prefab in an attempt to make a new prefab.  I can't be certain, but I suspect it's like having an instance of an object with no object?  The important thing is not to do it - very messy.


80/20

The 80/20 rule (Pareto Principle) applies to playing around in Unity3d as well.  80% of the work comes from 20% of what you're working on.  I decided to move on beyond the Space Shooter tutorial when I got to the part where I'd need the Apple or Android SDK (or Windows).  Not that I'm adverse to using them or can't, I've used all three, but I thought learning more basics rather than significantly more configuration work was preferable.  So I started the 2D adventure game tutorial series.

1.) I was immediately amused because I'd had an intern candidate telling me about his Game Conference challenges using Unity2d and he'd discussed a "cookbook" game with a demon hooking to a JSON data source.  The Scavengers setup sure seems like the base application his team likely modified for their competition.  Wish I had played around with it before the interview.  I don't think he was expecting an interviewer who'd touched Unity (recently).  I asked a number of questions related to prefabs and how they compared to a traditional OOP structure and whether coroutines were threading (they're not, and there are a few tutorial videos out there on the topic of yielding to the main thread versus spawning new threads in C#).

2.) Getting back to the Pareto Principle, during the first real lesson after the introduction, I did something that eliminated my main camera.  So when I went to watch my little adventurer bounce up and down like he was wanking to pass the time, I couldn't find him.  Or his two wanking monster buddies.  I had no problems putting the camera back, but the default settings weren't the same.  I eventually had to boot up a new project and check the defaults.  Unity was resetting the Transform.z to 0 instead of -10 and the depth to 0, instead of -1.  I updated the values and there they were.  Like looking for a needle in a haystack.  Here's a default Main Camera, should I ever need to get my mitts on it again.  It took quite a while of dicking around with settings and looking online before I gave up and did the new project.  Seriously - I'm still trying to make it work in my head - I assume because my characters were at 0 and my camera was at 0, that I was in some sort of Flatworld universe where I couldn't see them.