SFML community forums

Help => General => Topic started by: codewizard on August 22, 2013, 10:32:17 pm

Title: OpenCV - SFML level interface
Post by: codewizard on August 22, 2013, 10:32:17 pm
Hello,
so I am developing a game where the user is able to draw a jump n'run level on a piece of paper, take a photo of it and then the part of the program which uses OpenCV (computer vision library) creates a map based on the lines and shapes on it.
The second part then simply uses this level for a jump n'run. The problem now is the Interface: How should I hand the information from OpenCV to SFML? I have heard something about doing it via XML, but is there another way? It would be great if it was something matrix-like, because that's the form in which I get the information from OpenCV.
I appreciate every answer!
Title: Re: OpenCV - SFML level interface
Post by: Ixrec on August 22, 2013, 10:48:19 pm
It sounds to me like how you encode the level data is one of the biggest design choices for this entire program.  I don't think there's any way we can make that decision for you.

You should probably go read all of the SFML graphics tutorials and just see what ideas come to mind.  The one hint I can give you is that you should pay particular attention to the material on vertex arrays and primitives, since I suspect whatever solution you come up with is going to employ a lot of those.