venerdì 17 ottobre 2008

Fluid simulation

As small update to show the last results with the fluids:



The system relies on the GPU for blending of vortices textures into a final velocity field which is the read to update the vortices positions. The bluring is based on the provious blur.

giovedì 9 ottobre 2008

Fluid Prototype

I went on with the implementation of fluid idea. For the time being there is a fixed velocity field (the inverse of a vortex: the far from the vortex, the stronger the flow) from which a weighted LIC blur is computed. The weight function is chosen so that it express the direction of the flow (i.e. the background follows the flow for a certain time, then gets back to its original position). A perlin noise texture is used as additional offset for the weight function, so that the "come back" happens at different time in different places.

There is a lot of space for parameter tuning. Although the bad quality, this video shows the idea:

martedì 7 ottobre 2008

Tiles Prototype



I started coding a prototype to see how far I can get using tiles. The idea for the moment is to create a set of textures for each possible tile and then see if by randomizing them I can get a terrain that does not look too chunky.

This is a video of the early stage. I added a trivial logic for making the tiles collapse. This might be applied to specific types of terrain (sand). Graphically the collapsing are should be covered by a lot of smoke (dirty water).


This image show a test with randomized textures.

martedì 30 settembre 2008

The Map

Map concept

The game will take place in a sea region with a certain number of islands, seaports, with routes between these. Each route is mapped to a 2D scrolling level. Some regions of the sea are might be populated by sea creatures, mermaids or be patrolled by the kings ships as they are mercantile routes. A route passing trough one of this area will reflect the region characteristics in the corresponding level which will contain the specified types of enemies. Also the sea bottom (the rocks, type of plants, fishes, ...) will follows the same idea. Some levels will have route connection that the player might be able to unlock. In such cases, the map will be updated correspondingly.

Gameplay

The map can be considered as the strategic part of the game. The player starts in a small pirate seaport. At this time the map is almost empty and only a few routes are available. The player will chose its destination and the corresponding level will be played. Every level will end with the player reaching a new destination, that being a seaport or a routes-crossing point. The player will use the acquired money to buy information about new routes and ports.
The player might chose to navigate the same route multiple times, which means that the same level will be played multiple times. The start and end location however will reflect the player position in the map. When a level is played multiple time, the position and density of the enemies, treasures, etc will change.

Gameplay and AI Draft

Here goes some more detials about the gameplay and the AI. The submarine is going to be an agent. It will have its own sensor and its own understanding of the surrounding world. The sensors are:

- motion/metal detector radar

o always active

o long range

o detects any moving object (including sea creatures, ships)

o detects metal scrap (chest of gold, floating crates)

o all detected objects look the same

- front and back cone of view

o always active

o short range

o wide view angle

o fixed orientation

o detects the true nature of any underwater objects

- bottom cone of view

o active when close to sea bottom

o short range

o small view angle

o changing orientation (scan the sea bottom)

o detects the true nature of any underwater objects

o required to get treasures or crates into the submarine.

- periscope

o activate when close to sea bottom

o it’s used to check the ships

Pirates have a primordial way to understand the world, i.e. they focus on their needs. The needs are:

- Blood lust (they want to fight/kill)

o Priority list for targets

§ merchant ships

§ kings ships

§ sea monsters

o Increases linearly during the game

o Drops to zero when winning a fight

o Temporarily drops to zero if the submarine gets damaged too much

- Alcohol

o Pirates search for Grogh, Rum, Vodka in the ships hulks and floating crates

o Increases exponentially during the game

o Drops to zero when reaching any seaport

o Decreases a certain amount when getting some alcohol

o Sobriety increases submarine efficiency and chances of mutiny

- Sex

o Pirates are attracted by mermaid

o Increases slowly during the game

o Drops to zero when reaching a big seaport.

o Chastity reduces submarine efficiency and increases chances of mutiny

- Stay alive

o Pirates always flee from desperate fights

o Fear increases the submarine efficiency and temporarily decreases the chances of mutiny

The submarine has the following characteristics:

- Captain ability

o Increases during the game

o Drops to zero in case of mutiny

o Affects the submarine efficiency

- Submarine efficiency

o Speed

o Weapon accuracy and power

o Sensors’ range

o Auto repair speed

- Hull damage

o Decreases during the game

o Drops to zero when reaching any seaport

o Cause the game to end if reaches maximum value

- Arsenal

o Mines

§ High damage

§ Medium rate of fire

§ Float upward

§ Slow speed

§ Efficient against ships

o Torpedoes

§ Medium damage

§ Low rate of fire

§ Long range

§ Medium speed

§ Lock the target

§ Efficient against anything

o Cannons

§ Low damage

§ High rate of fire

§ Short range

§ Instant hit

§ Efficient against sea monsters, sea mines

o Electric shock

§ High damage

§ Low rate of fire

§ Close range

§ Instant hit

§ Efficient against sea monsters

Pirates Of The Undersea


Motivation

I just finished my studies and I have some spare time I can devote to a game development project. As background I am a computer scientist with some grasps in 3D and 2D graphics. My past experiences in creating games are limited to a single projects that lasted a school semester. The result are shown in this video.

I open this blog with the hope I will be able (read: I will have the time) to carry on with this project. Before entering into the details of the game I want to explain what is my position with respect to this project.

· I am doing this for the process, not the result. I enjoyed the past project so much, though the final result might not look that great.

· I like to share my ideas and I'm not that fond of the "they have stolen MY idea" conspiracy.

· I think that sharing this experience might be of some help. If not for you, at least for me.

· There is a certain chance that this project will die because of lack of time. One of the lessons I learned in the past is to be patient. An other one is that there are situations where you realize you don't want to resume a project because it does not fit in your scheduling or your motivation has changed. I consider this a good moment for starting this project. We will see how it goes...

Now to the game itself, here are the ideas I have at the moment.

Background

I had particular fun while reading about the Flying Spaghetti Monster. If you don't know what it is, just have a look at http://www.venganza.org/ and read the open letter to Kansas school board. As short recap… we are dealing with god, which is a flying spaghetti monster (FSM). The global warming is related to decreasing number of pirates, which are the true representative of the FSM Church.

Game Idea

The game is a “Lemmings” like - 2D game-play - game in which the player is the flying spaghetti monster and it must handle a Pirate submarine (just one at the beginning and maybe a fleet later in the game) so that the pirates reach a goal defined in the level.

The Pirates have their own consciousness and will, and they act only to fulfill their needs such as treasure finding, blood lust, escaping from their most deep fears, and so on. The player must lead the submarine in an indirect way, by casting gold chests on the ocean bottom, raging deep water monster, or calling the king ships to a certain position. Eventually the player will also influence the water by manipulating the sea stream.

Strong Points

The atmosphere and the graphics should be “Worms” like. Funny drawings and sounds, clean visual, vivid colors, etc. Casual gamers or non gamers are usually more attracted by this style. The sea is alive and should be interesting to watch just as a screen saver: the water will be animated, flocks of fishes will swim around at different depths, plants and other living things should populate the sea bottom. The camera will be considered as truly being in the water, i.e. fishes might get close to have a look at it, and water effects such flow or bubbles base blur should be applied at a foreground layer.

The gameplay fun factor is represented the personality of the pirates. They are somehow primordial in the way they act, and they have the tendency to screw up if you leave them too freedom. The tricks the player has to use to make the pirate survive should reveal their nature and be entertaining at the same time. The user is supposed to learn the weaknesses of the pirates and exploit these to convince them to do what they have to. The pirates should talk to the user in a Warcraft fashion.

Weak points

The Flying Spaghetti Monster stuff is under copyright. If no possible arrangement can be found, all direct reference would have to be removed. The game could still be about pirates, and instead of the FSM, there could be a classic “Populous” god, or whatever.

Hard Tasks

The assets for such a game are ambitious. Achieving a consistent and compelling design is hard and might require more artistic skills than I have. Not only the single objects must be cute and well designed, but their animation will require particular carefulness. The music will be crucial to emphasize the emotions of the pirates and the overall atmosphere. Voices are not easy to recorded and the fact I'm not a native english speaker is relevant.

A lot of gameplay test will be needed to make the game behave as the design describes it. The AI implementation must be art dirigible.

Planning

These are the tasks I identify at the moment:

· The gameplay logic need to be defined in order to identify the possible hard technological challenges. This will likely be done thanks to software mock-ups where a rough state machine AI of the pirates submarine will be implemented.

· The graphics design has to be defined. An assets creation workflow has to be established.

· Important Gameplay questions:

o How is the world defined?

o Is the AI based on autonomous agent or omniscient state machine?

o What about fishes, sea monsters, royal navy? What kind of AI do they have?

o Does the player influence the pirates directly or only through the environment?

· Important rendering and assets creation questions:

o How is the scene setup?

o Is everything 2D?

o How does the animation system work?

o What kind of effects are needed to create good looking water?

So that’s it for the moment. Feel free to post suggestions or critics.