Art Techniques – Part 2 – Base Colors

Posted in Art, Tips on November 30th, 2008 by Chris
No Gravatar

In part one (see my last blog post) I created a sketch using Corel Painter and a wacom intuos3 DinA5 wide art tablet. Today, in part two, I will show you how to add some base colors to the sketch. The base colors should give a first impression of the image’s ‘mood’ and because I am working from dark colors to light ones they are very dark.Sketch
By clicking the small image to the left you can see the added base colors. Still this hasn’t anything to do with our game but you can get an impression on how we work in the art department! So add some brightness to your monitor and watch the new video here:

Rough Sea Games – Rocks The Boat – Color Video 01of02 from Chris Noeth on Vimeo.

You also can watch this video or download it in its original HD size at http://vimeo.com/2222703
Coming next: Colors – Part 2.
Chris

Popularity: 31% [?]

  • Share/Bookmark
Tags: , , , , , ,

Make your blog individual

Posted in Blog, Tips, webdesign on November 26th, 2008 by Joerg
No Gravatar

Nowadays, nearly every website that needs some information-updating now and then is done using a so-called “content management system”.

Blogging software can be seen as a special sub-category type of cms. The software we use to manage our blog is called WordPress. And since you know that individuality is important for most people, there are many different themes available for WordPress to give your blog an individual and/or personal touch. I must admit that we are using a standard theme for the moment, but this may change soon…

If you have ever wanted to create your own WordPress Theme then this is your lucky day. Be sure to check out these nifty tutorials.
You’ll only need some very very basic html and php knowledge to understand them! Even I managed it. Maybe you will see the effects of my efforts soon :)

Popularity: 4% [?]

  • Share/Bookmark
Tags: ,

Asserting the Basics – Part IIb

Posted in Methodology, Programming, Tips on November 23rd, 2008 by Manuel
No Gravatar

Hello, again! We’re back with another episode of “Asserting the Basics”. Last time we talked about our assertive philosophy on error handling. Today, we go into the dirty little details: the coding of asserts.

Asserts are not something that Actionscript3 offers naturally. Consequently, I added an Assert-method to our Debug class (remember from my first post?). Its job is (of course) to check whether a Boolean expression is true, and, if not, to eventually communicate this fact. Rather than showing all failed asserts directly, our method only stores them. I want to have control over when the asserts are shown, since there are times when you actually want asserts to fail: for instance when you want to try out your error handling in Unit Tests. Thus, there is another method to take care of displaying them, which can be called at an appropriate time. So our assert framework looks like this:

private static var m_asserts:Array;
/**
 * Asserts that a condition is met
 * @param    _statement condition to check
 * @param    _msg Message to describe the assert
 * @return true if the assert failed
 */
public static function Assert(_statement:Boolean, _msg:String):Boolean
{
    if (_statement != true)
    {
        var msg:String = "****************************\n "
            + "ASSERT FAILED!!\n "+_msg+"\n"+GetStackTrace()+"\n"
            + "****************************\n ";
        // record assert
        if (m_asserts == null)
            m_asserts = new Array();
        m_asserts.push(msg);
        Debug.Out(msg);
        return true;
    }
    return false;
}
public static function ShowAsserts(_stage:Stage) : void
{
    if (m_asserts == null)
        return;
    var assertBox:TextField = new TextField();
    assertBox.autoSize = TextFieldAutoSize.LEFT;
    assertBox.width = _stage.stageWidth;
    assertBox.textColor = 0xFF0000;
    assertBox.backgroundColor = 0x000000;
    assertBox.background = true;
    assertBox.wordWrap = true;
    assertBox.text = "";
    for (var i:int = 0; i < m_asserts.length; i++) {
        var assertString:String = m_asserts[i];
        assertBox.appendText(assertString + "\n");
    }
    _stage.addChild(assertBox);
}

You may have noticed that our assert method has a Boolean return value, returning true if the assert fails. This way we can use the method to exit early from a function that would crash otherwise. Since we cannot simply take the asserts back out, we might as well use them in a bigger context.

In our code the use of these asserts look like this:

public function Load(_path:String) : void {
    if (Debug.Assert(m_fileName != null, "Filename is null!!"))
        return;
    if (Debug.Assert(m_fileName.length != 0, "Filename is empty!!"))
        return;
    // yada yada … more code
}

To give our asserts even more value, I did some research on how to get stack traces. I found out that if you throw an error and catch it in a debug player, you can retrieve a stack trace from the error object, as seen here:

/**
 * Returns the stack trace (filtered)
 * @return stack trace
 */
public static function GetStackTrace() : String {
    if (Capabilities.isDebugger == true) {
        try { throw new Error(); }
        catch (e:Error) { return FilterStackTrace(e.getStackTrace()); }
        return "";
    }
    else
        return "Stack trace not available in non-debugger version.";
}

Unfortunately, the stack trace you get this way is really extensive and hard to read. Every line in the trace contains the complete path to the corresponding file on the local machine. So, I added a filtering function to remove the unnecessary path info. This method turns e.g. this:

tests::TestDynamicTextManager.TestTextEdit()Trace:
AssertionFailedError
	at tests::TestDynamicTextManager/TestTextEdit()
	[D:\projects\programming\bgame\svn\FlashComponents
	\client\src\tests\TestDynamicTextManager.as:15]

into this:

tests::TestDynamicTextManager.TestTextEdit()Trace:
AssertionFailedError
	at tests::TestDynamicTextManager/TestTextEdit() [line:15]

Here is the filter function:

public static function FilterStackTrace(stack:String):String {
    var lines:Array = stack.split("\n");
    // remove the path
    // it's too long and we can get the info from the method trace
    var regEx:RegExp = /\w:[\\\/]([\w-]+[\\\/])*\w+.as/ig;
    var newStack:String = new String("\n");
    for (var i:int = 0; i < lines.length; i++) {
        var line:String = lines[i];
        line = line.replace(regEx, "");
        line = line.replace("[:", " [line:");
        newStack = newStack + line + "\n";
    }
    return newStack;
}

Alrighty, now you’re set to do your own asserts. Next time, I’ll talk about unit testing and Actionscript3.
So, see you in a bit for a new episode of “Asserting the Basics”.

Happy coding, Manuel

Popularity: 12% [?]

  • Share/Bookmark
Tags: , , , , , ,

After 200 years of exploration: Tomb of Copernicus discovered

Posted in Uncategorized on November 22nd, 2008 by Matthias
No Gravatar

On Friday Slashdot reported that the tomb of the famous mathematician and astronomer Nicolaus Copernicus was discovered after a very long period of investigation and exploration.  Copernicus is known as the father of the heliocentric cosmology, which dislocates the earth from the middle of the universe.

The discovery was confirmed by a skeleton’s teeth DNA test which matched a hair found in one of Copernicus books.

Again this is a nice link/hint to our upcoming browser game.  I am not able give you any further details at this point, but I promise it is worth following our RSS feed for more information soon.

Popularity: 3% [?]

  • Share/Bookmark
Tags: , , , ,

Asserting the Basics – Part IIa

Posted in Methodology, Programming, Tips on November 19th, 2008 by Manuel
No Gravatar

Welcome back! Today, let’s talk about the probably most sensitive part of programming: error handling. This is a really big topic, so I made two articles out of it. This time I am going to tell you about our philosophy on that. Next time, I’ll show you how we turned our vision into reality.

Back to business: A project without proper error handling is doomed to fail after it has passed a certain level of complexity. Actionscript3 offers exceptions as a standard answer on the topic of how to deal with errors. Exceptions are for exceptional problems, but not for your little everyday error check. So, for us at Rough Sea Games exceptions are simply not enough. We like to be able to do what “The Pragmatic Programmer” [1] calls “assertive programming.” We add a lot of checks to our code to make sure we are still safe. If something goes haywire, our asserts make sure we crash early. That really helps to find the bug(ger) quickly. In addition, we like to ensure that “contracts” between methods are kept. That means, for instance, that if a method requires one of the parameters passed to it not to be null, we want to assert this to make sure it won’t happen. And if it does, we want an immediate feedback and not a some ambiguous crash further down the road.

Despite being a great help for the programmer, assertions can be a problem when it comes to performance.

Performance Issues

I did some performance tests while ago: I took out the assert method just leaving an empty stub. Oddly, this did not have a significant impact on the performance. So, the method itself is not very greedy. That’s good, but still, when I took out a couple of asserts the performance went up. How can that be? I found out that calling the method was the problem. Our assert method takes a string as one of its parameters. In some places we employed some heavy string operations to include values in that message.

When you do something like that inside an important loop you may be surprised about the great loss of performance. By refactoring some of those critical asserts, I could speed things up quite a bit without having to take the asserts out. So, if you are careful, asserts do not have to be a performance killer.

Better Production Code

Of course, taking the asserts out will produce slightly faster code, but since there is no simple way to actually take them out in a reversible manner (like using a preprocessor), we may as well leave them in for good. Some people may perceive them as a debug-only facility, but having them in production code might not be such a bad idea. We want to debug and improve our product constantly after release. A consumer that is able to tell us which assert exactly failed, helps us to find bugs a lot easier.

Well, I could go on about assertions forever … but time is scarce, so I’ll close for now. Next time, we’ll get our hands dirty and dive into our assertion code.

So, stay tuned and happy coding, Manuel

[1] The Pragmatic Programmer; Andrew Hunt, David Thomas, Addison-Wesley
ISBN 02161622X (http://www.pragmaticprogrammer.com)

Popularity: 11% [?]

  • Share/Bookmark
Tags: , , , , ,

Setting up the Smartfox server (SFS)

Posted in Programming on November 16th, 2008 by Joerg
No Gravatar

Readers of my previous post already know that I am currently experimenting with a multi-user flash server software named “smartfoxserver”. All other readers should know this by now…
Despite the ease of use I already mentioned, Matthias and myself had quite a funny session of trial and error when we attempted to run that beast on our Linux server. But the reason for this was that we are not yet Linux uber-geeks, rather than the task itself being complicated.
The SFS documentation already features a section about installation under Linux which you should read and follow. However, after following the simple step-by-step instruction in the docs we needed to do some additional things in order to get it all right:

- we had to make sure that the port 9339, which is the default port for SFS, was not blocked. So we added an appropriate rule to the iptables so that requests on this port can be processed. We did this by typing this directly in the bash:
iptables -I PUB_IN 18 –proto tcp –dport 9339 -j PAROLE
If you are not familiar with iptables at all, you might check out this tutorial series or this command overview. The 18 specifies the index inside the iptables where the rule should be inserted, so you must make sure that you specify a value that works with your current set of rules! Please contact your Linux-admin for further assistance before doing something that you don’t fully understand. It can save you a lot of time and swearing. Just ask Matthias about iptables -F…
This already was the most complicated part (for us) since the Internet is full of different explanations of how to open ports under Linux, but only the above mentioned set of commands did the trick.

- Next thing is to tell the SFS the IP-adress of your gameserver. To do this, go to the SFS installation folder, enter the subfolder “Server” and open the config.xml file. Search for the tag ServerIP and enter your gameserver IP-adress. Remember that you can enter 127.0.0.1 as server IP if you are running the SFS locally on your machine. Nice for testing purposes if you don’t have access to your own gameserver yet.

- The last thing is to add the gameserver to the list of allowed domains for the cross-domain policy file. To read more about what the policy file does and why it is necessary, just check the SFS doc 3.1 (The Basics). Still in the config file, search for the tag AutoSendPolicyFile and make sure it says “true”. In the next line, type something like

<PolicyAllowedDomains>
<AllowedDomain>your gameserver URL or IP-address</AllowedDomain>
</PolicyAllowedDomains>

After these three simple steps (which took us the whole night to figure out…) your Smartfox server should be ready to go!
Remember that changing settings in the config.xml file will only take effect after you restart the SFS!

Popularity: 13% [?]

  • Share/Bookmark
Tags: , , ,

Art Techniques – Part 1 – Sketch

Posted in Art, Tips on November 12th, 2008 by Chris
No Gravatar

Inspired by our company mantra ‘Rock The Boat‘, I will show you a video series about some of my art techniques. I am using these techniques to create most parts of the art for our game. In part 1 of the series, I will show you the making of a sketch which, in 90% of all art created, is the first step to the finished artwork. This sketch is made in Corel Painter with an Wacom Intuos3 DinA5 wide art tablet. I am using the Wacom tablet for all art this days… even for creating sketches. Corel Painter allows you to build your own brushes and with some customization you can make perfect digital pencils for creating sketches.Sketch
By clicking the small image to the left you can see the final sketch. Please note: the sketch content has not much to do with our game! To get more inside info on the game you have to read our blog regularly… so don’t forget to use the RSS-Feed to the right! Below you can see the video of how the sketch was done:

Rough Sea Games – Rocks The Boat – sketch video 01 from Chris Noeth on Vimeo.

You also can watch this video or download it in it’s original HD size at http://vimeo.com/2173212
See you soon in the second part about COLORS… ;)
Chris

Popularity: 27% [?]

  • Share/Bookmark
Tags: , , , , ,

Why do I feel like a Swiss army knife?

Posted in Company, People, Server Administration on November 9th, 2008 by Ole
No Gravatar

Hi, let me introduce myself with my first blog post . My name is Ole and my job could be briefly described as a server administrator – and yes, I feel like a Swiss army knife. Oh, please do not misunderstand me. This feeling isn`t frustrating or negative. I like my job. You need a wide range of knowledge to do this job, as admins work with systems and not only with few applications or “just” software.

My job is to deal with the hardware, software, server services, system security and especially user`s wishes.
(Hey, just in a professional way, of course !) Anyway, sometimes I experienced that administrators ignore users and their needs. Although their job is to serve the users,  but I guess, this topic would be worth of another blog post.

So perhaps you are wondering: “Why does he like to be the swiss army knife of Rough Sea Games and work with game developers ? ” Short answer: “I LIKE GAMES  and I LIKE COMPUTER SYSTEMS .”  A perfect fusion of my personal interests. This is great !

Anyway, my time is running short, so I promise to keep in touch with you and write new posts about my work. In the upcoming posts I will write down some interesting hints about server administration and maybe help other Swiss army knifes to keep their systems alive with those blog posts. Feel free to post some comments.

PS: WE ROCK THE BOAT!

Popularity: 7% [?]

  • Share/Bookmark
Tags: , , , ,

Teammeeting

Posted in Company, People on November 5th, 2008 by Matthias
No Gravatar

This time I will you give some insights what we discussed in our latest team meeting.

Last Tuesday the team was meeting at my apartment in Darmstadt City. All of us were quite curious, because our new “Server Chief”, Ole was attending the first time and nobody met him in person before.  I prepared a little bit of food. Some Wiener Würschtel, fresh cut vegetables and some cake.

The team hereos

My bad I forgot to shoot a group picture. Instead I made a photo of my game hero collection. I thought this would be a nice metaphor for the whole team anyway. Hope you don’t mind guys, and please do not ask me who is who!!

After having a nice chat and lecker food we started the official part of the meeting. Our agenda was actually quite simple. We were tackling each subject for about 30 Minutes and then we planned to do brainstorming session for the rest of the meeting.

The first agenda point was the current state with possible investors. Because of the financial crisis a lot of investors are very anxious and were postponing decisions and meetings. So the big question was: What happens if we do not find an investor this year? Could we still work on our game, with the same intensity in the next year? Well fortunately we have a lot of clever people in the team and the answer was: Absolutely no problem! Everybody has enough opportunities for consultant work and also enough time left to work on the game. Invigorated from that news we went to our next topic..

As we talked about the upcoming art work, Chris our artist said a quite remarkable thing.

“Currently I am very pleased about the situation, I know exactly what to do next and the tools provided from the technical guys are absolutely sufficient. “

In my entire career I cannot remember that I heard this from an artist saying this in front of the technical team. That just tells me two important things. The technical team did a good job and our artist has a very solid technical understanding.  No really big news for us, but its just nice to get it confirmed this way.

Next issue was the programming part. Luckily its working out quite well at the moment, only the server part is a bit behind schedule but we are catching up now and ran our first successful tests with the Smartfox Server,  which Joerg lately introduced in his blog post.  Sure there is always room for improvement, but currently there are no impediments in sight.

Then it was Ole’s turn. After about an hour meeting, he was already assimilated. Everybody was sure, he is the perfect match for our team! Ole was discussing about his upcoming work on the server and telling us about security issues he already fixed.  We felt very satisfied afterwards, because we are sure, the server is in very good hands from now on.

Design was our next big topic. It was Rafael’s task to talk what is currently going on there and what kind of problems we are facing. The biggest issue was, that we decided, quite a while ago, to create an eye candy demo version for investors. The bad side effect was, we polished features which definitely looked nice, but did not bring more fun into the game. So we decided to leave the demo version in its current state, because its absolutely sufficient to get the idea of the game. From now on we are going to focus on the fun part of the game.

After another hour brainstorming new ideas for the game, we decided to vote for our company mantra. We were discussing the mantra for weeks in the wiki and had lots and lots of different ideas, but none of them were convincing.  Lately, Manuel posted one of his ideas into the wiki and there was one mantra, which caught everybody’s attention.  Rock the boat! Everybody loved the idea and it fits just perfect to our company title!

With a very good feeling we concluded the meeting and collected lots of new ideas, energy and motivation for the upcoming tasks.

Popularity: 5% [?]

  • Share/Bookmark
Tags: , , , , , ,

Swiss deep sea explorer dies at the age of 86

Posted in Uncategorized on November 4th, 2008 by Joerg
No Gravatar

Yesterday, I read in our local newspaper that the swiss deep sea research pioneer and explorer Jacques Piccard died at the age of 86. The article was quite small, and so I started to explore the web, looking for more information.

Though it may seem very unlikely to some people that a man named “Piccard” explored the depth of the ocean instead of the depth of space, he indeed was one of the greatest oceanographers of our time. He also holds the record for the deepest dive done by man (with a submarine, that is): 10 910 meters. Phew!

While some of you might be impressed by his deeds, others may wonder why I am posting this here. Well, let me tell you what you have perhaps already guessed: it is somehow related to our game! The question is: How?

That’s something I wont tell you right now. Just keep coming back and you might find out soon…

Popularity: 2% [?]

  • Share/Bookmark
Tags: ,