Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
4
Newest
 Teacher
Impact
~145 people reached

Aug
13
comment Java game Inventory problem
@user2279603 hm, I guess because of the outer loop which again triggers the inner loop...
Aug
13
revised Java game Inventory problem
enhanced readability
Aug
13
comment Java game Inventory problem
If you add a break after assigning the item to the empty slot, you would break out of the inner loop and only fill the first empty slot found instead of all.
Aug
13
comment Java game Inventory problem
Two small changes: inventory[i] = item.id; and you have to add a break after this line to assign the id only to the first empty slot.
Aug
13
suggested approved edit on Java game Inventory problem
Jun
1
comment How can you have the Input Manager Axis values snap to 1 (or -1)?
You could just cast the return value to an int. Thus you'll get -1 or 1 once the appropriate button is pressed. For more precision you could take a look at Math.Round.
Apr
11
awarded  Teacher
Mar
19
awarded  Supporter
Mar
19
revised How to get the position of a moving object
edited body
Mar
19
suggested approved edit on How to get the position of a moving object
Mar
8
comment How to build an AIManager class
It's the encapsulation of functionality. Of course this depends on the game you're making. If you're making Pong an AIManager would be overkill imo. But if you're going to have many AI controlled entities it's good design to control them in one place.
Mar
8
comment How to build an AIManager class
The problems of your update method are solved in my update method ;) I check if the current object implements the desired interface. If yes I cast it to that interface and call its method on that object. The advantage is that you don't have to know the class which implements the interface. If a class implements the interface you can cast it to that interface and call its method on it.
Mar
7
answered How to build an AIManager class
Feb
25
awarded  Organizer
Feb
24
revised Object orientated design for RPG character creation
edited body
Feb
24
suggested approved edit on Object orientated design for RPG character creation
Feb
19
awarded  Editor
Feb
19
revised How to calculate a score algorithm based on elapsed time?
edited body
Feb
19
suggested approved edit on How to calculate a score algorithm based on elapsed time?
Nov
15
comment In which directory to write game save files/data?
I think it's important to say that the msdn documentation suggests using SHGetKnownFolderPath since SHGetFolderPath is just a wrapper for the new method and is only supported for backward compatibility.