New Mitch Quotes!
http://www.mitchsays.com/
Jules of Nature
almost home

⁂
wallacepolsom
Game of Thrones Daily

★
PUT YOUR BEARD IN MY MOUTH

tannertan36
macklin celebrini has autism
Claire Keane

titsay
Peter Solarz

Kaledo Art
Monterey Bay Aquarium
No title available

Product Placement
art blog(derogatory)
sheepfilms
Mike Driver

Andulka

seen from United States

seen from United States

seen from Netherlands
seen from Myanmar (Burma)
seen from Bangladesh
seen from United States

seen from Slovakia
seen from Oman

seen from United States

seen from Spain

seen from Malaysia

seen from Malaysia

seen from United Kingdom
seen from United States

seen from Türkiye
seen from Brazil
seen from Brazil
seen from Tunisia
seen from Jordan
seen from Croatia
@hackthechad
New Mitch Quotes!
http://www.mitchsays.com/
Hackspace
Just switched from Blogger to Tumblr. I know, welcome to 2012.
I’ll try to get some new posts up for my latest hack projects soon...
June 13th, 2014 Progress
This one is going to be super quick, but yesterday I was able to build out a very basic scaffolding for Utility-based decision processing! I still need to flesh the design out a bit more, but I am following some basic utility patterns described here: http://www.gdcvault.com/play/1012410/Improving-AI-Decision-Modeling-Through and here: http://gdcvault.com/play/1015683/Embracing-the-Dark-Art-of I tested my initial implementation by modeling a utility function for sleeping and wandering. The basic premise is that as an entity wanders around the level its tiredness stat gets incremented by some amount. Every time the entity is allowed to update itself it also evaluates the utility of sleeping vs. continuing to wander around. Using the sleep utility function of x^2 where x is the tiredness factor, I get a nice exponential curve making the entity increasingly tired as it wanders farther and farther, but not so much after a good sleep. After the entity sleeps, its tiredness factor is effectively reset which lowers the utility of sleeping again anytime soon. All the utility function variables are normalized to be within [0, 1] which allows any stat to grow, cap, or be reduce at arbitrary rates. Of course how stats are handled is another topic, but I'll leave that for a future post. I'll post more details of this system after it is fully designed.
June 12th, 2014 Progress
It's been a while since my last post where I was finishing up work on entity pathfinding. I took a bit of time off to work on some other projects and research. Since coming back I have ripped out all the sprite batching systems I wrote in favor of using Unity's new 4.3 sprite rendering framework. Luckily, this did not turn out to be much work since I was already pushing most of the sprite management behind factory patterns. Switching to Unity's sprite management system did add more draw calls per frame, but this is dependent on how much geometry I am trying to display along with how I am atlasing the textures. With the new sprite management out of the way I also started on building some of the AI systems I am most interested in. I decided to implement a very basic goal-oriented decision module. This module is very simple right now and only manages a stack of goals that get randomly selected each update cycle per Entity. Goals can be atomic where they contain a single action to perform then are completed or they can be composite and contain one or more atomic/composite goals within them (composite object pattern). An example of each goal type could be: SleepGoal (Atomic) Goal Action: Pick a random period of time to cause this entity to sleep then complete. WanderGoal (Composite) SubGoals: FindPathGoal (Atomic) Goal Action: Pick a random position on the map and request a path to it then complete. FollowPathGoal (Composite) Subgoals: MoveToPositionGoal (Atomic) Goal Action: Move to the specified position then complete. That goal stack hierarchy would look something like this: -Goal Stack --SleepGoal --WanderGoal ---FindPathGoal ---FollowPathGoal ----MoveToPositionGoal --- -- - For now, I have hand authored these goals for system testing, but in the future such goals and behaviors would be authored in a tool that generates XML-like markup. This markup could then be read in at runtime to dynamically create unique entities. So having goals is a good thing, but you might notice that there is nothing specified here that would help us select appropriate goals during gameplay. This decision module is what I am working on next. I am debating between Utility-based and Fuzzy Logic systems so I will post more on this after I get a design going.
August 27, 2013 Progress
Added some new Ork animations today for testing out enemies. Still working on getting the scaffolding up for some basic monster interaction in the game. Right now, Orks just path-find directly to you when the level loads, but I will eventually be adding range-based trigger/sound/sight/smell detection. Also been thinking about randomly generated monster attributes, equipment, behaviors, skills, etc.. I am quite a way off from implementing that stuff, so more on that in the future. There is always a ton of work getting entity interactions going, so expect a lot of upcoming posts on this stuff.
August 25, 2013 Progress
Not much to talk about today. It was a busy weekend, but I spent some time thinking about entity design which I will likely start writing next. Right now, the player can only move around the level tile-by-tile and there are no enemies to deal with. So I think my next goal is to get some very basic enemy/player interaction going. This will soon expand into more detailed AI systems, integrating local motion into the current pathfinding logic, collision detection, and some light combat logic.
August 23, 2013 Progress
Spent a bunch of time reading about Heuristics and A* applications. I also did a ton of testing between the Manhattan Distance and Euclidean Distance heuristics and came up with some surprising results.
First, the setup:
Lock the random seed so we can generate the same dungeon each run.
Test between closed list re-evaluation and non-closed evaluations.
Use Manhattan and Euclidean heuristics as test variants.
Quantify by tracking overall algorithm time, path size, and total tile (node) evaluation count.
Since I am way too lazy to post a full-on results table (it's rather large), here are my final notes:
Euclidean heuristic did 10x node evaluations as the non-closed variant.
Manhattan heuristic did 3x what the non-closed Euclidean heuristic did, but it did not matter which closed list strategy was used, the result was always the same.
Manhattan had a much more optimal path by ~1-2% path size reduction.
Runtimes for both were very similar around ~1 millisecond per run (using a very large search space).
In short, the Manhattan heuristic (for my tests) is just as fast with the bonus of re-evaluating the closed list for possible late path optimizations and always returned the most optimal path. The Manhattan approach looks something like this:
All those green tiles are sitting on the open list when the algorithm terminates. You can clearly see something else is still wrong with the tile evaluation method I am using and this does not even show what was on the closed list! Which led me to some additional reading about scaling G and H costs. The key finding here is that A* computes f(n) = g(n) + h(n). To add two values, those two values need to be at the same scale. If g(n) is measured in hours and h(n) is measured in meters, then A* is going to consider g or h too much or too little, and you either won't get as good paths or you A* will run slower than it could. Horizontal and vertical movement were scaled down to 1 from 10 and diagonal movement was scaled down to 2 from 14.
After proper cost scaling, I added a new Diagonal Heuristic (sometimes called the Chebyshev Distance) to use in place of Manhattan and Euclidean variants I was experimenting with before. This is because for my application moving diagonally will cost a unit more than moving in straight lines. I know have paths which look the same, but evaluate much fewer tiles (in most cases):
A huge difference in total tile evaluations and much faster generation!
August 22, 2013 Progress
About that A* problem I had. Well, it is much better now. I fixed an issue where I would return the closed list (checked nodes) as the path instead of the parent -sibling daisy-chain from the goal tile to the start tile! Duh right!? So now that leaves me with this:
Blue tiles represent the returned path starting in the lower left and ending in the upper right areas of the map. Green tiles represent the tiles still left on the closed list (evaluated to get the path), but were not included in the path. Much, much better right? No more room filling paths (yay)! Well, not so fast. You can see there are few places where the path is sub-optimal most notably here:
(Wow, this programmer art looks TERRIBLE when zoomed in!) There are a few things I can do to fix this.
Stop ignoring tiles already on the closed list, even if the tile I am currently evaluating is better.
Use a better G cost for diagonal tiles. Right now the G cost for each successive tile is the previous running G cost + 10. Should be something like +10 for non-diagonal tiles and +14 for diagonal ones.
Apply a smoothing value to each heuristic cost to "prefer" straight paths over jagged ones.
Now, that I think about it, I will likely do all three.
August 21, 2013 Progress
Another pretty productive day! I spent some time playing around with spatial layouts for levels. For now, I am going with something in between a fully connected graph of tiles (nodes) and a navmesh. Reason for the hybrid is I would like to use more computationally efficient pathing algorithms like A* for moving across large distances, like between rooms or across entire levels. When getting closer to a target position we can then let local-motion behaviors do the rest! Well, that is the idea for now. So, I ported an old C++ version of A* I wrote for another roguelike prototype into C# and found a pretty nice implementation of BlueRaja's PriorityQueue that is heavily optimized for pathing algorithms and worked that into the solution. The result:
This path is pretty easy, let's try something harder shall we:
What the!? Well, it looks like my pathing algorithm is not very optimal, although I would like to point out that it did find a path, albeit not and optimal one. I guess this explains the jumping monsters in the last prototype! So as you can imagine, next up, figuring out this bug.
August 20, 2013 Progress
Since I have been working on prototypes for a while now, there is no really good starting place. So I will just begin with what I built yesterday... I finished some refactoring and un-broke sprite animations. I also managed to get some basic tile-based player movement and camera following going as well. This morning, I added vertex color shader support to sprite batch materials. Previously, I thought just setting the vertex color array on Mesh objects did would enable this functionality, but I was wrong (as usual). Oh, and I added my first-ever Unity sound clip for when the player bumps up against a wall! Okay, not super spectacular, but all my previous prototypes have ignored sound. Random image for the day:
I Forgot to Mention...
Before I start dropping dev logs, I should probably talk a bit on what I am actually working on to give some context! I have been designing a rogue-lite/coffee-rogue for quite some time now and I think I have 2-3 really solid designs that would not only be fun to play, but fun to implement. I don't want to talk to much about the actual details for the design(s) just yet because I am still prototyping and playing around with tech and there is not much to show. So onto prototyping. I have been working in Unity3d so far, but Unity3d is pretty new for me so there is a bit of a technical learning curve to just about everything I make with it. There are many other tools that I would be much more proficient in, but given a lack of libraries, project startup fatigue, and cross-platform support, Unity3d just makes sense for now. I can always go back to making my own engines if the project warrants it.
Wow, so this is a dusty tome...
It has been a few years since I have posted here eh? So much has happened since I first started this blog I don't know where to start--so I won't. I think I will pick up things by updating the theme of the blog to something much more simple--no more of this fancy mosaic business. I will also be converting this blog to more of a daily (hopefully) rambling dev blog. This means many of the posts will be brief, rather disconnected, and possibly much more random than before, but I will still try to work bigger pieces in there for tutorials and the like. Well, here goes nothing...
Guess Phrase--The End?!
So tonight I decided to roll back some controversial "drinking" categories and fix up a few tiny bugs that were still hanging around in Guess Phrase. Man, it feels like ages since the last time I worked on that game... I have been getting a lot of questions about whether I plan to continue supporting Guess Phrase or what kinds of content can I add etc.. I think the best answer right now is Guess Phrase has been an awesome experience but I feel like it has nearly run its course. Of course I will continue to support Guess Phrase--bugs and device support--but, if I was to do some feature development Guess Phrase would receive a complete overhaul*. Anyhow, this means that as I type this a new and possible the last version of Guess Phrase is out on the Android Marketplace! So what are you waiting for? Go get it! (Or if you are really awesome and already have it, UPDATE IT!) Enjoy! *And this is not likely...
Starcraft CBR AI Updates
The Case-Based Reasoning AI (published) research I did last year was just put into a video competition for this year's AAAI. http://www.aaai.org/Conferences/AAAI/2011/aaai11videos.php It's pretty exciting to see my work next to the likes of Ashwin, Mateas, and the like again! Here is an almost final version of the video Michael Floyd (a Ph.D over at SCE) has created for an entry. If you are bored with geeky stuff like this you can just skip to 2:00 in the video to see our short excerpt. The video: http://www.youtube.com/watch?v=wxm0QucO_zg
Also, if you want a copy of the published paper (it's veeeery fascinating), go here: http://chadjmowery.iterativeintelligence.com/publications.html
Amazon App Store Launches with GuessPhrase!.
So the Amazon App store launched today with just under 1000 games in it--including GuessPhrase! Go here and check it out:
Updates
It has been about a month since GuessPhrase has gotten a content update--my apologies to the community! Things have been pretty hectic for me lately. I am getting ready to transition to a new job that requires a significant relocation. This will happen in the next few weeks so around that time I will be sure to push out at least 1 new category. I'll keep you all posted...
Completely Random Topic: Bumpy Maps
Just me playing with some Bump Mapping tech. The cube is rendered using a custom highly optimized VertexBuffer and IndexBuffer renderer I wrote that allows for on the fly automated generation of new primitive geometry. There is just a simple light source that rotates around the Y-axis of a textured cube to show off the shadowy effects. Here are the vids:
And a texture close-up:
(Not shown but in use is a 3D camera system that is based on Quaternions and not Matrices making it a bit more performant and won't succumb to gimbal locking that you get using standard Matrix rotations.) For those of you who are not familiar with Bump Mapping I won't go into any gory details here because a quick Google search on the subject will provide you with much better information than I can give. But as a quick overview basically what is happening is that I take a standard flat texture like this one:
Then I generate a Normal Map from it using standard tools available in Photoshop or plug-ins available to Paint.NET (which is actually what I used). That normal map looks like this:
I then wrote a Shader using HLSL for XNA/DirectX that takes information about where in 3D space the camera is, the camera's projection, and the world coordinate system and then performs UV mapping of both textures onto the cube. Finally I take the DOT product of the light source vector and the surface normal vector of the normal map to find the angle between them and perform some pixel manipulations based on the resultant angle. Of course some additional work goes into finding the tangent space vectors etc., but that is just an extra unnecessary detail for this post and is only used for geometry that has curved surfaces.