Showing posts with label panda-town. Show all posts
Showing posts with label panda-town. Show all posts

Sunday, September 18, 2011

Weekend Updates - Indexing and Graphics

A hodge-podge of generally undirected game updates took place over the weekend which I wanted to write about.  Now that the in-game menu functionality is working I'm getting close to having nothing but a handful of random details to cleanup before the engine and game are actually playable entities.

Indexing

One thing I found that I overlooked in my originally programming of the engine was the fact that, since the player is movable, the player may at some points be in front of an object while at other points might be behind an object.  The problem came in when I realized I was not re-ordering the array of on screen objects, so when a player walked behind an object, the entire player sprite was still drawn on top of the sprite for the object which they were supposed to be behind.

On the surface this isn't a major problem and I was able to write up a sorting function to pass to Array.sort which ... sorted things out.  Writing up the function however brought a larger issue to light.  In order to get objects which were literally on top of other objects (ie, a coffee cup on top of a table), I had to introduce a gameHeight property to each game object.  This property I used to indicate how far off the ground something was assumed to be and my sorting function could take this into account when calculating an objects relative position.

This may end up being sufficient for this game, but I feel like the engine in the end needs to more robustly handle the fact that I'm essentially working in a 3d environment but drawing in a 2d context.  For instance, I may end up reworking the object positioning mechanisms so that their position is defined in 3d space and the engine does the work of calculating where to map those objects to in 2d space for presentation purposes.

Graphic Work

I've been putting off drawing more sprites, largely, because I got so sick of it after making all the sprites for the room itself.  This weekend however I decided to hunker down and start work on the panda walk cycles again.  It was as much of a pain as I expected it to be, but I got the forward walk cycle done and am now moving onto the left walk cycle (which will be repeated as the right walk cycle).

All of this graphic work has led me to the conclusion that, for my next game, I need to just pay someone to do this for me.

I still have some cleaning to do, but here's the general idea of what the final walk cycle will look like

So, what is left to be done?  I'll try to get a list together for a future post, if for no other reason than to provide myself with a checklist of sorts.

DnL8Tar

Sunday, September 11, 2011

Game Play Decisions - In Game Menu

I've spent time over the last couple months deliberating on (and soliciting opinions concerning) alternatives to the Panda-Town engines current game play scheme.  Right now, when a player clicks on an object in the game, the engine assumes that the player wants to interact with the object.  The engine looks up the appropriate interaction based on the objects current state and then executes that interaction.

While simple, this scheme has a couple drawbacks which have become quite obtrusive in my game design.  First, it limits me to defining one interaction per object per state.  This means, for example, that if I want an object such as a coffee cup to be something the player can pickup, I can not also have it be something the player is able to look at since I can only define one interaction.  A second drawback is that a player clicking on an object may not be in fact attempting to interact with it, they may simply be trying to walk towards it.

I've decided that the play scheme needs to be updated to allow for multiple types of interactions and to force a player to indicate that they are actually attempting to interact with an object.  The direction I am going to take in implementing the first component of the change is to cause a small in game menu to open when a user chooses to interact with an object which exposes more than one type of interaction.  For instance, if a player can either "look" at or "pick up" an object, when the player indicates that they want to interact with the object, they will see a menu with these two choices.

The general idea

Deciding on the best scheme for the second component of the change has proved to be somewhat more cumbersome.  This is due in large part to a restriction I have placed on myself, limiting input to left mouse clicks.  I have placed this restriction on myself in order to allow games made with the engine to be played on devices such as an iPad.  Currently I'm planning on having a player indicate that they wish to interact with an object by double clicking on the object, but I have not settled on that yet.

Side Note: An interesting consequence of the first component of the change being made is that it makes it easier to code interactions from a distance (ie, allowing a player to look at an object from across a room without having to walk up to it).

Side Note 2: I'm readily accepting feedback from anyone who is a point and click game enthusiast (or who has at least played one in their life) concerning the control scheme I've indicated


Saturday, April 30, 2011

First Look at the Panda Facing Left

I took some time this afternoon to draw up the template image of the panda facing left ... or ... right I suppose from his perspective.  

Looking left

The black outline will serve as the frame of reference for the animation of the panda walking left (or right, I'm going to cheat and just flip the image, making any minor corrections for the rotation necessary.

Tuesday, March 1, 2011

Game Engine Design - A Free-For-All

If you Google "game engine design best practices" or "game engine design techniques," you get a real melange of results, few of which provide much immediate value outside the satisfaction of personal curiosity, on the off chance that you are curious about the design of a particular game engine.  Since the engine I'm building / have built is my first one (well, probably third or fourth, but first to progress to the point of actually being able to run a game) I'm no expert on the subject, but I've learned enough to find that a game engine is a very single purpose beast.

This singularity of purpose leads to the lack of "best practice" in the domain.  While I'm sure if I took a series of classes on game design and game engine design I would be fed some "best practices," or at least, design patterns, the creation of a cookie cutter game engine, while theoretically possible, would be such a boondoggle it would rival if not trump the practice of low-level-design in traditional software programming.

Simply put, what works for Final Fantasy is not going to work for Angry Birds, and the effort of trying to make a one size fits all game engine, and coding to the engine, would be considerably greater than coding two game engines. Since I write all this as a personal opinion from the perspective of someone who has minimal experience in the field of game development,  I will be providing no hard evidence to support my rambling, so take my statements for what you will, however the direct correlation between the complexity of usage of a framework / engine and the level of flexibility afforded by said framework / engine has been demonstrated time and again (and I'm sure if you enter a magic series of keywords into Google you'll find some evidence to that effect).

And now for something actually interesting, another demo sprite.  Enjoy

a Panda, standing, in a v-neck

Saturday, February 26, 2011

Panda Town Sprite Development

Since this is my first official post about the Panda Town project, for those not yet familiar with the project, it's probably also the first you're hearing about it.  To give you the brief intro, Panda Town is a game I'm working on, the engine of which is entirely Javascript (though the game definition is housed in a tripple-store and delivered asynchronously to the game engine upon request).  Graphics are courtesy of HTML5's canvas element (which is an element with a LOT of potential for those of you who haven't played with it yet).  I'll post more about the engine itself in the future but right now we're talkin' graphics.

Being my first venture into Sprite Graphics (I don't know why I capitalized those words), I'm having to draw and re-draw a lot of the work, but some of the elements are starting to coming together.  I want a bit of a retro feel to my work, something maybe reminiscent of Zak McKracken or Monkey Island (the early Monkey Island, not the newer stuff (which is also solid work) ).  My primary tool thus far has been Photoshop and my best friend in Photoshop has been the 1px pencil tool which gives the image the blocky feel that I'm looking for.

A Panda and his coffee

Working with the constraints of individual pixels and the constraints of a particular feel has been a great exercise thus far.  The medium, while challenging, is also somewhat rewarding, especially for someone who still loves the classic feel of Maniac Mansion or Lolo. Just changing a couple pixels can have a huge effect on the way the image is perceived since you're dealing outside of realism and have to trick the eye into seeing some degree of continuity.  

As I get further into the drawing I'll probably post some more teasers.  At the moment I'm waiting until I figure out what I want the floors and walls to look like (and by that I mean waiting until I have the patience to draw the floors and walls) to post any full rooms.  I also hope to talk a little more about the engine soon since it's close to being done.