<< May 2009 | Home | July 2009 >>

Day3: Gamejolt-Compo

Well,..actually today I was quite finished after work and it took real long to start with coding at “Shockwave”. Actually I added a nice effect to shoot particles as weapon (see in screenshot) That looks better that it is in reality… Hehe… But how often it is the case that the screenshots are better than the game itselfs! So why should I make a difference!? Additionally I added a new Level Design with a nice tiny fence. Problem is that I use rays in order to detect collisions. Too bad I have added a fence that don’t collide with my rays.

To solve that I wanted to add something like collision-geometry. That is working. The problem is that I don’t know how to make it invisible. And if I get it invsible it is not working for my collision detection anymore….Actually I’m quite happy with all of this! I hope to solve the collision thing. Tomorrow I want to add some kind of NPC-Logic so I can start hunting that evil vampire-lords :D

EDIT: I couldn’t resist and finally solved the collision-problem yesterday (instead of going to go bed in time)! But now that I’m in office I regret it. I really doubt there are people in the world that are more tired than me…. :-D


I couldn’t resist when I heard that this weekend is a game competition organized by gamejolt. The theme is “shocking”! In the beginning I thought about doing somthing with shockwaves and jME-Physics. But after some try outs I decided to do a EGO-SHOOTER(Codename:Shockwave)! Well,…typical for me. Try to do that with a minimum amount of skill….! This genere is much to early….

To make a long story short the code is really ugly (even after only 1.5days coding) and I had some quite frustrating expriences. Like the cameras frustum cut off most of my characterarms but with some tweaking I got that work (more or less). And again OGRE3D-Importer stuck my a knife in the back. Works fine for whole scenes but animation-stuff was not working at all…MD5 is better in this (when you do the bones the right way) I’m using models from blender-repository as the programming is hard enough and I still have to do the rigging and animations what is not so easy (and will look like mess afterwards, but that doesnt matter now). Ok what I got until now:

  • Collision-Detection so your character can’t run through walls.
  • shooting and detecting a hit
  • walking around

Haha,…not much! But everything from scratch! Just with jME and my own hands :D Here a screenshot:

organizing the jME-Week

Well…I had the idea that there should be something like the great pyweek for the jME-world as well. So I asked in community if someone would be interested. There was positiv feedback and here we are. Ok, I made the mistake not just saying here is the contest with that rules but started to discuss how it should/could be… So some people start thinking to big from the beginning thinking about prize-money in order to be more attractive to outsider and so on. I know this situations. Maybe there are good ideas but to much at the beginning could be contra-productive or even could risk that the whole competition even starts at all. Noone says the first competition have to be such huge…

Nevertheless I adapted the pyweek rules to the jME-Week (still hoping the pyweek-guys let me use it)  and think that could be a good beginning. In my opinion fame, glory and fun are the only suitable motivations for the competition. That should strengthen the community…. and even if there would be only two participants it would be a beginning to build on to.

If you want to participate at the moment there is a voting for finding a suitable date:


Resetting WP-Polls

Please ignore this entry as production test showed big issues

Use it as hints how to modify WP-Polls but don’t expect that code to work properly!

Known issue: The vote count is not decreased and there seems to be a problem with IE.It works but ajax is haning to saying there is a problem…So actually with that all of this is not much worth! I will try to fix that as fast a possible!

At the moment I’m setting up the website for the jME-Week. It is build upon wordpress. I found a quite capable plugin for voting WP_POLLS. Problem is that once a user voted he is not able to change his vote anymore. My setup is that only users are allowed to vote and the poll should only be visible for logged in users. So I added something like a hook to reset the vote for the current vote again. It is a really dirty hack. So if anyone is using it, it is your own risk!

Ok,…here we go. I assume you installed the plugin already. Go to the “Poll_Templates”-Page in the administration-area:

add this at the beginning of the result footer “Displayed when the user HAS voted”:

<form method=”post”><input type=”submit” value=”reset vote”/><input type=”hidden” name=”poll_id” value=”%POLL_ID%”/><input type=”hidden” name=”reset_poll” value=”1″/></form>

Soo…now comes the real dirty one. Actually I just needed a place where I can catch with global $user_ID the current userID. For some reason I didn’t realise that in wp-polls-widget.php so before search too long in put it into wp-settings.php (You can find it in your main wordpress-directory. usally that is WP)

Add at the end of the file right behind

$wp->init(); // Sets up current user.

// Everything is loaded and initialized.

the action for processing the reset:

$reset = $_POST['reset_poll'];
if ($reset==’1′)
global $wpdb;
global $user_ID;
$poll_id = $_POST['poll_id'];
if ($user_ID>0)

$connection=mysql_connect("localhost", "<FILL IN USERNAME>", "<FILL IN PASSWORD>") or die("DB ERROR");
mysql_select_db("<FILLIN DATABASENAME",$connection) or die("DB ERROR");
mysql_query("update wp_pollsa SET polla_votes=polla_votes-1 where polla_aid in (select s.pollip_aid from wp_pollsip s where pollip_userid=$user_ID and pollip_qid=$poll_id)");
$wpdb->query("delete from $wpdb->pollsip where pollip_userid=$user_ID and pollip_qid=$poll_id");

In order to disable poll in the sidebar edit the wp-polls-widget.php in the wp/wp-content/plugins/wp-polls/ directory and replace the code at the beginning:

function widget_polls_init() {
global $userdata;
if (!function_exists('register_sidebar_widget')||!isset($userdata)) {

I know it is really a mess,…but it works for me and I really don’t want to put too much time in to it. AND every minute using PHP makes me much too agressive! I HATE PHP! I HATE IT SOO MUCH!
If someone found a better place how to handle all of this I would be glad for a note.

And don’t forget: Use this on your own risk. It is not well tested….Actually it is only tested twice AND please no requests for modifications! I won’t do it! Look at “I hate PHP“. (If my mother would know what PHP is she would hate it for sure as well…! Isn’t it violating the Geneva conventions? We have to stop it :-) )

going on

…still I’m not sure if I can trust jME but the model I have at the moment seems to be able to export everytime and with every animation I want….so it looks well! In the meanwhile I started look at c++ and ogre, panda with python where I finally got pydev work with more or less got code completion, but nevertheless goal is going to be a jME-Application… Now there is also a goaly:

Before anyone could think that this will be a very interactive game, this is wrong. You can’t steer the models directly. You choose where to shot and you enemy choose where to jump and then there will be the shoot out…. Everything different will come later on…maybe, someday…

<< May 2009 | Home | July 2009 >>