Monday 25 May 2009

Playing with fire and rope making

So, GSoC officially started, and here is my first report this summer :)

All development for this project is happens on ‘mason_game’ branches in mine gsoc2009/alex-cyphesis.git and main ember.git repos at git.worldforge.org.

I started to work some weeks ago and did a few things. To learn about representations of types, entities and scripts inside Cyphesis server, I decided to change starting place in the world.

One thing for improve was the behaviour of campfires. With addition of proper dynamic lighting and shadows support in Ember we got nights to be dark. And having light source become essential to move without striking against the trees or being trapped by goblins.

In default world, campfire starts with fire but it soon goes out without fuel. On the contrary, if some fuel added to it, then it lasts forever because there is no feature to remove objects when they are fully burned. So, adding some fuel from the start does the trick and sheds the light on starting point place.

To let players have their own light source, I put two torches that players are free to take. Currently, Ember deserve some fixes to properly show the torch when hold by character.

Also, in between, some fixes were made in Ember to finally finish the shadow shader. But this really is not part of GSoC.

Next thing I made is rough implementation for rope making. I read a bunch of articles on rope making and history of agriculture to get some understanding of how they were making ropes in middle ages. Basing on this, I created a wiki page to collect info about farming in Mason. After that, added type definitions for correspondent tools and implemented simple task for making grass rope. It could be refined if that’ll be necessary.

On the ongoing week, I’m not planning to code anything as I’ll have exam at the beginning on June, granting that I did some work earlier. Nevertheless, we will discuss next steps about next sawing task.

Wednesday 20 May 2009

Patches for Pidgin

I’m using pidgin for all IM and chat conversations for some time and there were two things annoying me. And I made patches for them:
  1. Pidgin does not report OS version due to some subtle security reasons. Here is the patch №1 that reports current Fedora version.
  2. No way to change nick completion suffix from colon to comma. Here is the patch №2.

Thursday 7 May 2009

Accepted again!

I’ll work for WF second time this summer. Yay!
Here is essential part of proposal.

Synopsis

Implement game systems require to build a basic castle fortification from scratch from gathering raw materials to the completed construction.

Benefits for WorldForge

When asked about what WF is, you cannot simply answer “It is a set of tools for making games, look what cool game they made”, because there is currently no any playable game. Completing of this will increase number of things players can do in stock Mason game. It will also act as an example tasks for world creators. And hopefully, help to increase overall number of people who do custom world creation.

Deliverables

In the end, the set of tasks, tools and entity classes for cyphesis for constructing walls should be implemented. Needed core and client modifications will be made along the way.

Detailed Description

Proposal is to improve and implement cyphesis tasks and necessary accompanied things for following mason techs: plants, plant-fibre, logging, rope, sawing, pioneering, palisade, scaffolding, mining, earthworks, walls, gate, and fortification.
List taken from blueprint: https://blueprints.launchpad.net/cyphesis/+spec/gs-fortification
Each tech will require a set (zero, one or several) of tasks, a set of correspondent tools to perform the tasks and a set of entity classes on which action is performed. Some, tasks, tools and classes are already present in current mason impelementation and could be reused.
Here is the list of techs, a brief description taken from blueprints and my comments about how it should work and what should be done for each tech:

plants. Gather plants growing on the terrain.
Cut action could be performed with scythe on grassy terrain now.
An other task could be added for gathering different kind of plants suitable for making ropes, like gather reeds with knife.

plant-fibre. Process the right kind of plants into plant fibres to be used as a raw material.
Gathered plants should be cleaned, dried and somehow processed. This doesn’t require any tool, just time. Needs adding fibre class.

rope. Wind plant fibre into rope.
Here several fibres are winded into rope. Doesn’t require any tool either . Needs adding rope class.
Cyphesis, though, does not have ability to perform an action on several entities. So, perhaps, it require an improvement to server or a workaround.

logging. Gather timber by logging trees.
Chop trees could be performed with axe on trees now.

palisade. Palisade from logs.
Lever action could be performed with pole now.
But logs should be processed before levering so they look pretty, like the palisade around goblins camp.

sawing. Take raw logs and process them into the different types of shaped timber required for construction and crafting.
Slice action could be performed with bucksaw on logs now.
Task for making differently shaped timber could be added.

pioneering.
Create rough structures using rough cut timber and ropes.
It is good to have ability to make arbitrary wooden structures, but this proposal is not targeted at this.
This tech could be skipped and simulated by creation predefined wooden structures or by consumption of wood when constructing walls (like Warcraft :)

scaffolding. Construct scaffolding from sawn timber.
This is construction of predefined wooden structure that consume sawn timber and ropes.

mining. Gather rock by quarrying rocky terrain.
This was “quarrying” in blueprint, I renamed it to be more traditional.
Cut action could be performed with pickaxe on rocky terrain now.
It could be modified to produce rocks of different styles and sizes.

walls. Construct walls out of stone or wood.
Constructs a wall section like one we already have in media:
http://amber.worldforge.org/ember/screenshots/tn/screenshot_20081030_001318.jpg.html

gate. Construct a primitive gate from rough wood and ropes.
Like a wall, but constructs section with gate.

earthworks. Modify the terrain by digging trenches, embankments and other shapes.
Creating new and modifing existing terrain modifiers. It could be “flatten” task that is based on Level modifier.
Modifier for digging trenches may be implemented.

fortification. Construct a fortification with stone walls and gates.
A generic tech just head the hierarchy.

Project Schedule

We have 12 weeks on program. Here is the approximate plan on spending that time:

1. Tame the python.
2. Analyse the tasks. Describe what exactly they should perform and document this on wiki.
3. Add/improve simple tasks (plants, plants-fibre, rope, mining).
4-5. Start needed cyphesis core modification or invent the workarounds.
6. Make middle-level tasks that doesn’t require core modifications (palisade).
7. --- Mid-term evaluations: present some working code.
8. Finish cyphesis core modifications.
9-10. Make tasks down in hierarchy (scaffolding, walls, gate).
11. Make earthwork tasks, possibly expanding terrain modifiers.
12. --- The last week is to finish the work.



I was proposing something similar but vague last year: http://alexeytorkhov.blogspot.com/2008/04/improving-mason-game.html