Day & Night Cycle
Day & Night Cycle
Woot! Not only did I get a pretty awesome Sky-Sphere in place but I also managed to knock up a day/night cycle. I also cleaned up the shaders and have global lighting in place.
Found an awesome tut, and manage to knock the shader up from that.
Next thing is to look at shadows, but don’t you think that is preeety.
Coupling Issue solved with Interface
Ye gods captain, PROGRESS.
After the dismal run around the pointlessness I have actually made some progress last night and today.
- Coupling Issue solved with Interface
- Island has day/night cycle
- Shop Blimp interior & exterior modelled
- Blimp added to world
- Add a reliable help to translate between tile and world space
- Started work on Sky Box
Coupling Issue
Okay so we don’t want the model (island & prop data) coupled to the view (scene graph, animations, models). Well the solution was to give every node in the scene graph a user data element which had an interface.
The core functions being, Update & Pre-Render. Further functions and event handles can be added to the interface to handle animations and the like. The interface is the façade which prevents tight coupling. Neat and clean, kicking myself for not seeing this solution weeks ago.
Sky Box
My reason for posting, indirectly. I waster the last hour or so trying to generate normal & height maps for clouds. Reading up on things I already knew how todo if I stopped and thought for a second. The moment I saw my folly I stopped to write this to break me out of it.
I will now grab some food then hopefully not be stupid.
My Kingdom for a Team
My Kingdom for a Team
What’s the best tool to explore and solve problems? Explain it to someone else. It’s good enough for Sherlock Holmes and its good enough for me. I hate working in isolation because you don’t need to justify or explain yourself to people. So massive gaping holes form in your logic.
Long story short is explain in the picture. WRONG! It took me a few experiments to realise this but I finally did.
- Radial Menus are conceptually complex
- This makes them good to manage large amounts of choices
- ONE BUTTON!!!
Okay this game is focused on being simple and broad age range according to the brief. So one button is good. This combined with the mantra, “You can do what Frank can do”. A break through moment I had on the bus which confused many people last week.
So whenever you push the button on something you activate the action Frank would. The only additional actions are, Highlight, Pick-up (optional) & Customize(optional).
When interacting with Frank the actions are Praise / Scold, and Pick-up.
Now there are other actions. Like looking at stats, buying things from the shop, selling things, ect… But I realised I should bake these into the world as objects. That way they are easier to identify and interact with (kids prefer less abstraction). They are self-contextual and tbh look cooler.
The Other Problem
So what have I been wrestling with all day other than my own stupidity. Well a design choice and some coding issues.
The design choices involve things like.
- Camera Facing / World Orientated (see last post)
- Facing: Cleaner Smoother Fonts (made less of an issue by HD)
- World: Feels more part of the world
- World: Able to animate in 3D and look cooler (sounds stupid but cool is a test)
- Floating above, fixed location or surrounding
Anyway they are game specific and rather dull. I want to talk about a code issue.
You want HOW MANY!
Beginners and hackers will always dynamically allocate verts and primitives. THIS IS BAD! I know it’s convenient but it’s wrong. Resources should be compiled and processed by the content pipeline or equivalent. This allows unified buffers, optimisation of vertex declarations and lots of other neat things which make the Tech Trolls happy, otherwise they club you with a big stick.
This applies to the UI because well I was looking at generating the menu based on X choices which means generating verts based on splits… blah blah blah.
Caveat: Rules are made to be broken! Truly dynamic objects, like water simulations for instance may need to be altered. However try move choices like vert declarations and number verts to pack time. Understand why you are breaking the rule before breaking it. Remember over assigning a large pool on a loose fit is often better than a dynamic solution which fits better but restrains you more.
Wow that was a long post.
GUI Work
GUI Work
The big choices I’m facing at the moment and playing around is on two fronts, GUI Behaviour and Render Pipeline.
Fighting through some choices… will post more shortly
Progress and Elections
So no progress yesterday as it took me forever to vote, and then I got lost in endless election cover and got no sleep, zombied through work today.
Anyway got back and looking mostly at setting up the menu and gui system for buying and setting up stuff. Some nice progress but no pretty pictures yet.
I was hoping to have pictures tonight but lost so much sleep need to catch an early night. Pretty UI tomorrow.
Island Scale
Island Scale
Staying late at work to do university work is REALLY awesome, and so works. My work setup is just so much better for coding.
- Pro vs Express
- Two Screens desktop vs Laptop
- Work vs Bedroom
Anyway, getting the island render stuff in. Sadly I need to catch a bus home but I’m hoping to crack on with purchase & place items.
Hack our way through the Jungle
Output Log
Created World[Game World] Building Basic Prop [Template] Frank.Island.WorldProp Building Basic Prop [Building Template] Frank.Island.Building Building Container Prop [Container Template] Frank.Island.Container Building Inventory Prop [Inventory Template] Frank.Island.Inventory Building Ingediant Inventory Prop [Ingrediant Template] Frank.Island.Ingrediant Building Tool Inventory Prop [Tool Template] Frank.Island.Tool Building Food Inventory Prop [Food Template] Frank.Island.Food Added Obj[Island] to World[Game World] Added Obj[Hand] to World[Game World] Added Obj[HandCam] to World[Game World]
It might not look like much but that little but of text output proves the hacked type system works. It’s horrible, sadly I’ve wasted a weekend trying to do things the “correct way” and failing.
If I have time I want to investigate alternatives
// Horrible HORRIBLE System!!!
// Possibly replace if time permits, or else gourge out my eyes in shame
// Game Gems 1: Magic of Data-Driven Design by Steve Rabin
// Game Gems 2: A Game Entity Factory by F D Laramee
//
// Reflection and C# System.Activator.CreateInstance(…)
// See: http://forums.xna.com/forums/t/39891.aspx
Ah well it works and I have a meeting with my supervisor. Hopefully by tonight I will have that Tree & Oven in game.
Still not happy with my progress
Hitting a massive break trying to get Model-View-Controller to work with Data Driven model.
I’ve found out some nice stuff about C# activator but it gets messy.
Ultimately I think I’m going to have to through a few engineering scruples out the window and hack it if I want to stay on track. Which is IMMENSELY frustrating. Going to sleep on it and see how I feel in the morning.
Data Driven Objects
I’ve come up against this problem in MANY projects and to be honest never found a solution I’ve liked. The problem is you don’t want to hand-code each unit and ability ect… you want it to be data driven but this is quite a task.
Some of my biggest personal projects have ultimately died/failed due to this issue. Including my South African final uni project, my big Descent clone and my X-Com style game, oh and that hacking game. I REALLY need to find a good solution to this.
Sadly I’ve never attacked this problem in a work environment. All the articles I’ve read on it are vague or focus on a tiny part of the problem. I think I might need to look at the game gems books, and do some more research. I hate how much time I’ve lost on this issue which I’ve seen so many times before.
Slow Progress
AAAARGH!!!!
Really slow progress, here are some of the hurdles I’ve been hitting.
- Baking Shadow Maps in 3D Studio Max while maintaining the UV (a bad tangent)
- Confusion between ActiveTransform and Transform. Renamed them to WorldTransform and RelativeTransform.
- Broken input needed fixing
- A few confusions between data and active
- Some more confusions between keeping the units and such in order
Ah well to bed :’(
Only one button!
I really wish I had a pretty picture but I don’t. Sadly it’s a problem with grunt coding tasks is there is very little pretty to show for it. In fact most of my work today has been in the Content Pipeline which runs at build time. So its not even runtime code.
XML Data
The XNB system in XNA is great but I had a few hiccups with it. I still don’t think I’m using it in the best way possible. However after ripping up tons of pages of notes I’ve gone with the best solution I can currently think of which no doubt has loads of problems, besides some of the ones I’m already seeing.
Model View Controller
Soooo sooo easy to be a naughty coder. However as this is an academic project and I can be slightly OCD even with production code I’m following it as MUCH as I can. The controller is slightly too coupled to the state which it controls but de-coupling is more messy.
Always always realise the so called “rules” of software engineering are generalisations and guidelines. You should never break a rule without first understanding it. They need to be flexible and you need to be flexible because the key factor which makes someone an engineer is a way of thinking, analytical problem solving.
A decent education in engineering is mostly about how to think. The tools you use are easily learnt but it’s the process and thought model which is hardest. I think that’s why you see so many true engineers have cross disciplines.
Tomorrow’s Tasks
Well now that a lot of grunt work is in place. The goal for tomorrow is to have the following working.
- Tree Prop - Loaded from Data, Go through full life cycle and interaction
- Oven Prop - Loaded from Data, Go through full life cycle and interaction
Bigger than it sounds