Jump to content

  • Log In with Google      Sign In   
  • Create Account

HappyCoder

Member Since 28 Apr 2007
Offline Last Active Yesterday, 02:58 AM

Posts I've Made

In Topic: Need techniques for dealing with precision issues

23 September 2016 - 12:09 PM

You could fix your timestep to make the simulation consistent.
http://gafferongames.com/game-physics/fix-your-timestep/

As for the precision issues, you just need to determine what range your floating point values should be in and clamp them to that range with a tolerenace. So your float in the range 0-1 could be clamped to 0-0.999999

In Topic: Two classes relying on each other

19 September 2016 - 10:58 AM

I need the address of the owner so that the owner can delete the bullet from memory - unless there's some other way I could do it? Also, how do you forward declare a member function? (Bullet uses aggressiveEntity::destroyBullet(int))


You could have a boolean on the bullet if it is active or not and have the agressiveEntity check every update for any inactive bullets and delete them.

In Topic: Two classes relying on each other

19 September 2016 - 10:30 AM

You can add a forward declaration instead of including the header.

In bullet.h replace
#include "agressive.h"
With
class aggressiveEntity;
That simply tells the compiler a class with the name aggressiveEntity exists. You still have to ensure that agressive.h is included. wherever bullet.h is included.

EDIT: Looking at it further, you would be better off just removing that circular dependency altogether. When you create the bullet, just copy over any needed information from aggressiveEntity onto the new bullet instance when you create it.

In Topic: How much money do you make with your games?

15 September 2016 - 01:12 PM

I made this game in high school for the pocket pc about 14 years ago and made about 200 dollars off of it
http://fish-food.softonic.com/pocketpc
That is the most success game I have made money wise. All of my games I release these days are free. I would rather try to get as many people to enjoy my game as I can rather than turn a profit.

In Topic: SFML.net Vector Arrays with shaders?

12 September 2016 - 02:35 PM

You could group tile draw calls by shader.


PARTNERS