Jump to content

  • Log In with Google      Sign In   
  • Create Account


Ralara

Member Since 24 Sep 2010
Offline Last Active Apr 30 2014 06:15 AM

#5029342 Second entity moves really slow!

Posted by Ralara on 06 February 2013 - 03:18 AM

I'm not 100% sure on how your timer works, but I would imagine the get_ticks() function returns how many ticks there have been since the last time it was called?

 

If so, then you should only call get_ticks() once per cycle (at the beginning of the main while loop in your case) and store this in a variable. Then use this value for both the player and the enemy.

 

As you are calling get_ticks() for each entity, there are less ticks happening between the call for the first entity and the second entity than there are between the second and the first, because of all the other stuff happening in between,

 

Let me know if this works or not!




#4988047 Mesh loaded with Assimp not showing up

Posted by Ralara on 08 October 2012 - 11:27 AM

Good news and bad news....

Good news is I can load the models using my loader (I tried the Bob.md5mesh and the BoarMan.md5mesh) so it is possible using Assimp. Odd thing about the BoarMan mesh is that there is not texture listed in the file (that I could see) so that model appears just black until you go far enough away to see it against the background:

http://www.adamsmith-demos.co.uk/wp-content/uploads/2012/10/BoarMan_Full.png

When the Bob mesh first loads because of its size it appears like this:

http://www.adamsmith-demos.co.uk/wp-content/uploads/2012/10/Bob_Loaded.png

and once I've moved around it looks like this:

http://www.adamsmith-demos.co.uk/wp-content/uploads/2012/10/Bob_Full.png

Bad news being that it doesn't make it any clearer as to what you're problem is...

The difference between our code that I can tell is that you load the meshes that aiScene provides (which in the case of Bob.md5mesh is one) whereas I set a hierarchy of sub-meshes up using the aiScene's root node. This way I get 6 meshes for the individual bits of Bob.

I don't think just loading the one mesh from aiScene would make it not appear, I think it would just make the first mesh in the file appear which is his body so you should get at least that....

Only thing I can think is that maybe you're not loading the texture properly and the mesh is covering the whole screen and appearing black?

<shameless_plug>
You can see the way I do my loading at http://www.adamsmith-demos.co.uk/
</shameless_plug>

Hope this helps!


PARTNERS