19. Juni 2009

'Nightly' Builds

I finished a little setup for nightly builds with the new hudson toy.

  • Configured the ssh location of the apatana public server
  • added a little shell script to generate the tar file
  • asked stupid questions in #hudson on freenode
    (thanks to rtyler here)
This are the two lines of code required:
cd /Users/2600/.hudson/jobs/mdevian/workspace
tar -cvf mdevian/mdevian`date +%Y%m%d_%H%M%S`.tar mdevian/

Choosing a build System

I'd like to execute Unit-Tests automatically and generate the docs on the API automatically. So my choice of the weapons here is the hudson build system.

Looks like I need to add some stuff to execute the unit tests in simpletest, but all the other things are  there, and the most important thing: packaging works. 


17. Juni 2009

<3 for the iui thingie

After really struggeling in implementing own iphone css stuff (that even works on other mobiles) i took djnge's hint and use the iUI framework for mdevian. 

A good start if you like to do moile web apps, saves time, anger and hairs.

I will take some screenshots the next days and remain satisfied for now ;) 



Calculation of Cost via Strategy Pattern ?

I am thinking of how to implement the building of stuff in a clean way. The following things have to be done.

  • can i build in this town
  • do i have the resources
  • do i own the required buildings
  • is there a upgrade in queue for this type of building

I am deeply concerned that if I implement this in a if/else switch case way, the result will be  inflexible. So i guess i will implement the strategy pattern for all the ways to build.

Wikipedia

In computer programming, the strategy pattern (also known as the policy pattern) is a particular software design pattern, whereby algorithms can be selected at runtime.

In some programming languages, such as those without polymorphism, the issues addressed by this pattern are handled through forms of reflection, such as the native function pointer or function delegate syntax.

This pattern is invisible in languages with first-class functions. See the Python code for an example.

The strategy pattern is useful for situations where it is necessary to dynamically swap the algorithms used in an application. The strategy pattern is intended to provide a means to define a family of algorithms, encapsulate each one as an object, and make them interchangeable. The strategy pattern lets the algorithms vary independently from clients that use them.

Lots of nonsense written here. Fowler or one of his writers for the Signature Series has brought this to a better point. Ill try to look it up. Till then you have to stay with this lousy definition


We have hosting we have fun ...

... we have browsergames in the sun. 

mdevian will run on Aptanas "cloud", which is simply a hosting solution right in your Development environment and allows to deploy directly out of the IDE to the server(s).

I am very interested if Aptana can hold what they promise, well see here. It has to turn out if 20$/Month for a 256 MB Box is worth the money. i strongly doubt it, but hey i can quit the contract anytime. 

16. Juni 2009

Using the iphone/ipod and google maps

Most of these browser based games have a kind of map that is used to select your building place, or to see your enemies. I am currently replacing it with google maps that play nicely with the safari browser. 

The only thing i had to add was a little CSS that makes the map scale with the window as the ipod gets turned.

#map_canvas {
   box-sizing: border-box;
   min-height: 418px;
}

Twitter and Ohloh

I am using twitter for some shorter status updates. I'd be happy to get some followers as soon as possible. So if youre inetrested, follow me pls. Not much posts about browsergames in general anyways.


Second i have added a ohloh page for mdevian, so you can keep track on some statistics


15. Juni 2009

Progress

(Unit)Tests started


I know i am a little late to start testing, but hey I am old and you tend to forget things. Weapon of chioce, again is simpletest. Since the development Server and the desired Sun Powered Environment has its individual twists it's a good idea anyway.

http://simpletest.org/en/start-testing.html




It is funny, but the basic tutorial here is one of the best introductions to php unit testing.

I see lot of changes to the version i used in previous projects. Autoloader NICE ;)

14. Juni 2009

Buildqueue and Upgrade selection done

Everything now in Iphone/mobile compatible UI. Works great on the ipod touch.

  • Shows all av. Upgardes for buildings
  • Dynamically shows the queue
  • Shows the time left

11. Juni 2009

calculation WIN!

For all types of building the upgrade/update cost can now be calculated correctly.

Working on the upgrades

Upgrades are a little obfuscated in the original sourcecode, so it is hard to find out how they where supposed to work ;). I try to figure this out and make upgrades possible asap.

10. Juni 2009

Chart Graphs in Multi Deviania


A browser Game is a lot about numbers. So charts come in handy.
Deviania will use the google charts api to get some funky graphs.



What's this?

Multi Deviana is a browser based strategy game where you build your empire and cities. It's a new developed codebase based on the php code of Devana. The game is related to the gameplay of civilization.

Tech Stuff
  • PHP5 Codebase
  • Mysql DB
  • Running in a Zend Framework container
  • Hosted in the Aptana Cloud
Features
  • The Game
  • Forums
  • Wiki
Early Versions will be accessible as well s the sourcecode.

New Developments will be posted here.