Jump to content

  • Log In with Google      Sign In   
  • Create Account

phil_t

Member Since 06 Oct 2006
Offline Last Active Today, 12:37 AM

Posts I've Made

In Topic: what means these error?

24 June 2016 - 03:06 PM

You need to learn how to debug this yourself. It's unlikely anyone can help you by guessing what the problem is. You're in the best position to diagnose this, because you can inspect the state of your program when it crashes, and set breakpoints, etc...

 

BitMaster said it best:

 

Again, you need to break into the crash with your debugger and inspect the state of variables. This kind of problem is bread and butter to any programmer. If you are unwilling to learn debugging this, you should change career/hobby.


In Topic: Hundreds of timers...

23 June 2016 - 05:39 PM

You do not need a separate thread to check if one value is larger than another.

 

It's as simple as ApochPiQ says. Dealing with buff timers will be the least of your challenges if you're making an MMO.


In Topic: Free game analytics

22 June 2016 - 10:45 AM

Turns out it was very simple (even for this non-web developer) to just cobble something together in php:

 

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php
 
 parse_str($_SERVER['QUERY_STRING'], $query);
 if ($query["key"] == "MyGameName")
 {
        $thingy = $query["stuff"] . "\r\n";
file_put_contents("somefile.txt", $thingy  , FILE_APPEND);
//var_dump($query);
 }
  else
{
echo '<p>DENIED</p>';
 
}
 
 ?> 
 </body>
</html>

 

And now I can just make an http head request from my game and stick the needed string in the url, and have it appended to a file on my server.


In Topic: Game Object Update Order

21 June 2016 - 04:49 PM

If you're trying to update all components on one entity, then all on the next entity, etc..., you'll have a problem. 

 

Instead, update all components of a particular type on all entities. Then all components of another type on all entities, etc...

 

i.e.

foreach entity with MovementComponent

{

     MoveTheEntity

}

foreach entity with SkinnedMeshComponent

{

     UpdateSkinnedMesh

}

 

Your dependencies can be expressed at a high level in your main game loop like this.

 

I assume when you say Unity says "screw dependencies", you mean that the update order of Scripts attached to the entities isn't predictable. That may be true, but I can assure you core components like physics, mesh renderers, etc... have very explicit update orders.


In Topic: what means these error?

21 June 2016 - 03:46 PM

From a quick glance, it looks like you're passing the address of an entry in a vector to another thread, and then reading from it. 

I see no attempt at any synchronization.

 

I'm not sure how you expect that to work? What's stopping the vector from being resized (and thus any addresses pointing into it now potentially pointing to invalid memory) while your other thread is reading from it?


PARTNERS