A developers life
Java Ruby PHP and more-
iBox3D released
Posted on Juni 22nd, 2010 No commentsBack in 2009, on the 23rd of March, I’ve reported about an easy way to created 3D iPhone games with Shiva, a game creation suite from Stonetrip.
Soon it turned out that it was easy to setup a quick prototype which contains only a subset of functionality of the final version. I’ve worked on iBox3D in my spare time as often as possible, but also I had to take some creative breaks. The more functionality I’ve built in the game the harder the work was getting. I’ve learned that a finished and polished product needs a lot of time, more that anyone would estimate. But after I’ve set a clear target to myself I could concentrate to get there. And finally I’ve managed to create a game for iPhone / iPod Touch and iPad.
iBox3D can be downloaded for € 0,79 / $ 0,99 in the Apple Appstore.
Also the game has now its own website which can be found here:
I appreciate your feedback.
-
Bowline on Windows with different Titanium Version
Posted on August 13th, 2009 1 commentThis stuff was tested on Vista but should also work on XP.
Two problems are solved in this article:
- Install bowline on another OS then it was developed on
- Run bowline with another version of Titanium Desktop then it was developed on
Bowline was developed on Mac OS X and uses the version 0.4.4 of Titanium. I have installed it on Vista and tried to run the bowline-twitter example with Titanium 0.6.0. This is how I installed it and how I managed to solve the problems:
1. Install bowline
To install bowline ruby gems can be used:gem install maccman-bowline --source http://gems.github.comI’ve got some dependency errors. E.g. I had now active support and newgems installed. Install the other gems first (I think gem has also a dependency switch –include_dependencies or similar - I’m not sure).2. Install Titanium Desktop
Donwload it from http://www.appcelerator.com/products/titanium-desktop/ and execute the installer.3. Get the bowline-twitter example from github
You can get the bowline-twitter example from this URL: http://github.com/maccman/bowline-twitter/tree/master. After unpacking I renamed it to “twitter” and saved it c:/dev/bowline/twitter.4. Building the twitter client
Open a command line, change to the project directory (c:/dev/bowline/twitter in my case) and execute the following command:rake appI’ve got this error:C:\dev\bowline\twitter>rake appBackground: bowline was created on Mac OS X. On the Mac console, which is called bash, files have a line which tells the OS which program should execute them. E.g. the run file in the folder twitter/script:
(in C:/dev/bowline/twitter)
rake aborted!
Exec format error - C:/ProgramData/Titanium/sdk/win32/0.6.0/tibuild.py -d C:/dev/bowline/twitter/build -s C:/ProgramData/Titanium -a C:/ProgramData/Titanium/sdk/win32/0.6.0 C:/dev/bowline/twitter/build/app#!/usr/bin/env rubyrequireFrom the first line Mac Os knows to start this file with ruby. So in the command line you can just type:
File.join(File.dirname(__FILE__), *%w[.. config boot])
require “bowline/commands/run”script/runIn windows you have to type:ruby script/runWindows doesn’t recognice first line. In the build script for bowline a python script should be executed but windows doesn’t know that it is a python script. Step 5. will explain how you can change it.5. Changes in the build file app.rake
This file can be found in%ruby_home%\gems\1.8\gems\maccman-bowline-0.4.6\lib\bowline\tasksLine 146 and following reveal that a python script tibuild.py is called. This is part of Titanium Desktop. So you have to install Python. I’ve got Python 2.6 installed. Please also make sure that the Python path is also in you environment variable PATH (Control Panel > System > Advanced System Settings > Environment Varibales > PATH). E.g. my path variable contains besides many other entries C:\dev\Python26\ . Remember that different paths have to be seperated by ; without space.Back to app.rake. Find the following line (146):
command = []And now add another line:command = []Now the command line error is solved. But there is another thing which has to be changed in app.rake. The python script mentioned above also parses the manifest file of the project which contains meta information, like the author, name and dependencies. It also determines the required runtime version of the project. The twitter client was built on Titanium Desktop 0.4.4, I have 0.6.0 installed. This leads to an error, so I had to change this in the app.rake.
command < < "python"I replaced all versions from 0.4.4 to 0.6.0 in app.rake.
6. Try to build it again
Command Line:rake appStill an error:C:\dev\bowline\twitter>rake appStill the version error. If you open the manifest in twitter/build/app/ you can see that there is still the version 0.4.4 inserted. So you have to regenerate the manifest (step 7).
(in C:/dev/bowline/twitter)
Couldn't determine your source distribution for packaging runtime version 0.4.4. Please specify.7. Regenerate the manifest
Command line:rake app:configure8. Final build
Command line:rake appThis builds you app and is not necessarily needed if you just want to run it.9. Run the twitter client
Command line:ruby script/runWorks!
Bowline is very interesting but also very young. I hope that the Author, Alex MacCaw, will drive the development further so that it really gets usable.
Links:
Blog Post of Alex MacCaw
Blog Post on RubyInside
Bowline on github
Bowline-Twitter on github
Titanium Desktop -
Watir on Shoes
Posted on Juli 17th, 2009 1 commentYesterday evening I tried to create a prototype using Ruby which should have a simple GUI to insert test data for Watir testscripts.
Shoes is a Ruby library/framework for drawing 2D and web-like UIs which can be compiled into native executables (e.g. *.exe on Windows, *.dmg on MacOS X). Watir is another Ruby library which can be used for automated browser testing. I just thought it would be a good idea to combine this two Ruby libraries to create powerful test environments.
I tried to load the Watir lib in Shoes. Shoes knows the setup block to load libraries via “gem”:
Shoes.setup do
gem 'name >= version'
end
I added further code and tried to run it via Shoes. Then Shoes automatically opens a window which told me that it tries to install Watir. But after a short time I’ve got an error:
hoe requires RubyGems version >= 1.3.1“Oh no, the wrong RubyGems version…”. So I thougt updating RubyGems would solve the problem.
Console: gems --version
> 1.3.1Console: gems update --system
> updating... [take a coffee break]Console: shoes watir_on_shoes.rb
> hoe requires RubyGems version >= 1.3.1“Arg, still the same error…”. Time to ask my friend Google, but Google just knew the problem, not the solution. Suddenly I remembered the fact that Shoes contains its own Ruby environment… and you might guess that - also a RubyGems distribution. So I found an easy working solution:
Copy all files from
to
%RUBY_HOME%\lib\ruby\gems\1.8\gems\rubygems-update-1.3.4\lib\rubygems
%SHOES_HOME%\0.r1134\ruby\lib\rubygemsThat fixed the problem and Watir was properly installed. Maybe you are interested in my simple prototype:
Shoes.setup do
gem 'watir >= 1.5.6' # might be out of date
end
require ‘watir’
class ShoesWatirTest < Shoes
url ‘/’, :index
def index
stack :margin => 20 do
title “Watir-test”
flow do
para “URL:”
@search = edit_line
button “GO!” do
@ie = Watir::IE.new
@ie.goto “http://www.google.de/”
@ie.text_field(:name, “q”).set @search.text
@ie.button(:name, “btnG”).click
para @ie.text
end
end
end
end
end
Shoes.app :width => 400, :height => 800
-
Ruby on Windows: OLE automation for Outlook - Shared calendars
Posted on Juli 9th, 2009 No commentsRuby has a nice library for OLE automation, win32ole. I used this library to get appointments from shared outlook (exchange) calendars. The scripts are testen on Windows Vista with Outlook 2003. This is how it works:
outlook_reader.rb
require 'win32ole'
outlook = WIN32OLE.new(’Outlook.Application’)
mapi = outlook.GetNameSpace(’MAPI’)
# this is explained later
Thread.new do
system(’outlook_clicker.exe’)
end
# create a recipient and resolve him
myRecipient = mapi.CreateRecipient(”John Doe”)
myRecipient.Resolve
# get the shared calendar of the recipient
if myRecipient.Resolved
calendar = mapi.GetSharedDefaultFolder(myRecipient, 9)
end
# write the calendar data to the output
if calendar
calendar.Items.each do |item|
puts “#{item.Start} - #{item.End}: #{item.Subject}”
end
end
Outlook has a mechanism which should protect the outlook data from unauthorized access, e.g. viruses and trojans. Everytime you want to access the data from outlook a popup opens which asks you, if the access should be granted. In case of automation this is very bad, because you usually don’t want to click anything if you automate a process.
So here the solution. I’ve created a ruby script which clicks the dialog for the user. Then I converted it into an executeable using RubyScript2exe (Ruby code gets compiled).
outlook_clicker.rb
require 'win32ole'
# new shell object
wsh = WIN32OLE.new(’Wscript.Shell’)
# for timeout management
time_out = 0
time_out_max = 10
interval = 0.01
# try to activate the window with the Title ‘Microsoft Office Outlook’
while !wsh.AppActivate(’Microsoft Office Outlook’) do
time_out = time_out + interval
sleep(interval)
if time_out > time_out_max
Process.exit!
end
end
# if the popup exists and the timeout is not reached some
# keys get send to the popup
wsh.SendKeys(”{TAB}”)
wsh.SendKeys(”{TAB}”)
wsh.SendKeys(” “) # this is “space”
wsh.SendKeys(”{TAB}”)
wsh.SendKeys(”{TAB}”)
wsh.SendKeys(”{ENTER}”)
To compile this ruby file into an executeable rubyscript2exe can be used. To install it you can use Ruby Gems (command prompt):
gem install rubyscript2exeAfter installing you can open a command prompt, change to the directory your scripts are in and compile the clicker using the following command
ruby rubyscript2exe.rb outlook_clicker.rbThe executable will be created in the same directory. In the file outlook_reader.rb the following lines call the outlook_clicker.exe:
Thread.new do
system('outlook_clicker.exe')
end
In this three lines a new thread is created which calls the outlook_clicker.exe using the system method. Basically we reached that both scripts are executed in parallel.
If you execute the outlook_reader.rb you can see that the popup shortly opens and then automatically gets closed.
Recommend reading: http://rubyonwindows.blogspot.com/
-
Ruby & SAP Services (SOA)
Posted on Mai 20th, 2009 No commentsI recently added two links to my blog. They both lead to articles I wrote about Ruby (on Rails) and SAP Services. Warning: This was before Rails 2.0 was released. Ruby on Rails make cool SAP MashUps possible.
How-to: Consume Enterprise Services with Ruby on Rails – Part I
How-to: Consume Enterprise Services with Ruby on Rails – Part II
-
iBox3D - Calendar week 19
Posted on Mai 11th, 2009 No commentsNo news about iBox3D for the last two weeks? You might ask yourself what happened. The answer is simple: Not much time to write about my ongoing work on iBox3D. But now it’s time to report about the current process stage.
iBox3D is currently in a phase where all the features are implemented rudimentarily. You are able to play, to resume a game, to view the offline and online high score. That means that the game mechanics are all working, but sadly they are mostly not 100% implemented.
I put the requirement to myself to push the 90%-ready features as far to 100% as possible in the next weeks. To fulfil my personal quality goals I will put much effort in the polishing of all the features.
But now I’d like to inform a little bit about the online high score I was working on for the last two weeks. From a technical point of view the high score uses XML via HTTP for the communication between the client (iBox3D on an iPhone/iPod touch) and the server. The client holds the player’s local high score whereas the server holds the high score of the players all around the world and is able to generate rankings.
From a conceptual point of view a player is not forced to use the online high score. But if the player enters the online high score from menu all things needed for the participation in the online high score are automatically prepared. The user gets an unique account for his typed in name (which is by the way changeable without loosing the current high scores), his scores are sent to the server and a list of the top ten players and the current placement of the player is requested. If the iPhone/iPod touch is connected to the internet and the data is successfully transmitted then the top ten and the player ranking are per level displayed on the screen.
In reality the high score is a low score. As the main idea is to have as little moves and as little time as possible per level it makes more sense this way. Currently the number of moves and the time are taken into account equally. They are simply multiplied. E.g. if you needed 10 moves to complete the level and it took you 21,3 seconds, then your personal score is 213. If someone would only need 9 moves and 19 seconds then the score would be 171. That means that this player would be better. Expect slight changes to the high score during the beta phase.
After the content lots of content, e.g. levels and music, has to be created. This steps will make the game ready for the beta test.
-
iBox3D - Calendar week 17
Posted on April 27th, 2009 No commentsThe status of iBox3D has not changed much last week. In fact I only added an online highscore prototype. The server side is yet working and the client side (iBox3D) is able to display the best scores per level and your personal rank. The prototype should be finished up this week so that I can start polishing the game next week.
-
iBox3D - Calendar week 16
Posted on April 14th, 2009 No commentsiBox3D development goes on and on. I’ve added a menu, a highscore, sounds and music. Still in alpha version I’d like to present some screenshots and a gameplay video with sounds and music. Feedback is welcome.



-
iBox3D - Calendar week 15
Posted on April 9th, 2009 No commentsDue to some requests from internationals I’ll start to write blog posts about iBox3D in English.
Today is the last day this week I’m working on iBox3D (iPhone game). This week I added some new features to the game.
Switches
The switches can only be activated if the box is standing upright on them. Currently one switch is directly linked with one floor platform which appears after the switch is activated and fades again if the switch is re-activated (toggle mechanism). Switches may offer new ways for the box.Unstable platforms
This kind of platform is not as stable as the standard platforms. When the box stands upright on an unstable platform, it will fall down and the level is lost. If the box lies on one stable and one unstable platform nothing happens. But if the box lies on two unstable platforms it again falls down into the infinite darkness. So you always have to keep the balance.I also added another FX effect. When the box hits the floor some dust particles show up.
Gameplay videos will follow as soon as I create levels using the new features.
Again I’d like to remark, that you can play a demo with four levels here using the browser plugin provided on the page or on StoneTrip.com. Feel free go give me some feedback.
-
Amok in Landshut
Posted on April 8th, 2009 No commentsWie hier (Link zu Welt.de) zu lesen ist, hat am gestrigen Morgen ein 60-jähriger Mann im Landshuter Landsgericht seine Frau erschossen und zwei weitere Personen verletzt. Weiteren Berichten zufolge suchen die Polizeibeamten mittlerweile nach PCs und Killerspielen in der Wohnung des Täters (Achtung: Ironie).
Ich möchte mein Beileid allen Geschädigten dieser grausamen Tat aussprechen.



Neueste Kommentare