Showing posts with label GSoC. Show all posts
Showing posts with label GSoC. Show all posts

Tuesday, 14 July 2009

Tasks properties widget

On last week I had to spend some days on my postgraduate application. Good news here that it is ended now and I hopefully will have more time to work.

Also I've committed the tasks properties widget code but it does not work properly yet. Going to fix it this week.

Tuesday, 7 July 2009

No progress :/

Last week was a busy for me - I had to do some bureaucratic things to receive my diploma and apply for postgraduate course. So, was tired and did almost nothing. Anyway, I’m going to some progress on client part next week. And also, I’ve find that we deviate from original plan long time ago (tasks properties were not part of it at all), so it should be rehashed, I guess.

Tuesday, 30 June 2009

Adding coverage tests

I've created unit test for my new tasks property code last week. It was useful as it helped to find one problem in code with uninitialised variable. Also, I've started some code to create tasks properties widget in Ember (but didn't commit it yet).

The list of things to do is left unchanged: parameters filtering on server side; Eris changes and widget on client side. I want to do some client stuff on this week.

Tuesday, 23 June 2009

Task properties are doing something

On last week, Al helped me to fix the “bug” with python script which turned to be not a bug but simple error.

Also I’ve make a new world initialization script (define_world_empty.py) that creates an empty script. It helps to monitor with cycmd without being spammed with all kind of different event from entities and NPCs from default world. While it is possible create empty world with calling some functions from main define_world.py, I think that having separate script to create empty world, is useful by itself, to serve as a template.

Next, Al made a prototype for some core class that would allow to change task property and I added some logic to it. So now, operation for change of task properties is successfully processed, property changed and exposed back to client.

Next things to do on server side, is to implement filtering to let change only allowed properties, and on client side to make changes in Eris and create widget to select task parameters.

Tuesday, 16 June 2009

Tasks interface exploration

On this week I did some exploring on what is needed to implement tasks interface along with some learning on usage of cycmd and cypython tools.

I started wiki page with specification of tasks interface.

Then, I was trying to do set operation from python task script, but this run into a bug in current python bindings.

Next, I did some exploring on client side. Added sample attribute to task class and tried to load the class in Ember. Basic code like request a class and print its attributes does the work.

As I see, all task handling on client is done in Eris. So, I need to add to Eris::Task class ability to store attributes. That is adding some variables and logic to fill them in Task::updateFromAtlas().

From server side, as it doesn't use Eris, something in Character use operation handler should be made. And also nasty python bindings should be fixed.

That’s what I’m going to do on next week. But Al should enlighten me on what exactly should be made on server side.

Tuesday, 9 June 2009

Tasks interface discussion

Last week we started to discuss how to express user interface for tasks. To recall, we want to provide an UI for task that would allow player to select the parameters of a task and control it.

We want add additional declarations for attributes that are allowed to be changed to existing declaration of task. This data then should be sent to client and used to present an interface when task started.

And that’s what I’m going to do next week: try to manipulate attributes of an existing task, also write draft specification for attributes declarations in task, add some example attributes and see what should be done for it to be shown in client.

Tuesday, 2 June 2009

The Void in code space

Not much happened last week in mason game systems from. Better to say, nothing happened at all. But this is expected, as I had exams.

Now, exams are over and I can get back to work on the project. Seeking forward to postponed replies on my mail on expressing interface for tasks.

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.

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

Sunday, 11 January 2009

Final GSoC gift

Finally, I’ve received my t-shirt. That was complete surprise for me, as I didn’t get any FedEx tracking number. So, Summer of Code 2008 is officially end for me. 2009 starts! :)

Monday, 25 August 2008

Entity creator screencast

Erik has created a demo that shows current abilities of entity creator: streaming, original.

It would be great to see it integrated and released with next version of Ember.

Monday, 18 August 2008

The End

Today was the last day of coding phase of GSoC, so here is the summary of what’s done through second part of the program. During this month, entity creator starting from basic tool gained the following:
  • preview of entity that has to be created,
  • placing of entities using mouse-to-terrain feature,
  • more user-friendly GUI: recipe description, adapters labels, help blurb with note about usage,
  • expanded documentation in code and on wiki page.
I think, development of entity creator shown directions of what need to be improved and refactored in Ember to ease making of authoring tools. This is things that were difficult when implementing entity preview—detached entities and initialization of them using model mapping with all things like proper scaling and rotation. Would be good be to have this as some generic reusable interface.

I would like to thank Erik and all WorldForge community for help during the program and I hope we will work together in future, as there is many things to do for mature authoring tools and in Ember itself.

Monday, 11 August 2008

Final week

On last week, I’ve made some tweaks that are improving user interface. In particular, I added help text when entering to create mode that says how to exit from it. Next, I implemented suggested “Random” list element that allows to select random list item without need of implementing some Lua function. Also added is ability to add custom text that is different from item value, i. e. you can add item “Boulder style A” with value “a”.

This week is final. I will try to make real-time update of entity with new adapter values. Though without this feature entity creator is already usable—I currently tweaked UI to be consistent for the case if I’ll not find what prevents CEGUI to pass event back to my application.

Also, I need to finish documentation on wiki page—there is some things that, for example, are useful when writing Lua scripts and should be documented.

And two things are left in Lua scripting provider: first is handling any number of results and second is calling functions with dots in name. There is probably not much work, but they are not needed right now and I’m thinking that I’ll better would not distract from my application and leave them for the future.

Monday, 4 August 2008

Polishing user interface

On last week I’ve made a lot of fixes that are improving user interface much. First, this is correct preview of entity. And also a bunch of smaller things:
  • Labels for adapters,
  • Staying in “create” mode after creating first entity,
  • Rotation of an entity with mouse wheel,
  • Fixing a bug when switching recipes.

Also, I tried make to preview (and entity that is to be created) reflect changes of adapter values in real time. I wrote a code that should do the task. It uses standard signal of an adapter. That signal should be emitted on text change event from CEGUI, but that event is never called and therefore signal is not emitted. I don’t know well what can I do with this, but I’ll try to debug it or find alternative way to get that event.

Next two weeks are final. I’ve left only a few tasks:
  • Real-time update of entity with new adapter values,
  • Add “random” element for drop-down lists and handle it programmatically,
  • Small tweaks in user interface,
  • Improving wiki page with documentation,
  • Make Lua scripting provider handle any number of results.
This probably will left some time to do some other small things. Anything that would not be finished could go to todo, ideas or wishlists.

Monday, 28 July 2008

Working with model mapping

I’ve started to work with model mapping framework on last week. It required to reimplement or copy a bunch of methods from EmberPhysicalEntity and satellite classes. It didn’t satify me well and I made an attempt to reuse EmberPhysicalEntity directly but it wasn’t very successful. I’m thinking that it in some places assumes entity properly belong to entity hierarchy. Making it to support detached entity seems to require some changes there. So I decided to drop this attempt and continue to work with model mapping directly to render preview mesh correctly. And that’s what I’m going to do for next week.

Monday, 21 July 2008

Entity positioning

On last week I’ve made terrain positioning of new entities. It allows to see position where entity will be created. But the preview mesh isn’t the same as entity that will be created.

This is the goal for next week—make preview fully represent new entity. To achieve this, I need to implement Erik’s plan on DetachedEntity class and feeding it to model mapping framework. This is partially done but not commited yet.

Also, user interface should be improved—it should stay in “create” mode after creating first entity and allow create fast as many more entities as user wants. Also minor things like changing orientation on mouse scroll should be made.

Monday, 14 July 2008

More OGRE bits


Performing ritual

Last week I spend looking and learning on what should be done during the second part of program.

The main feature that should be implemented is easy entity positioning. This means that while moving mouse over terrain it should show preview of entity that will be created. Positioning of entity with mouse was recently implemented by Sean and Erik. So I need to implement showing imaginary preview or bounding box in the world. This carried me in deeply in Ember internals. I’m guessing that this task could simply be solved with some OGRE bits and intercepting some controls but I didn’t find my way to it yet.

Monday, 7 July 2008

It’s working!


On last week I’ve finally made my program work! Thus finishing goal for first part of program just in time. As there comes a time for midterm survey, I’ll make a summary of what has been already done.

So, at the moment we have a program that can do following basic things:
  • parse entity recipes,
  • show widget,
  • show GUI adapters from entity recipe on its widget,
  • pass adapters values to Lua function that is specified in entity recipe,
  • compose entity replacing placeholders in entity specification with values received from Lua function or from adapter directly,
  • send entity to server.

Regarding on what to do next, it needs at least:
  • improving GUI—like adding title to adapters, etc.,
  • adding preview of new entity,
  • using mouse-to-terrain feature to place entities and
  • improve current code and features.
This should be discussed and corrected after some kind of review of what’s done.

And one more organizational point. I’m going move to the country since next weekdays. Quality of Internet connection there is not good, so, probably, most of time I’ll not be available on IRC/Jabber. Though, I hope, will read email regularly.
And very good that we are using Git—I can commit regardless of connectivity.

Monday, 30 June 2008

Gluing altogether

On last week I started to glue all different parts together. That is: wrap current adapters in my class GUIAdapter until (if ever) AdapterBase API would be changed to be more friendly, binding GUIAdapterBindings to adapters and XML element. Also parser for adapter bindings and entity recipe placeholders were written. With placeholders, I forgot at start that entity recipe is semi-atlas because of placeholders and cannot be stored as Atlas element, so this was need to be changed too.

This week I’ll continue to glue all this pieces to make it do some real work. And also general things like error handling over my code need to be improved.

Monday, 23 June 2008

Improving adapters API

I was ill since middle of last week (cold or something like that). Now it’s better but perfect :(

Anyway, I did something on my project, not much though.
I stopped with improving adapters API—I need a function that would create adapter just by its type name. With previous implementation, EntityEditor used some internal functions/methods to achieve this. Unfortunately, it seems impossible to convert them to some general interface.

So, I’m added this function to API. But there other problem rises: when creating adapter, atlas message object need to be passed to constructor. Value of this message is used then to populate adapter GUI element for first time and seems nothing like that. But, this element value has to be carefully crafted and be valid for this adapter type. For example, if it is number adapter then it should have number type, if it is 2D-position than it must be list with two number sub-elements, etc.
EntityEditor contains functions for creating all these element types. It is good functions and could be useful in some cases. But in overall, I see this approach as non-scalable—it is hard to add new adapter type.
So, my proposal is to let adapters handle elements of type NONE as some kind of default value.

Also, in some small time slices I was looking into packaging ember for fedora. When doing that, I find some license issues with ember and other libs.