Saturday, September 22, 2012

Day 130: Actions

Well today was pretty good, got the action sequence part working and it's ok. Still a lot of issues need more work, but hey at least it works.

The code for moving the avatar to a specific spot, orienting correctly, playing an animation for a specified time and then moving back to it's original position, all while allowing for it to be skipped at any time. This is all in one script, and I think it's a right mess. I used so many boolean state flags to keep track of it all that I'm definitely sure that there is a more simple and elegant way to handle all this.

I have a vague idea for a sequencer structure, that basically takes in function delegates which would be single parts of the big script, executing them, waiting for next and going on until all queued operations are finished. Pretty much a hack job at a cutscene controller or game scripting from SDKs.

Still have to tie all the various components that could make up an action together; animation, menu, and camera stuff all need to be properly sequenced and setup for each action - which I haven't gotten around to yet.

I'm sure there is always a better way to do things, but I won't find out until after stumbling in the dark figuring out my own poor implementation to get an understanding of what ever it is that I'm doing.

Thursday, September 20, 2012

Day 129: Actions speak louder than words

Well it's been two days since the last post. I kind of got distracted what with Borderlands 2 at it just came out. No, I don't have it, neither am I playing it, but I have been watching videos of someone play through it. More and more I've just been watching people play video games rather than do it myself. Partly because I'm poor and can't afford new releases - both in time and money. Saves time playing the thing as you can skip cutscenes, sidequests and all the other fluff and see how the core game works, what kind of levels it has, and the scale of the gameplay. I've watched a playthrough of Sleeping Dogs in it's entirety, it seems nice with an impressive large representation of Hong Kong, but in terms of gameplay and variety there isn't that much to do. For a game it's size it really seems like the developers could done more with the world and given the player more to do and actual involvement in the story instead of the preset story line. But anyways all that is only somewhat relevant to game dev, being able to watch "Let's Play" videos is all the more common and can serve as a hands off demonstration of the game. Being in the backseat should make it easier to make observations and analysis.

Ah well if I can focus, I still have to do the action controller. Nevermind all the huge distractions from just about everything on the internet.

So how it'll work is that from the main HUD,(1) clicking the action button will cause the avatar to walk to the action zone and start a trigger. (2) This trigger will enable a game object loaded with whatever scripted behaviours need be - (3) something like play a specific animation, add the time past by the action and then shut down the game object and return to the main HUD.

All of this really should be super simple, I've already got 1 and 2 done, just need to do all the custom stuff for 3.

Yeah I really got to get my act together, it's not even the games it's just the internet itself is so detrimental to sustained focus. For the simplest stuff it's like: "Yeah shouldn't take long, let me just read this single page comic strip" and it just spirals out of control from there.

Despite my poor progress still have to maintain a good sleeping schedule - staying up to finish shit is acceptable once in a while but get too comfortable doing it and you'll always wake up tired, out of energy, and just unable to work efficiently and effectively.

Monday, September 17, 2012

Day 127: Pathfinding Differences

Not a lot today, I'm resolving myself to limiting my game playing to only the weekends. So when they come around I'll probably splurge all my time with that. Anyways the quickie right now is changing how path finding works and is setup in our scenes.

It sounds like a big thing, but thanks to an excellent middleware solution, the A* Pathfinding Project by Aron Granberg, it's a pretty simple and painless switch. Of course it's only for one scene, but it only takes  5-10 minutes to setup per scene.

The old path finding sampling grid

The new user placed node system
So yeah, just changed from a sampling grid to user placed nodes that auto link by distance. The nodes render in the game at the moment, but it's an easy fix to just mass select them since they're all under one parent, and then disable or remove the mesh renderer component. Probably disable, since it is useful to have a quick visualization when needed.

As for tomorrow, when I commit really to working on this I'll be working on a sequencer for the various actions that the character can do in the game.  It shouldn't take long, but programming rarely goes as expected for me.

Friday, September 14, 2012

Day 125 : Well that was doozy...

Well you've been seeing all the props I was making for the apartment, but I never posted the apartment scene here. It's actually been awhile since I've worked on this as the last time I did any major art assets for it was in July. August was eaten by another project and then a failure of motivation and effort on my part. I meant to post these screens right after making that last post, but my family dragged me out for a vacation for the week.
The kitchen, empty, uninteresting, and setting the standard for what's to come.
The kitchen, got a ton of empty space to fill in and make interesting. Also there is something wrong going on with those cabinet doors.
Dining room
The dining room, and again a common reoccurring theme is that the rooms will look sterile and empty. I have to work on some minor props to litter the scene and really make the apartment feel lived in.
Living space and floating main character
The main living area along with the main character, which was not done by me. It is probably the most flushed out room so far, but there are pathing issues to work out and some extra props wouldn't hurt. I'm also not that satisfied with the ceiling, as those indentations have some odd lighting artifacts.

The foyer, the way out of this mess.
The foyer, it could do with some actual footwear / a coat hanger / welcome mats and rugs / a side table to help make it seem less lifeless. I also could do a different style door to indicate that it is going out of the apartment.
Living space view 2
Here is the living room again, with a closeup of the potted plant. I was pretty proud of myself when I made that, but now I'm not so sure it's any good. Either way I'll get lots of practice doing plants and vegetation soon - one of the next environments is an outdoor park.
The balcony, what are the neighbors up to?
The view from the balcony. I need to get some deck chairs and figure out something for the sliding doors when the avatar walks in and out of the room. I also need to get a skybox together, as the big grey emptiness has to go. The game also has a time of day system, it's not real time, but still that means that I'll have to figure something out for controlling the skybox and the ambient and direct sunlight.
A box in the sky
Overview of the balcony. I've got other apartments duplicated to modular build the apartment facade with the insides taken out for performance. The camera should never really focus on them so thankfully I don't think I'll need any new props to help differentiate them, but they are there so any oddities with camera movement don't show awkward clipping.
The view to sea, with nothing to see.
A first person view out to sea. Yeah we really need a skybox here.
Bedroom
Yeah I'm no interior designer. The wallpaper is pretty ugly and the tiling can be noticeable. Also missing curtains or blinds or anything to drown out sunlight.  Maybe some small props like a digital clock and a storage box at the base of the bed would help. Getting a digital clock to mirror the in game time would also be great, just that my experience with 3D text in Unity hasn't been the best. (It doesn't backface clip and renders on top of geometry so you'll always see it from the wrong angles.)
Bedroom view 2
The other side of the room, looking into the main washroom.  An issue that will likely be raised in the future is when the characters go to sleep. We have the animations for it, but I'll need to either replace or deform the bed sheets to fit around the sleeping characters if we show them.
The main washroom
The mirrors are another annoyance, at first I found a script that generated real time reflections so that they functioned as actual mirrors, but it was rather buggy since I had two mirrors in the scene for the two washrooms. They also took 50% of the computing power when running the game and lagged it down significantly. Needless to say I cut those and replaced them with a simple cubemap reflective shader for now. I'd like to come up with a better solution, but there are other issues to work at first.
The secondary washroom
Broadway's paintover critique
The mirror manages to perform worse. Counter also looks terrible with the nasty seams. A helpful chap named Broadway over on polycount helped me out with a paintover critique of the room. Well the difference in current state and what it could be is obvious. Still a ton of work to do, and then still there are two more unique environments to do. Hopefully I will be able to reuse a bunch of assets.
The study
The book cabinets where meant to be much more unique and interesting with different colours and text to help build a diverse library. Each stack is meant to be rearranged and have singular books clip in to help build z-axis diversity. But I rushed it and never went back to give it the proper attention I had planned for. Again the scene looks pretty barren.
The iPear, master tool and time waster
Part of the game will have the player sitting down at the desk to answer questions and buy things. The design calls for the camera to shift into first person view while doing so. Here's the view as it is now. ... Well I tried to do low resolution and low poly props, but it's extremely obvious, blurry, and awful here in particular. Iterative design time it is then, as right now these are a must fix.
The hall to the study and washroom
A picture, a decorative table with a flower pot? Anyways this probably needs something, but I'm no interior designer.
Apartment Overview

And that is it for the tour right now. Still a ton of renovations and prop building/fixing/editing to do. Back in July I'd liked to have called it done, but as you can see it's not living up to the potential of what it could be.

Anyways this'll conclude this return to blog posting, hopefully I'll get daily updates going again. I'd like to fix up the apartment starting now, but at the moment there are programming issues to get to first.

Friday, September 7, 2012

Intermission - Took a side project

So yeah I haven't updated this in about 2 months. But I can at least account for one month. Starting late July I was contacted by some friends who were working on a sequel to the iOS shooting game and needed some people to do some gun models. Well a paying job that asked me to do what I enjoy to do on my free time? Sounds very good to me.

I was working on a contract basis, with fixed payment per asset delivered. With the time I spent on each asset I wasn't making a good return on my time, earning probably below minimum wage here in Canada when I took into consideration the hours it took to build each asset. But up until now, I had been making  game ready 3D models of guns for free giving away the models I made for anyone to use. It felt good to step it up from a hobby, and have a commitment to maintaining a high standard of quality in the assets delivered. It was a good opportunity to study my own workflow, and let me know that I still have lots of room to improve.

Anyways the game isn't out yet, but when it is I'll be sure to post back here a link to it, and pictures of all the assets that I did for it. So that took up most of my August, and I didn't get as much done on the educational game as I'd like, but I'm back on that now.