Categories
Code General Post

Review: jQuery Game Development

Ok Book review time.

I generally read a ton of tech books, and decided to post some thoughts on this one.

jQuery Game Development


If you’ve got a desire to write games using the DOM and already familiar with basic javascript and at least some experience with jQuery then you’re the target audience of this book. If that sentence contains words you don’t comprehend then I’d do some additional reading first.  Decent understanding of html, OOP  and maybe having a smidge of PHP knowledge definitely won’t hurt either.  If you’ve done some basic selecting with jQuery and maybe implemented a plugin you found on the web or two you’ll be set.  But you’re gonna want to be not afraid of code you’ll be fine.  So it’s not exactly for everyone.. but if you are you’ll find a wealth of information inside.

Basically the book is a crash course in building a game framework from scratch.  The book , including animation, motion, building a game loop, loading levels and much more.  The examples are broken up into a series of short games. Each of the games explaining building up on a basic concept and explaining why it does what it does, and sometimes going back and improving on a concept from an earlier chapter.  It starts with frogger and winds up with multiplayer online rpg thing.  Chapters 1-6 are a great resource covering everything from basic sprites all the way up to isometric tilemaps and occlusion but then …

Chapters 7-9, however, go a bit off kilter.. 7 is a half-hearted summary of building a php database backend,  8 is for integrating with twitter and facebook and finally 9 mobile development.  All of which are simply too big and complicated topics to get a single chapter in a book and/or have nothing to do with jQuery.  And you’ll be repeated warned to never use the examples in chapter 7 in a real game.. which seems to pretty much defeat the purpose of the book.

Chapter 10, however is a great resource for all the headaches and pitfalls that are involved in implementing HTML sound.  In fact it’s probably one of the nicest summaries of the mess that is HTML sound that I’ve read, and how to implement it in the framework we’ve been building.

++ Overall, a lot of tech books seem to go into obsolescence fairly quickly, but the core knowledge in chapters 1-6 is going to be pretty rock solid for a long while and worth the price of admission.

++ Grammatically and logically the book is presented well with concepts that build upon each other.

+- Code samples for the most part make sense, however the author has a tendency to as he puts it ‘avoid typing’  so he abbreviates lots of function names which gets a little confusing

TLDR;

Good book, lots of useful jQuery implementation tips

 

Categories
General Post SwiftThought.com news

Shake the foundations

Ever have one of those days when the status quo just doesn’t do it anymore?

Time to step out of my comfort zone. Its time to stop taking it easy. Dreams are made to be chased. Survival is not just enough to live on.

Yeah.  Me too.    I think it’s getting to be the point where it’s time to shake this shit up.

 

Categories
Art Code design Development Post

Barnyard Bonanza – Week End Update

 

Woo good Week!

New Beta 6!

  • Better Odds manager (you can see it by clicking the puzzle piece on the Main Menu)
  • Reworked tons of the Odds and Money manager backside so money should be handled better.
  • Implemented adMob ads 🙂
  • Got a good start on painting the home screen .. then did it again as photoshop crashed. (FML)
  • Made the loading screen handle screen changes and stuff magically.
  • Reels are generated a bit more realistically and auto re-factor every 100 pulls
  • Started getting sound fx implemented .. not working on desktop .. sometimes on android.. :-/

Here’s Some screenshots, a link, and a QR to the apk

Download the latest beta (006) here http://www.swiftthought.com/temp/BarnyardBonanza006beta.apk

Next up:

  • Turning sound on/off :-/
  • Get the Powerup Buying working
  • Maybe a mini game!
Categories
Development Games Post

Yaay Death and Stuff

So while it’s only 2 new tasks complete, there’s 2 more that are 80% there and others are planned out.

Here’s a recap of new stuff:

  • PCs and monsters now shoot and damage each other with functioning ranged combat!
  • PCs can die!
  • Monsters can die!
  • Monster spawner behavior is 90% there
  • PC equip-able items / attacks are close to being there.
  • New portraits are almost done.. then we’ll have 3 different PCs
  • Project title finally announced:

And Here’s a new Screenshot showing some of the things that you can see:

Categories
Post

LOS Targeting

Minor but important progress. Holidays (and Skyrim) were not as conductive as hoped to progress.

Map entities (monsters and PCs) now scan for the nearest visible targets within their field of view and as within LOS on the level map.

Monsters now have a new behavior available on spawn which is to start stalking a Random PC.

The goal is to have several behaviors available for monsters to utilize what cna be mix and matched during levels.. (patrolling.. random walking, waiting,) and then have events and triggers switch them out asin-game events etc..

Next up.. either monster spawners or starting the prep work for combat mechanisms.

 

Categories
Code Development Post

More Progress

Good progress.. A little slow.. but progress nonetheless.

PC icons (as seen below as the Tokens with Wizard faces on them) can now be selected, and told to move to proper spots on the map and assigned a facing location.

Also good progress on the whole monster spawner Behavior.  Still some thinking to be done on how to do some of the details but I must say it’s really nice to be making tangible progress again.

Categories
Post

Progress Update

Categories
design Development General Post

Stalls, Inertia and Progress

I’ve followed a ridiculous amount of indie and small developer projects over the last couple years and watched them just peter out and vanish into the ether.  Hell, I’ve started quite a few that have gone the same way.. unfinished paintings, games, websites, etc.  So why does this keep happening?  What can we do about it?

Well.. It seems to be all about preventing Stalls and building Inertia to make manageable Progress.

Stalls

By ‘Stalls’ I mean it literally like a plane..  Sometimes projects get caught up on a glitch, bug or feature that is unexpectedly problematic or simply a massive chore to complete.  Then the motivation to work on it stops being fun and an awful lot like work.  That’s not a problem if it’s your day job, you can button down and just work through it, but for the indie developer who is doing this in their spare time, once development stalls everything else starts looking more and more interesting and exciting. The longer the project remains stalled the stronger the chance is that the project is going to crash and burn.

So here’s a couple thoughts on recovering from when your project seems to be stalling and the enthusiasm is waning that seem to be working for me.

  • in my task list, I keep several parallel development tracks.  So if UI development gets bogged down, I can simply just get it to a basically compiling state and hop over and work on something else in the project, like art assets , AI or path-finding.
  • but sometimes you just get sick of the whole project.   If you’re like me, you keep running across things/tech you want to try and work with, so keep a folder/binder/google doc around where you can jot down ideas for short exploratory exercises however it’s essential that they pertain to some shared functionality with your ongoing project.  So give yourself a day or two to work on it (like making a demo with a new api or skinning a UI library or something) Then force yourself the next day to IMPLEMENT it in your current project.
  • but some times you simply have to force yourself to sit down and bite the bullet.  Schedule some time, get away from distractions and simply sit down then work through it… yeah sounds stupid, but the ‘Schedule some time’ part is what makes this the hardest approach.  Which brings me to the next problem

Inertia

The fact that this isn’t a dayjob for many indies it means that life can sometimes turn the smallest molehil into a mountain, because Everything is a competition for your time, and the rolling rock of your project can’t go uphill very far on its own.  So we need to build up momentum in our project, make it feel like it has got a life of its own or decrease the amount of work it takes to get it rolling again once it comes to a complete stop.  Because, your time is precious and limited (even more so when you start having to work around a family life and maintaining a home) I tend to lean heavily toward the second approach, decrease the amount of effort needed for the next milestone.  I can imagine that the first approach would work well if you have a small team where everyone is all rushing forward together, so when one person stumbles the ball keeps rolling along and lets them catch up after their personal disaster has passed.  However I’m just me by myself so my tips lean toward:

  • Get your project compiling as early as possible.
  • Add basic core gameplay as soon as possible.
  • Build you milestones on that and make them each a standalone ‘functional’ improvement.

Because, sooner or later, something is going to come up and you’ll have to step away from your daily progress for a week or two, like children, broken computers, holidays, family vacations, household chores etc etc.  And when you come back to having time to work on your project you gotta hop back on the ball and be able to easily see where and what to do so you can get to that next ‘hey I’ve made something cool!’ moment and prevent yourself from stalling out.

Progress

Progress is king.  Progress also doesn’t like being kept in the corner. Getting your project to a point where you can shout out about your progress, via tweets to #screenshotsaturday, self serving blog posts like this, friends and family on Facebook, myspace, g+ or whatever is essential. Take pride in your progress. Get used to practicing saying in public that you’re working on something, have made progress and show it off.  Make it real to you and it will be that much harder to drop when the new toy sheen tarnishes and you have to spend a week debugging the text editor.  It seems almost impossible at times and the odds of actually finishing something really are stacked against you but it can be done.  And with great success.  MinMax did it over a period of two years,  CokeAndCode is doing it, RampantCoyote has done it,  all of them with keeping a dayjob, family and real-life’s responsibilities.

I hope to do it too.

[deleted a bunch of excuses for my lack of progress.. lets just chalk it down to life’s little mountains]

 

Categories
Art design Post

Third Time tis the Charm

Ok, needed a bit of a fresh mental break from typing and numbers for a day or two so I started the beginning of the large pile of character protraits that I’ll need to make (somewhere between 10 – 50)   That’s the joy of doing things as an indie developer.. I can put on whatever hat I want to today.  Granted at some point I’ll have to put on the businessperson hat and then it’ll not be so much of a joy.. and when time comes to put on that 400lb steel and barbed wire hat labelled accounting I’m sure it will be no fun at all.  But today… today I’m wearing a paint spattered cartoony beret.

Oh and I also got a large chunk of the UI implemented.

Looks a lot like yesterday’s post?  Well it should.. except this one works and lets you scroll the map etc etc.

 

Categories
Code design Development General Post

Bits N Bobbins

Short post on progress things.  Things have just been lots of grunt work and non pretty things.

Will have things to show real soon.

Honest.

  • basic player object ..er.. exists and rotates properly.. mostly.  need to knock out some better test sprites and stuff to be able to make things actually ‘work’ together, but the fundamental concept of 8 direction independently moving head, torso, arms, lowerbody seems to work and will look pretty cool.
  • monster entities can be spawned and basically kept track of.. no AI or whatnot but still it’s a start.
  • Implemented basic box2d physics for player and monsters. this will have all sorts of fun payoff later I hope. Force waves, shapnel etc 🙂
  • Got the macro tiles wired for a* pathfinding.
  • Got the World generating a Maze and then replacing it with matching macrotiles that randomly match the exits of the cell.
  • started on map rendering
  • camera instance screen objects so I can have a smooth moving controllable camera that chases the player.
See.. lots of neat stuff… however nothing that you can actually look at other than a bunch of  diagnostic log output.
Performance wise it seems to be running at ~240 fps on the low end test machine and ~somewhere over 3,000 fps on the new machine.
So I might need to add in a ‘laptop’ mode which disables the whiz bang pretty stuff I hope to get put in.
and damnit .. http://www.garagegames.com/products/torque-3d the introductory price will be ending soon.
So I’ve got to grab that soon.
Categories
Code Development Post

Building Better Tools

So, basic progress is in swing.  There’s a bunch of stuff I can port over from the GarageGames Torque Game Builder version that I was working on, however, there are a bunch of things that I didn’t need then or just do not have access to in Java or just don’t integrate with Slick very well.  So with that in mind.. I’ve been digging  into Pre-Pre-Production.

To that end I’ve stated building a toolbox. Figuratively, of course.  Here’s a few of the silly things  that are a pain to write but very useful to have.

  • AssetLoader – based on the slick tutorial this little thing lets me have a loading bar on a title screen while the game loads every asset it needs.
  • OptionsController – manage loading and saving user settings and profiles for resolution, sound, and player name.
  • InternetFile / InternetString – for pulling a string (current version) or file (updated assets)  This makes keeping the user informed of latest news/ updated versions a snap.  Since Minecraft came out with an auto updater, it’s been glaringly obvious that at minimum having a latest version check is a MUST Have feature.
  • Movement Library – a pile of functions to take two points, and interpolate between them,given a method speed and time elapsed and whatever else that comes up.  I expect this to grow for some time.
  • ImageCounter widget – display a number with a series of images. Like hearts in zelda. Supports horizontal and vertical orientation, whole and partial increments etc.
  • Basic Image Button – yup it’s a simple little button made out of a bunch of images, it’s self contained and easy to use and change.
  • State Based Button – also called a modal button.  Essentially displays several options on a button bar and you can select one.
  • Text Block – an angelfont based text block widget , hand it a block of text, an AngelFont, and give it a max size.  It auto animates the display, pagination etc.
  • Text Entry – an angelfont text entry widget.  easy and simple..
and as I find things that would be handy in future projects I’m adding them to it.
So it turns out that making little widgets is actually really kind of fun.  Much like building the IrisEdit level builder tool that I’m using to build the levels.
And with those tools in hand, I’ve created the game Launcher / Version Checker,  Here’s what it looks like without the Launch Game button (it goes in the middle)

 

Categories
Post

Setting sail against the winds of whim and staying the course

Wooosh… that’s the sound of another gale force great idea blowing around.
Yup, they’re pretty much everywhere at this time of year. Annoying, persistent, unformed, and generally really exciting!

The thing is, they’re always much more exciting and enticing than what you’re doing ‘now’. Especially if what you’re doing now is rewriting something you’ve done before, in a new engine. In the last 3 weeks I must have changed my mental description of what I’m working on half a dozen times. Each new project, idea, or whim is a terrible distraction that’s so much fun to just dive into.

Because for me the best part is the initial rush of putting ideas and framework into place and start various parts gestating. So when I haev nothing but a couple months of grunt work (asset managers, re-inputing pathfinding algorithems, importing graphics, dealing with text input etc) it is so easy to want to start over and tackle an enticing problem and find out how various systems would interact.

Hell, at this point I’ve practically convinced myself to ditch BSDDoD! and hop into making ‘Irismel’ – the fantasy village simulator instead.  I’ve even started making some basic tiles and mock screenshots.

That’s gotta stop.

It’s time to get excited about BSDDoD! again.  So I’m laying off the big coding for a bit and painting some assets, concept art and visually interesting things.

The upside is that I’ll have things to show before too long and I can get the show back on track.

I am, however, thinking of changing the title from Blood Soaked Deadly Dungeons of Doom! to something more palatable and url worthy.

 

Categories
design Development Games Post

Tech Choices: Walls

Assuming you’ve decided to build a 2d engine for a non side-scroller you quickly come face to face with one of the biggest decisions you’ve had to make so far.  How are you going to represent the game world? Basically there’s two choices each with their own benefits and issues.  There’s the ‘Walls are a block’ approach where everything is a block and the ‘Walls are an attribute’ approach where walls are things that are part of a tile and appear on the edge of a tile.  Here’s a little Pro/Con info that I jotted down while deciding on which way to go for BSDDoD.

Walls are a block.

Example: minecraft, zelda This is probably the most obvious approach to building a 2d world.  Everything about the world construction is handled in a simple array of blocks letting you quickly build a map.

Basic implementation:

It’s essentially a lardge 2d array that contains the structure of the world.  With each location in the world represented by a number.  For pathfinding you can easily implement floodfill tests and even weighting the passability of tiles is pretty trivial.

Upside:

They’re easy to implement and fairly lightweight, make a whole bunch of visibility / raycasting real easy and fast.

Downside:

Aesthetically they’re not as nice/real looking as what can be achieved with thin walls.  Destructible walls are more unrealistic and the wall type is determined by the block that is the wall.  So if you want blocks with different wall textures you have to create and track many more entities. Windows are pretty much out of the question and doors tend to look a bit odd.

Walls are an attribute

Example:  X-com, project Zomboid, old Gold box D&D games, the Sims

Basic implementation:

Every game tile has 4 flags associated with it used for indicating if there’s a wall. This means that there’s a bit of extra overhead but it comes at some interesting benefits.

Upside:

Aesthetically having walls look like walls is a big bonus.  Also the ability to do things like have windows, half height walls, one way doors and portals is nice too.  Also the ability to have different textures for a wall regardless of whats in the neighboring tile is nice (but there’s workarounds for tile based maps for this as well).

Downside:

Complexity.  Pathfinding, line of sight and collision detection all become significantly more involved, not necessarily slower,  just more complicated.

What did I choose?

Well since I’ve got a bunch of the art assets already created for a straight on view, I eventually settled on the Block based walls with the Straight on view (right side of the image above).  Really that was the deciding factor.  The straight on Blocks as an Attribute would just wind up looking odd and I have no need for windows or doors since it’s essentially an arena based shooter.

For the next project I’m leaning toward an isometric Block based map, however with blocks being smaller than the characters, so that will give thinner walls and hopefully a more enjoyable dungeon building experience… but that’s still way off in the distance, percolating on the back burner.

Categories
Post

Four indie things you should be playing

in addition to Minecraft.  There’s a whole bunch of really cool indie stuff that’s coming out.  Here’s four alpha/beta state games that are available for play now.  These are all fairly early in development (Terraria and SP&Z being the most polished) and if you’re interested in watching something awesome come out of the development process and getting to watch things turn into a finished game, warts and all, then these are all excellent examples and well worth your time.

Project Zomboid

 

http://projectzomboid.com/blog/ Isometric Zombie Apocalypse survival game.  As in, really surviving.  Health, hunger, exhaustion & boarding up the windows while scavenging for supplies in a neighborhood infested with the undead.  Really this is going to be very very tense.  The initial version available is still early alpha and manages to do so many things right.

Space Pirates & Zombies

 

http://www.spacepiratesandzombies.com/ Aims to go back to classic space combat and exploration with gameplay like Star Control 2.  You fly around various sectors and perform missions between rival factions to gain favor and unlock blueprints for new ships and weapons.  And then there’s the zombies and an overall massive plot and stuff. Available on impulse only for now.. but Steam is coming as well.

 

Terraria

http://www.terrariaonline.com It’s superficially like a 2D minecraft.. however once you spend a while with it it opens up to be much more.  It has a much higher emphasis on exploring the world, fighting monsters, summoning boss monsters and crafting all sorts of weaponry.  Oh and it has multiplayer support.

Starfarer

http://fractalsoftworks.com/ On the surface it might remind you of SP&Z above.. however gameplay is much slower and strategic. Feeling more like you’re flying large capital ships. At this point it’s a collection of fleet battles but the promise of an open universish campaign mode has lots of promise.  oh and it’s absolutely beautiful and has incredible ships.

Categories
Art Code design Development Games General Post

Enchanting Cadence post launch retrospective

What went right?

Well… lots of stuff really.

I managed to turn a paper prototype  into a fully functional game in two months.  Overall, game play grew and changed organically through the development process as low hanging fruit features were revealed.  Taking a project from A-Z in Slick was very educational (which was the primary reason for the whole thing).

The facebook integration worked (albeit their documentation leaves something to be desired) for the most part seamlessly.

The back-end level creation and management web tools worked and the general process of back and forth data between the webpage and applet worked as anticipated..

The multi threaded stuff to send and catch javascript communications works and once the basic process was understood was easy to implement.

Graphics and Music. Visually the game managed to capture the look and feel that I wanted.  I was able to work out an efficient workflow to take concept /programmy placeholder art and iterate it to the final art.  No assets were lost and not a lot of dead ends or un-used art was created.   Overall the music worked nicely as well.

It was a nice first version, however not something I’d call mainstream release ready yet.

What went wrong?

The first three weeks were spent having the enchantment process be based off of what visually was happening on the board, this caused massive issues as framerates turned out to be really unsteady once the game was in an applet form.  The fix was to have a logical representation of the game board where the simulation was run and then just have the rendering update it’s assets from the virtual model.

It turned out that applets have a massive overhead when instantiating any sprite as they check the applet’s remote filesystem path for the files.  This lead to the implementation of a boltManager object which pre-creates 500 bolts and tosses them to the game logic as needed and returns them to the source pool when taken off the board.  This fixed the issue .. until I added particles.

Particle systems create an image loading hiccup as above even if it’s pre-created on their first .render call.  The fix was to change the applet call to isolate the applet from the webpage with <param name=”codebase_lookup” value=”false”> .. The downside is.. this effectively killed the idea of loading level specific assets from the website.. so suddenly everything needed to be included in the jar file.

Java <–> Javascript communications are paaainfully slow.

Gameplay wise, it reaaaally needs a tutorial level, ease of use features, and a better dialog box system.

Level design really did not lend itself to the whole 1-3 stars for each level completion.  Usually there was just ONE solution.

Not enough time to build good levels.  By the time I’d gotten enough features to behave stably enough, I had to cut several features and wound up with still only a week and a half to build all the 10 levels. (remember there’s a fulltime job, consulting work and family with baby who all come first)   As a result several of the levels are pretty shoddy.

Applet communications don’t work in Safari on mac, and the game rendering doesn’t work in other browser on mac (but the communications do)

Considerations general thoughts?

The primary reason for making this was essentially a way to motivate myself to finish a project and learn a crash course in SLICK and java.  In this sense, this was a roaring success.

Perhaps it was a bit much to take on as my first real Java application… naaah.. just because I spent 2 days wondering why my string comparisons never worked. (even went as far as building enums and value catalogs to avoid having to compare strings)  … then I discovered   ‘string1.equals(string2)’ … sigh..

Applets are too restrictive to be viable.  Pretty much every benefit of having a web program work in java (other than the openGL) is overshadowed by a downside.  Heck just getting it up on the user’s screen means they’ve clicked through several very scary warning prompts.  And if you want to do any kind of network communications behind the scenes (bypassing javascript comms) means asking people to punch holes in their firewall rules.   All of which make applets un-usable for general mass consumption.  JNLP’s seem better but they’re not very user friendly.. (they don’t ask you where you want to install.. let you know you need to un-install etc..)

In the future I’m leaning towards wrapped jars into exe files for Slick and java applications.

Thank goodness this was a 2 month test project, eh?

SLICK is a lovely codebase and java really is a dream to work with.  Any concerns I had about java being slow or whatnot really have been blown away.  If I un-meter Enchanting Cadence it easily runs at several thousand FPS.  Actually it runs so fast that the math behind the simulation can’t measure the time between cycles correctly and it all falls apart. (that’s pretty cool)

The SLICK community and the java-gaming.org guys are really helpful and there is a wealth of tutorials and training out there.

The future?

For Enchanting Cadence

  • facebook integration will go away, hell, the whole applet thing was a mistake
  • it will be a standalone application
  • the first level in each levelgroup will get a real tutorial. (introducing mirrors, introducing prisms…etc)
  • there will be help indicators showing the path and time bolts travel when hovering over a launcher
  • the enchantment track will show what bolts hit and failed on the last attempted enchant.  This will help you find out what went wrong
  • infinite loops will not be allowed
  • the dialog engine will be changed for better and prettier dialog boxes allowing for more narrative and flavor text to come through
  • more levels and assets etc.

In General

  • I’m building a group of tools to use in the standalone EC version that will also be useful in other projects
  • Blood Soaked Deadly Dungeons of Doom! is coming.  Much as I love TGB it looks like you always wind up needing to do some core C++ tweaks and thats beyond what I’ve been able to wrap my head around.. so I’m exploring basic things and techniques to get the new isometric view working in slick… (repeat after me… I will not try and go 3d… I Will not try and go 3d!… )
  • Mutant Sheep Eat the Earth! need some loving too…
  • Swiftthought Consulting work, of course, trumps all of the above.  🙂
So, lots of projects to keep the summer interesting.  Lets see how it goes.