Monthly Archive for January, 2009

Piracy! – The Card Game

Piracy! is a card game I invented today. It’s about pirates. Yeah.

To play Piracy, get a normal deck of playing cards — remove the Jokers, of course — and split it up into suits.

This game is for 2-4 players.

  1. Each player chooses one of the four suits and places their Ace face up on the table. This card represents their harbor. The other 12 cards are their hand. There is no luck in this game. It’s all strategy and trying to predict the actions of other players (and remember their past actions).
  2. If the day is an odd number -  like today, January 25th, the oldest player goes first and play continues counter-clockwise. Otherwise, the youngest player goes first and play continues clockwise.
    • No, it doesn’t really matter. Just pick a first player and direction by some method and stick to it (that direction, not necessarily that method).
    • If you do use this method, twins should probably flip a coin. Triplets should roll a six-sided die and subtract three if the result is four or greater. Quadruplets can use a four-sided die or flip two coins and call both.[1]
  3. Each turn, a player may elect to attack, deploy a ship, or pass. They may only do one of these in a given turn.
    • Deploying: Ships are represented with face cards (Jack, Queen, King). To deploy a ship, a player plays one of them from their hand onto the table.
    • Attacking: Attacks must be launched from ships. A player chooses a ship to attack with and a target player, then chooses a number card (2-10) from their hand and plays it face down to represent the attack. The defending player can choose to defend by also playing a number card face-down. The cards are then flipped over and the player with the higher number wins – the other player’s ship is sunk (discarded).  If the number cards are the same, neither ship is sunk. All the number cards involved are also discarded. When a player has no ships, their harbor can be attacked. Harbors can defend just like ships.
    • Passing: Duh.
  4. Winning the game: When a player’s harbor is destroyed, they are out of the game. The last player remaining in the game wins. In the event of a stalemate (i.e., no player can make a move other than passing), the player with the most ships wins. A draw is possible.

That’s all.

[1] No, I’m not ignoring quintuplets – this is a 2-4 player game.

Let There Be Ads!

I didn’t really want to put ads here, but now that I have, it doesn’t bother me at all. Google’s text ads were easily configured to blend into the site. They actually look quite nice, I think. Kind of gives it a newspapery feel. I dunno. In any case, I hope these will help offset the costs of running the site. We”l see =)

School resumes tomorrow, which is now today, Monday. Comicing resumes um… whenever I get a chance!

Situation normal. ^~

Status Update

It’s Friday, and my job at Countrywide ended yesterday. I am now well and truly unemployed.

Saturday is going to be spent primarily on planning for the semester, since I have had yet another class cancellation. Classes start on Monday and they’re still canceling the damn things on me. Ugh. This school is so poorly run it’s absolutely infuriating.

Sunday is partially occupied by working on my dad’s band stuff. Hopefully I can help them gain some exposure.

Monday, classes start back up (as I already mentioned) and I’ll start attending a transgender support group thing, ’cause I could really stand to benefit from that… I think.

That’s all for now! Oh, and a new strip is up. Go read that. Fluid dynamics is about as awesome as subject matter gets.

Mirage Worlds

“Mirage” means several things to me. I have used the name for my Second Life avatar, who is also the main character in my comic, for example, but what I’m really doing with that name is simply seeking a poetic synonym for “avatar.” Technically speaking, a mirage is a reflection or refraction of light through air due to sharp temperature differentials. Poetically, it is a shallow copy of something, having the appearance — but not the properties or identity — of the thing being copied.

I’m not suggesting “mirage” is a better word for “avatar” than, well, “avatar.” I am explaining why I have used it for my SL identity, and why I have used it for my new project, which is what I am referring to in this post.

Mirage is a framework for building games and virtual worlds. It is at once an API, an engine, and a design. It is intended to be like the Web. It doesn’t speak HTTP and it doesn’t run inside a browser, as both of these would be pointless hindrances.

Instead, Mirage consists of a suite of concepts at its root. These concepts are simply described in terms of how they relate to one another:

  • The Browser is exactly what it sounds like. Instead of visiting websites, which are conceptually collections of related web pages (and other content), the Browser visits Worlds.
  • A World is logically similar to a website and consists of a number of related Places. Like websites, some Worlds may require you to register and/or log in (and possibly pay a fee) in order to use some or all features of that World. A Mirage World might be a simple social space, an open virtual reality in which users can upload and place their own content, or even an online game.
  • A Place is an individual location where users’ avatars can gather to play, socialize, build, or do whatever it is that the World enables them to. It is logically equivalent to a web page, though a closer analogy might be to a room or zone in a multiplayer game.

Those are the three main components. In addition, there are static data servers (simply HTTP servers) which World owners provide to allow Browsers to download the World’s static data – which might be maps, avatars, objects, scripts, screen elements, fonts, and/or anything else that the World needs to run that doesn’t need to change.

This project is progressing again after some stagnation. I had to redesign the networking module, which was way too unreliable and didn’t fit well with Pygame at all. I’m also having to rewrite some of the things that connected too closely to the old networking system, like storage of shared data, which was poorly designed and used directly by too many pieces of the code.

With these redesigns, I should be able to stabilize the velocity and trajectory of this project and get to alpha before I get bogged down in something else. At this point my major concerns are developing more test content, putting together tools to help with authoring and publishing world content, security concerns (Python will have to be sandboxed for client-side scripts for the same reason that JavaScript is in web browsers), and fleshing out things like visual effects, configuration, and the scripting API(s?).

That may sound like a lot, but I already have a networked client displaying an isometric tile map with placed objects and avatars which can chat, move around the map, and play animations and sounds, and I’ve done just enough optimization of the rendering and data storage mechanisms to make the client load up in a few seconds and then freely scroll an enormous (10,000×10,000 tile) map at a good framerate thanks to aggressive culling of the render frame.

I realize most of what I’m doing here has been done before, but the concept itself is quite novel, and I’m reinventing the wheel in places intentionally — this is intended to help me to learn many different things about game development and design, from low level optimization skills like culling and caching to big-picture design methods and the ability to write approachable, flexible, and maintainable code, APIs, and tools.

One-Algorithm Rubik’s Cube Solution

My good friend Lomgren has shared with me a fantastic little Rubik’s Cube algorithm his father stumbled upon after years of futzing with the world’s greatest puzzle. It is as follows:

2L U’ F’ U F L F’ L

The kicker? His solution to the cube uses only this algorithm! Well, and its reflection. He didn’t tell me what he meant by that, and the standard interpretation of the term doesn’t seem to yield anything interesting. Maybe he meant the inverse, which would be:

L’ F L’ F’ U’ F U 2L

After doing it (the normal one) three times, you’ll get a case on the bottom (starting from a solved cube) which may look familiar. It is one of the three last layer cases in the beginner’s method – where three corners need to be rotated the same direction. Starting with the solved corner in the UFR position, the solution is:

3(U 2(D’ R’ D R)) U

Very interesting. Anyway, with that one algorithm (2L U’ F’ U F L F’ L) and its reflection, he solves the entire cube (after the first layer, which of course doesn’t take formal knowledge of any algorithms, even if it technically employs simple ones – potentially many of them). Is that awesome or what?

On my method, for the curious (after the read link):

Continue reading ‘One-Algorithm Rubik’s Cube Solution’

Geany In A Bottle

Geany is my new favorite IDE. It is lightweight, simple, fast, powerful, very configurable, and absolutely perfect for Python development. It’s everything an IDE should be.

I’m using it to replace SPE. While SPE has a lot of features that make it better than Geany for Python development – chief among these being that it is written in Python itself and has better autocompletion – it is rather slow and has a number of bugs which make it crash, which is something I absolutely cannot have happen while I’m coding.