Sign in to follow this  

Anyone have experience with clutter for 2d game?

This topic is 2069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Truthfully, I am not exactly sure. I would like to make a scrolling 2d arcade style space ship shooter one day. I don't really have any experience making games.

Right now I am developing a GUI for an audio program using clutter. So I have some experience with clutter, and I thought maybe it could be used to make a 2d game.

I messed around with SDL once, and I know that clutter is very different. In SDL you have a loop where you are constantly polling for events.

In clutter I can't figure out how to do this unless I used another library for input, and just use clutter for the graphics. In clutter you set up signal handling functions which launch functions when events happen. After you have all your clutter variables declared and or initialized in the main function, you use clutter_main(), which I guess starts the clutter main loop, but it is hidden from you.

So I'm just wondering how I go about this.

I was wondering if anyone has tried to make this type of game using clutter, and if I could get some advice on how set up my game loop in clutter.

Share this post


Link to post
Share on other sites
Doesn't look like clutter is really suited for that sort of thing... it is a UI library. It seems to have some animation functionality and whatnot, but I don't think it would be a great idea to try to twist it to fit a game. There are a number of other lightweight graphics libraries out there which would provide the necessary manipulation of images while allowing you a conventional internal game loop, etc etc.

Share this post


Link to post
Share on other sites
After learning more of the clutter API, I've found that a clutter game loop might use clutter_threads_add_timeout, which launches a given function continuously at a specified interval. This function could act as a game loop.

I'm still just not sure about the input. I'm currently trying to figure out why there is a lag with the click action in my program.

Share this post


Link to post
Share on other sites

This topic is 2069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this