Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 17 Jul 2002
Offline Last Active Today, 05:08 PM

#5226736 Interpreting a performance profiling results

Posted by ApochPiQ on 01 May 2015 - 12:17 PM

To underscore what Promit said, in a slightly more general light: if you don't have between 10,000 and 30,000 samples that fall within the code you are trying to profile, you're going to get mostly useless data. Sampling is a statistical process. You have to give it time to converge.

I also echo the sentiment that you either need a GPU profiler or your code isn't actually doing anything worth trying to profile.

#5226734 C++11 crash

Posted by ApochPiQ on 01 May 2015 - 12:14 PM


#5226550 Random Number Generation

Posted by ApochPiQ on 30 April 2015 - 01:03 PM

This thread is no longer contributing value to the General Programming forum.

As such I'm going to lock it.

#5223552 Gamedevs presenting language problems to C++ standards working group

Posted by ApochPiQ on 15 April 2015 - 05:33 PM

Can you summarize the proposals/complaints for the lazy among us (cough cough, me) who don't want to read the whole PDF?

#5223293 Template or Macro

Posted by ApochPiQ on 14 April 2015 - 07:34 PM

That's a pretty impressive way to miss the point entirely, I have to admit.

#5223280 Template or Macro

Posted by ApochPiQ on 14 April 2015 - 06:32 PM

Is it better to have a sandwich or a screwdriver, and why?

#5218863 preventing system crash or power outage from wiping savegame: best methods

Posted by ApochPiQ on 24 March 2015 - 12:46 PM

As with many such questions, it's probably worth taking a step back and asking a different question first:

How important is this data?

If you aren't dealing with life and death matters, it just isn't that big of a deal. You're obsessing about an edge case that is nigh-on irrelevant in a game project.

People understand that power failure means data loss. If you really want to be robust against failure, you need things like redundant physical systems and Byzantine fault tolerant algorithms. I would bet money that nobody will play your game if they have to do so inside a radiation-hardened bunker with its own nuclear reactor for backup power.

Seriously. Trust the damn computer, and focus on stuff that matters, like making a game.

#5216316 String: How to find the most common character occurrence.

Posted by ApochPiQ on 13 March 2015 - 01:26 PM

Why not just output all the ties? 'fo', 2 in your example case.

#5213533 Movement Multiplayer Sync (Rewind/Replay) (Authorotative)

Posted by ApochPiQ on 28 February 2015 - 01:21 PM

Why isn't your client simulation on a fixed timestep?

#5213532 Ray vs Box Issue

Posted by ApochPiQ on 28 February 2015 - 01:19 PM

I highly suggest you set up a simple test case with a ray that is known to collide (but doesn't work with your code) and step through your logic in a debugger.

#5213131 Non-Member Functions Improve Encapsulation?

Posted by ApochPiQ on 26 February 2015 - 12:16 PM

This is one of those things that's kinda razor's-edge... you can fall off the razor and hit the one extreme (as you mentioned, making everything public) or you can land on the other side, where only the things that are absolutely necessary will be exposed. The non-member functions are then forced to only use the interface of the classes they touch, rather than the implementation.

A side effect is that you're forced to design better interfaces, although a pitfall is that you can easily fall into the trap of just adding a ton of getters and setters.

So really the results of this depend a lot on your own discipline and willingness to adhere to the intent of the design rather than taking shortcuts.

#5212773 Searching for life simulation communities

Posted by ApochPiQ on 24 February 2015 - 02:11 PM

Have you looked at more traditional academic communities doing AI research? I suspect you'll find a lot more pertinent material there, especially since game AI in particular is solving pretty different problems for the most part.

#5212600 Fixing client lag (delay movement)? (any math wizzes plz help)

Posted by ApochPiQ on 23 February 2015 - 08:34 PM

Poking around for a minute and I ran across this: http://ugx-mods.com/script/#core.Entity.attach

Sounds like exactly what you need.

#5212064 Fixing client lag (delay movement)? (any math wizzes plz help)

Posted by ApochPiQ on 20 February 2015 - 11:24 PM

I'm not familiar with the scripting system you're using, but traditionally script engines have a "per frame" callback that is invoked every time the game engine updates. You should look for such a way to run code - every game frame instead of every 0.05 seconds. That is the best way to correct the problem.

[edit] Afterthought: if the engine allows you to simply specify that one model should be attached to another, e.g. through a scenegraph, you should do that instead of trying to script in the behavior.

#5210771 std::atomic<DWORD> or enum class ?

Posted by ApochPiQ on 14 February 2015 - 08:51 PM

You should be able to do "enum class EnumCodes : unsigned" and then use a std::atomic<EnumCodes>.

I don't have a compiler in front of me to verify that though.