Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 01 Sep 2011
Offline Last Active Oct 27 2014 02:45 PM

Posts I've Made

In Topic: Class inheritance?

04 January 2014 - 10:55 AM

All right, thank you very much for responding everybody :-)


If i try to summarize your findings, i come to the following conclusions:

  • If the behaviour of all the different enemies is  the same, the best way to code everything is one of the following:
    1. Pass the type to the constructor, then use a switch statement in the constructor to set the different values
    2. Pass the different values directly to the constructor

When considering these methods i prefer the first one, since it will allow me to create new enemies easier. An even more advanced approach would be to dynamically generate the enemies by loading them from an external data file. 


  • If the behaviour of the enemies is different, composition is the best option. This is something new to me (i am not yet very experienced) but something i will definitely look into.


I hope the above is correct. Thank you very much for all your replies.

In Topic: Class inheritance?

29 December 2013 - 10:43 AM

Thank you, i will look into that. I thought that such a method should exist but have never worked with if before. What is a good file format to use for such a file? XML? Any examples would be very much appreciated.

In Topic: Freeing up memory

08 October 2012 - 01:47 PM

Sorry for my slow response (have been a bit busy with things other than programming the past few days) but i tried it out and it works! Where my program used to use up to 2GB, it now uses only 40 MB of processor power. Much better!

Thank you very much for your responses.

In Topic: Freeing up memory

29 September 2012 - 09:41 AM

Thank you very much for all the solutions. I will give it a try and see what happens!

In Topic: I need some guidance

19 August 2012 - 07:41 AM

If you like to get some guidance with your first project, but you don't want to create a platformer, you could try the book "Visual C# Game Programming for Teens". This helps you design a 2D RPG / dungeon crawler from the very beginning. Although it is not exactly what you are looking for eventually (which is i believe called 2.5D) it might suit you better than creating a platformer first. Or, depending on your learning curve, you could first finish the platformer, then the 2D RPG and finally move on to 2.5D.