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