Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Have you EVER seen this error??

Author
Message
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 30th May 2012 05:04
Assertion failed: (3 <= count && count <= 12), function Set, file /Users/leebamber/Desktop/svn/common/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 122.

I can't understand what is wrong with the GetSpriteCollision.
I tested on all AppGameKit version and it do the same.
I never seen it!!!

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th May 2012 11:12
Sounds like there is a problem with a polygon shape. How are you creating the shapes?

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 30th May 2012 15:40
I'm working on a big soccer game.
Well there are 2 shapes, the player and the ball.

The shape of the player is SetSpriteShape(player, 3);
The soccer is the auto shape.
But the strange thing is : even if i assign a shape or not it fire this error casually.
And also if i don't add the GetSpriteCollision(between the sprites) it fires this error casually.

Maybe i need to use a CORE command like "update" or "swap" when assign the new image to the sprite?
We have done about 230 frames every image.

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 30th May 2012 15:47
Have you used "SetPhysicsMaxPolygonPoints"?

The shape shouldn't need to be redefined if the image changes as the shape can be anything at all. It doesn't have to match.

It certainly sounds like it has something to do with collision shapes... Have you tried debugging it in VS? Do you know where in your code it fails?

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 31st May 2012 03:04
No i use only Mac Tier 2.
Anyway i solved changing completely my Update function.
It was a compless function because it must be able to decide to continue the animation on changing animation.
For example when a soccer player change immediately the direction without restart frames from 0.
Now i will add the shape again (knowing the update is correct) and i will post the result, so we can confirm what this error is associated to.
Thx.

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic
xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 31st May 2012 16:35
After some tests i finally done a personal collision detection function.
Every time i try to use the SetSpriteShape it fire that error.

Don't know why.
I think the Shape recalculation is bugged from the 1054 or maybe there is something i didn't understand.

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 31st May 2012 17:11
What version of AppGameKit are you currently using?

Cheers,
Ancient Lady
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 31st May 2012 17:34
I use the set sprite shape command a lot in Obliterator, and have had no crashes like this. It doesn't use any physics though. I had a similar problem with animations not matching the collision shape that was set. So any animated sprite would basically be checking the first frames shape at all times. I got round this by recalculating the shape every frame. It worked quite well, although I think it has a slight impact on performance so you have to be sparing with it.
I have played using physics with a platform game I have been working on and also a pachinko game that got wiped in a hard disk crash . I never got that error thankfully (plenty of others though lol). Perhaps it is a mac based issue? Or do you use windows to develop on?

xGEKKOx
AGK Master
15
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 1st Jun 2012 01:32 Edited at: 1st Jun 2012 01:33
No i only use Mac, and the problem come out on all versions.
I never had this on the other 13 games i published, but this time the game is much more bigger.
Anyway, now, i'm not using the collision and the shape, and usually i don't use physic, cause i hate games like angry birds where all is based around the physic.

Now i'm using fps % 2 to divide the fps for the render and the calculations.
I will do other investigations to help you all to not catch the same issue.

iPhone/iPad Games/Apps : Street Karate Fighter - 90s VideoPokers Simulator - Ball VS Brick - CB RadioBox - Artic

Login to post a reply

Server time is: 2024-11-23 14:07:21
Your offset time is: 2024-11-23 14:07:21