Hmm. Don't worry too much about that. I've realised another problem that will still occur.
Let me backtrack and explain how my 2D Camera class operates.
- All drawable objects in my world have a position, size and rotation.
- When it is time for them to be drawn, instead of the object's Draw method just calling straight into Material.Draw, it calls Camera.Draw(Material, Position, Size, Rotation)
- the Camera.Draw transforms the object's position and size according to its own viewpoint and then calls Material.Draw if the object intersects the screen (culling)
So, all object positions and sizes remain in 'world coordinates' and the camera converts to 'screen coordinates' for drawing. Same idea as with 3D but it's a true 2D camera.
Now, what this means is that, had I the source code, and were the Effect class to draw using Material.Draw, it would be a one-line fix for me: Inserting Camera.Draw in place of Material.Draw (well, I'd need to pass in the Camera so a two-line chang. Edit: Nope, I made my Camera class static so I was right the first time ^_^). I suspect it's not as simple as that due to hardware-instancing optimisations though.
The flip-size is that you exposing the positions of the live particles for me to transform isn't quite enough, were you to do that: I also need to transform their sizes. Only then could Effect particles act just the same as all the other objects in my game.
I think what I'll do therefore is just have my rocket produce smoke particles periodically outside of the Effect class until I have the Effect source code. The alternative is to redo my code using one of the 3D cameras but I don't want to do that ^_^ My camera has extra features built in like intelligent zooming: You can specify the boundaries of the world and the camera never allows you to look outside of that. So if you are at top-left of the world and zoom out, your view expands down-rightwards; Whereas if you are at the bottom-right of the world and zoom out, your view expands up-leftwards. Likewise if, on Windows, you change the aspect ratio, it will, if necessary, adjust the camera position to keep you inside the world.
(I don't mind donating my Camera class to the community at some point if anyone feels it would be useful to them; I'd like the chance to test it on a mobile device first though ^_^)
So, basically, you can consider this thread resolved in full now. Thank you both for your time :)
Edited by user Wednesday, February 8, 2012 2:43:39 AM(UTC)
| Reason: Not specified