I was writing a game in 2012 and let it lay fallow until now. When I convert it to Xojo, I discovered that Sprite surfaces and sprites no longer exist. I need to have the objects on the screen sense collisions as an integral part of the game. With Xojo: What do I use instead of Sprites?
Here is a tutorial on how to program sprites using OpenGL.
Is your game xplatform or restricted to a certain platform?
For the simple retro games I’ve made, I simply use Rect.Intersection (or Rect.Intersects for the classic framework) to check for collision. Of course, this only works well for rectangular-shaped objects.
If you need to test for collisions of rotated shapes (rect based bounding) you can look at this project.
Drag the rects around to test collisions.
Instead of using Xojo for your games, maybe you should try the free version of Scirra Construct 2.
The problem with Xojo is that it is not designed for gaming. I do not say that it is impossible, I only say that other tools are better equiped than Xojo is.
To give you an idea, in Construct 2, you do not have to write a single line of code. Everything is defined in events and behaviours. And be assured you can make very complex games with it.
Personally, I use it to create educational games for our six year old daughter. But there are occassions where I do use Xojo. There is nothing I can do with Construct 2 that cannot be done with Xojo and vica versa. Only in your case, when you need sprites, Construct 2 is better suited because you can create sprites from almost any format. And you easily have very fine control over collissions or bouncing.
I want to point out that I am only a Construct 2 user, like I am a Xojo user too. Both are very powerfull and user friendly tools, each in their own usage segment. If somebody come to ask me at the Scirra forum, if it can be used for wordprocessing, or database handling, I will definatelly advice Xojo. But in the case of gaming, Construct is the winner and is also very hard to beat by its competitors.
Whatever solution you choose, I hope it will work out for you. Wish you very nice gaming development fun.
I’ll try the tutorials and see if they can apply to my work. I’ll let you all know of my progress later this week.
Many Thanks -Will