Reputation
1,311
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 12 16
Newest
 Yearling
Impact
~100k people reached

  • 0 posts edited
  • 16 helpful flags
  • 165 votes cast
Jan
14
comment methods for player interaction with world
The "best way" always depends on requirements. If you optimize for speed, the best way may be to use assembler code. But still it is often subjective and debatable if that specific way is the "best way" even when considering the requirements. Especially when it comes to performance you can write low-level code and still find ways to optimize but the trade-offs are marginal. So when is a way the best way? When you no longer need to improve upon it. Not looking at this from a research point of view but from a practical, pragmatic developer's perspective.
Jan
14
comment methods for player interaction with world
As a helpful note, I think you're on the right track if those interactive objects are not tiles but placed freely in the world. If they were tiles you could simply look up the type of tile one tile ahead of the player.
Jan
14
comment methods for player interaction with world
"proper way" is defined as "the way that works" - there are of course always different ways to improve upon that, based on requirements or merely personal preference, to achieve better performance, ease of use, number of lines of code, readability, maintainability, backwards compatibility, coding style, etc - though many of these requirements are actually trade-offs against other requirements. This also means there's never a "best way" in case you were wondering. ;)
Jan
12
comment How can I distribute powerups “fairly”?
As far as I remember the various Bomberman versions, they were never truly balanced. In fact I feel they may be less fun if the powerup distribution had been programmed to be "fair".
Jan
9
comment box2d's ApplyForce works wrong after cocos2d-x's replaceScene
check that the previous box2d world and the previous scene have been destroyed/deallocated properly
Jan
7
comment Floating point precision issue with Box2D
even better: use edge chain shapes for ground collisions as discussed in the box2d manual
Jan
6
comment Walking Sprite animation Cocos2D
define "real" ..
Jan
4
comment How do I prevent other dynamic bodies from affecting the player's velocity with Box2D?
just add gravity vector to velocity every frame
Jan
4
comment Why are we not using integers in game physics?
@Tomas Betting is not knowing. ;) Besides to draw lines I can usually rely on glDrawLine and similar. And not everything is discrete, delta time for example. Also: subpixel rendering, anti-aliasing, and similar effects. Point being: even if there are optimized integer-based algorithms that may even to this day be faster, they typically aren't meaningful to most real world development being done today.
Jan
4
answered How do I prevent other dynamic bodies from affecting the player's velocity with Box2D?
Jan
3
answered Why are we not using integers in game physics?
Jan
3
answered How can I organise the code for an episodic game?
Jan
2
comment Using Box2D / Physics with Tiles?
trace the bounds of the tilemap world and create a body with multiple b2ChainShape to form the boundaries of the world
Dec
31
comment Collision detection for sloping tiles
I've had a similar issue in my platformer, ended up being a "one off" error. Actually it was an unnecessary one off somewhere else that I accounted for everywhere else but reared its ugly head when it came to slope collision resolve.
Dec
31
awarded  Nice Answer
Dec
28
comment Simulating (Human) Needs?
Wait, I got to pee .... okay, that's done. I think this question is far too broad. And it really depends on what you need or are satisfied with. Simple solutions are easy to come by, but truly simulating the need for hunger, digestion and excretion let alone something as arbitrary and not well-defined yet universally understood as "fun" are subjects of scientific research and there are no simple answers, perhaps not even answers per se.
Dec
24
comment How to centralize stat/feat/equipment related changes in an RPG?
try delegation, ie the module that gives access to a derived stat registers itself to be notified for any chances relating to specific stats - when any of them change the module updates the derived stat.
Dec
24
comment Cocos2D - Simulating infinite scrolling
intuitive is relative (and a matter of experience). You're on the right track. The real problem with this design is the camera movement. What you really need to do is to not wrap any object. Only when the player moves out of bounds you need to offset all (!) objects by the same amount (ie diff between player old and new position). The camera is always centered on the player and updated after player's position changed.
Dec
17
comment Is there any reason not to make all my components a single class?
Also, consider the typos like "Killalbe.HP" the compiler won't catch - good luck finding those. To fix this every dictionary key should be created as static/const string and that brings us back to simply defining the variables in the interface in the first place.
Dec
16
comment How should I handle sprite creation for customizable 2D characters?
composing players of multiple sprites + color tinting