SceneObjects losing scale

Mar 1, 2012 at 8:43 PM

I'm currently going through the asteroids tutorial, which by the way, totally rocks. I came across an issue that's probably something I screwed up but I just can't find where and I'm wondering if anyone else has any thoughts. The asteroids are being created, which is all well and good. I give them an initial scale of 100, which they maintain for about one frame, after which they immediately go back down to a scale of 1. I added an update event to the asteroid SceneObject and traced out the decomposed world matrix, which does show the scale moving between 1 and 0.99. If i force the scale back up to 100 in the update event, it works, but that's really hacky. The only modification of the world matrix I am doing is initially setting it (asteroid.World = Matrix.CreateScale(100f) * Matrix.CreateTranslation( position ); ) and then modifications to the M42 property, forcing it to stick to the ground plane.

Any ideas?

Mar 2, 2012 at 1:01 AM


Thanks for the kind words ;)

Are you using the latest changeset or the release?

Mar 2, 2012 at 4:56 AM

I'm using the latest changeset. I tried a couple different things aside from forcing the scale on every frame. What finally "worked" for me was to set the scale property on the importer to 1, then using the above line for asteroid.World and also CollisionMove = new ConvexHullCollisionMove( this, collisionModel ) {Scale = new Vector3(10f), ... } for the asteroid class. ( I actually ended up scaling things down to 10 instead of 100). For some reason, when it's attached to the convexhull it retains that scale, but immediately loses it's own scale (for the highpoly model). Unfortunately, i haven't the slightest clue where to start looking for potential solutions! I should mention that setting the scale on the model in the pipeline does work. Maybe a transformation on the world matrix is passing over the scale factor?

Mar 2, 2012 at 8:39 AM

I'm getting my head onto Physics right now and potentially making a few changes on how it is all done. I'll let you know when it's done so that you can try it again and see if it solves your issues again.

On a side note, my Ace on Steroids retake which should see light pretty soon as no issues at all regarding physics scale.

Mar 2, 2012 at 3:40 PM
Edited Mar 2, 2012 at 3:41 PM

Awesome! Appreciate it :) I have another question, which I'll post in a separate thread, sorry to keep bugging you.

EDIT It was about particle systems, which seems to have been covered for now. Anxious for your next major release!

Apr 2, 2012 at 8:50 AM

I am facing the exact same scaling issue on latest IGF 0.9.2 and Latest sunburn 2.0.18. Just for one frame the asteroids are visible and then they are dots!

Another issue I am facing is that I compiled the last ace tutorial for WP7 and on WP7 everything is pitch black , the ship as well as the asteroids on a white background. (the textures/materials dont display I guess)

I am just 24 hours into IGF and SunBurn so maybe I am doing something stupid :)

Apr 3, 2012 at 8:53 AM


The current Ace on Steroids source code and videos were made at the time I released IGF v0.8.x and SunBurn introduced some breaking changes that I had to replicate within IGF v0.9 and above. For that reason, the tutorials won't work as expected without many changes to their source code.

That's why I started working on Ace on Steroids again from scratch and I'm about to release it on all platforms (PC, Xbox 360 and WP7). Actually the PC version is already available here:

I'll be working back on the videos as soon as the game gets released on Xbox 360 and WP7 which shouldn't be hopefully that far away in time ;)

The scale issue on asteroids is due to the new Physics implementation I made on IGF. To solve it, make sure that you set their ConvexHullCollisionMove.ScaleFactor to some value such as new Vector3(15f) for the bigger asteroids, new Vector3(10f) for midlle ones and new Vector3(5f) for the smaller.

On the WP7 side, the old source code wasn't yet ready for WP7 so it doesn't yet support this platform. If you want to get a sneak view on the new Ace on Steroids source code, you'll get it if you purchase the game on one of the above websites. That was a way for me to have game developers donate to the project so that I can continue working on it yet in exchange they get a full simple game and its source code to play with ;)