cpowell

LD25

Ruby Entity-Component Framework available

For participants who might be interested in creating an entry using JRuby + libGDX, I have published the Ruby Entity-Component Framework.

This framework is designed to help game authors construct modern, high-performance games using the elegant Ruby language and an alternative to OOP called an “entity-component system”. An Entity Component System is a programming methodology that successfully addresses many shortcomings of OOP and streamlines game creation and maintenance.

It leverages JRuby for elegance and libGDX for its strong community and features. I also have a Slick2D variant that I can publish if there is demand for that.

The source, including a very simplistic “lunar lander” type game (for teaching purposes) is here:

https://github.com/cpowell/ruby-entity-component-framework

I’m documenting the framework as fast as I can here:

Entity-Component game programming using JRuby and libGDX

(3 parts written, ~5 to go…)

I hope this piques your interest, and I’m open to feedback and suggestions for improvement.

Comments

cpowell
07. Dec 2012 · 23:03 UTC
Just posted Part 4 of the Entity Systems doco on my blog:

LD26

Fuzzy logic “Fuzzy Associative Memory” Ruby gem released

A Fuzzy Associative Memory (FAM for short) is a Fuzzy Logic tool for decision making. Fuzzy logic FAMs are highly applicable in Game AI.

A Fuzzy Associative Memory uses Fuzzy Sets to establish a set of linguistic rules , e.g.:

  • “If the orc’s hit points are a little low, retreat from the enemy”
  • “If the enemy is distant and my rocket ammo is low, the rocket launcher is a poor choice”
  • “If the enemy is near and my shotgun ammo is okay, the shotgun is a very desirable choice”
  • “If the ship is off course by a little bit, correct just a little to the right”
  • “If the bird is much slower than the flock, speed it up a lot”

The linguistic rules, and the fuzzy sets they contain, are defined by a human “expert” (presumably, you). That is to say, the rules codify intelligence and map this knowledge from the human domain to the digital.

After the rules are defined, a FAM is consulted to help your AI make a descision:

  • The orc retreats, attacks, strafes.
  • The ship launches long range missiles or fires short range guns.
  • The control rods are lowered into the reactor or raised out of it.

As you can see, the fuzzy rules are deliberately vague and use qualifiers like “a little” and “a lot”. Furthermore, the lines between fuzzy sets are intentionally blurry. This is the nature of fuzzy sets; they capture such human fuzziness in a way that extracts highly natural behavior from the fuzzy rules. When defining these rules, it helps to imagine interviewing a bona fide expert in the domain and writing down the skills necessary to be successful in the domain.

Learn more, and get the Ruby Gem for your own game:

https://github.com/cpowell/fuzzy-associative-memory

Tags: AI, artificial intelligence, fuzzy, ruby

LD27

Steering Behaviors for Ruby game programming now on Github, Rubygems

I just released my Steering Behaviors package to Github, and an accompanying Gem to Rubygems. Steering Behaviors are utilized to ‘drive’ autonomous game agents in a natural manner, and include such behaviors as predictive pursuit, fleeing, arrival, and wandering. Embellishments and expansions are planned, but this is working software you can use to drive your own game’s characters. (I’m using it in my own game programming.) The Github repo includes working graphical examples. Pull requests are enthusiastically encouraged.