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

#5268441 How would you create a Weapons class?

Posted by on 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.

#5231831 LibGDX overlaps problem

Posted by on 30 May 2015 - 07:03 AM

if (sprite.getBoundingRectangle().contains(Gdx.input.getX(), Gdx.input.getY()) {
    // do something

Maybe use the contains method instead of the overlaps method. Remember if your using a camera u need to unproject the mouse coordinates first before passing them to the contains method.


Unprojection version:

Vector3 mousePosition = camera.unproject(new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0f));

if (sprite.getBoundingRectangle().contains(mousePosition.x, mousePosition.y) {
    // do something

#5229417 2.5d depth rendering

Posted by on 17 May 2015 - 02:31 AM

I guess your using the integrated TiledMapRenderer of Libgdx?


Take a look at this site and search for the title "Using Depth Buffer"



Maybe you'll find an answer there.

#5228913 What models are these, 2d or 3d

Posted by on 14 May 2015 - 01:20 AM

Maybe they had extremly good 2D artists or they made 3D models and created sprites from these models.


I'd say the second option is what they did.

#5220461 Which skillset to develop once your good in C# ?

Posted by on 31 March 2015 - 05:12 AM

Business related projects are moving towards a RESTful web app architecture. So if you want to stay with C# you should learn about the ASP.NET MVC 6 / Web API 2 stuff right now. This is related to the midddle tier and backend layer. Understanding the principles of database design won't hurt either.


As for the front end HTML5/CSS3/JS are the way to go. Especially the Javascript frameworks like Ember.js or AngularJS are really popular at the moment. Although AngularJS version 2 is currently under development which wont have compability with AngularJS version 1.


It is normal to see job ads like these. But the very core is that you have a good understanding of programming languages in general and it is good to have a sense of problem solving. It is good if you have one language where you're an expert in but it is never wrong to atleast have an intermediate level of experience in various other ones.


In the end I'd say if your more a creative head you should focus more on the front end stuff since it is more related to user friendliness and gives you the opportunity to be creative. (Atleast when the company doesn't have a standard layout or something...).


If your more into problem solving and the technical stuff you should consider going for the middle / backend related tasks.

#5178825 How can i make objects have completely different outcomes?

Posted by on 08 September 2014 - 05:57 AM



What I understand is that your trying to add new behaviour to items without creating a large item class filled up with boolean flags indicating which behaviours the item owner has.


When I had to create a system for random item properties (Extra Damage, % Damage increase) I came up with the idea of using the decorator design pattern which allows you to create new item behaviour without the construction of deep hierachies and large classes. (http://en.wikipedia.org/wiki/Decorator_pattern


Maybe you want to take a look at this pattern.


You could have some kind of MagicItem class which has a reference to its owner and a method which can manipulate his owner (Add new skills or stats). Now this method can be overriden by the decorating items which can add additional behaviour or complete new behaviour.


The method could make something like this:

owner.skillset.addSkill(new FlyingAbility());


Hope this helps.


Best Regards

#5152260 Modern C++ looking for information

Posted by on 08 May 2014 - 03:41 AM

Thanks everyone for the resources, I'll gonna have a look at them!


I've already got some questions regarding some Java standards and how they are solved in C++.



I'm totally used to create my Java classes in POJO manner. That means almost every member of my class will have a getter/setter method for accessing it. I've read that in C++ getters/setters are evil and break the rule of data encapsulation. In eclipse I've got a function to automatically create getters/setters but somehow in visual studio im missing that function. Any advice here?



It feels like visual studio is missing alot features from eclipse. For example:

-Ctrl + O - Opens a context menu with all class members / functions listed (Outline)

-Ctrl + Alt + Arrow - Copies the current selected line

-Ctrl + 1 - Opens  the context help menu


Anyone knows a guide for visual studio hot keys and shortcuts?


Best Regards


#5095208 mysql software

Posted by on 19 September 2013 - 10:47 AM

You could also try HeidiSQL.



Only problem is that you don't have a visual editor for creating the whole schema. But I still prefer it for creating most of my SQL stuff.

#5054724 Discussion of Pokemon X Y visuals

Posted by on 18 April 2013 - 04:23 PM

I think what ur meaning is Cel Shading?



#4971604 problem jprogress bar

Posted by on 20 August 2012 - 02:04 PM

You should read something about how Swing works and the Event Dispatching Queue Thread.
You better take a look at Threading and the SwingWorker class.

In order to make it work you have to open a second thread which updates the Progressbar.

#4949535 Best choice for game?

Posted by on 15 June 2012 - 08:07 AM

I actually already have unity, but I'm having trouble figuring out how to use it very well, which basically means I have absolutely no idea what I'm doing.

And there is the first reason to start small.
If you dont even know anything about programming at all then you better go start learning that first

#4949456 UDK or Unity? The best game engine for beginners?

Posted by on 15 June 2012 - 12:33 AM

My Personal experience is still 50:50 for each engine.
I tried both Engines myself and I never worked with a complete engine before.

+Beginner friendly
+Very Simple to use
+Good Tutorials out there
+Works on many Platforms
+Supports Javascript, C# and Boo scripting

-Free version has cutted features

+Im in love with the Level Editor. Really Easy to use
+All Features for free
+Kismet Editor (Used for scripting)
+Works on PC and Mac, not sure about Linux
+Many Tutorials
+Sick Lightning

-Harder to get into it
-Not suitable for a solo Project

Unity was easy really easy to use and you can create Games with it more quickly. Problem for me is the Pricing Model. The free version feels like a demo.
UDK is awesome BUT not made for a single developer. I guess when your working with at least an 2D and 3D Artist you can get more out of it.

#4935355 Manager/Simulation Games Requirements

Posted by on 27 April 2012 - 05:55 AM

1) If your not going to make high end graphics and just plain text like in the good old days then sure why not. If you have the will to do it then youll do it.
2) Because simulating management you could use any language .... if you want to use graphics then any language which has a supported graphics API can be used.
For easy going just use C# for the beginning.
3) Read something about Game Design and OOP, you'll get a good idea on how to structure your application/game.

#4901582 Beginning Game Development

Posted by on 11 January 2012 - 01:27 AM

The difference between a library and engine is that a library offers classes and functions.
A game engine is a complete system which can be easilie filled with content.

If you want to create a small Platformer Game and you have no experience in game development yet I recommend to use an existing engine just to get the idea behind the technical game side.

-Slick2D is a 2D Engine for Java and should work out for your current needs.

Once you have more experience and understand what a game needs to do you could try to use LWJGL to create your own engine.