Jump to content

  • Log In with Google      Sign In   
  • Create Account

Olaf Van Schlacht

Member Since 16 Dec 2011
Offline Last Active Aug 25 2016 04:18 AM

Posts I've Made

In Topic: Do you write pseudo-code/comments before coding?

02 March 2016 - 03:41 AM

No, i don't write pseudo code.
However I implement something that baerly runs very quickly, and after that I reason about the API and the code that I've just wrote.
This is my philosophy.

I can only support this method. Doing a quick and dirty solution first gives you a better feel of the problem to solve. You'll see what exceptions may be coming up and you can easily break down your problem into smaller ones.


Then you can start to define your API and refactor your code.

In Topic: [Web Based]PHP, MySQL, Javascript, HTML5 which do I use?

16 February 2016 - 05:34 AM

As I understood for now, you want to create a so called browser game, in the style of OGame, Travian etc, correct? This could be achieved with an event-driven server architecture - maybe stay focused on JavaScript and use a Node.js server. Advantage is, that you are very hip with this stack...


I agree on that. PHP is getting really old and I also prefer the "modern web" standards. Node.js on the server side offers alot of frameworks and modules which can help you build your application faster. It is also convenient to work on a one language stack instead of different languages. Using a javascript client side framework with a javascript server backend will get things done quicker.


Maybe take a look at:

Node.js with ExpressJS or Koa for the server side

passportJS for authentication in node.js

sequalize or bookshelfJS for Database access.


For the client side you have to take a look for yourself. Just google "javasript frontend framework".

I learned to use Jade for rendering my pages with node but there are alot of other frameworks around.


Also if you decide to create some 2D/3D scenes later on it is much easier to integrate them in your existing javascript code.

In Topic: How would you create a Weapons class?

30 December 2015 - 04:07 AM

I'd go for a composite way for weapons. The advantage is that you can easily create weapons at runtime and have a more dynamic approach at creating new weapon types.


Inheritence is bad for this because you will end up in having alot of classes which may depend on each other if you want something like a MagicFlamingDoubleEdgedBroadsword or something.


I'd take a look at the decorator pattern which is a great way to add new behaviour dynamicly.

In Topic: Github

19 October 2015 - 05:07 AM



I used this tutorial for getting into git.




Best Regards


In Topic: LibGDX vector2 length

07 June 2015 - 02:33 AM

The length of a vector can be used in various ways. You should check a source about vector properties and operations somewhere in order to find out what the length is used for.



As for the length formular it is: length = Math.sqrt(x² + y²).