Using Tiled app to create Cocos2d .plist - cocos2d-iphone

I'm trying to use the Tiled application on OSX to create a tile background for a 2d iPhone game I'm working on. I need some way to export the completed background to a .plist file so that I can use it directly with cocos2d and the app I'm writing. Unfortunately, the only export options available are:
.dat
.txt
.json
.lua
.wlk
Is there any way to easily convert any of the above formats to a more usable .plist format? Thanks a lot for your help!

You mean the Tiled Map Editor? Cocos2d iPhone supports the TMX maps natively. Just save the TMX and load it with the CCTMXTiledMap class.

Related

How to display rgb data in QtQuick 2?

I am writing an Application for Android using Qt (with Android Build Kit), Felgo and QtQuick.
The App should be able to display a video which is decoded by libvlc. The problem is, that I do not know, how to display the frames provided by libvlc (format is RGB 24bit). I looked up several approaches in the internet but they were all outdated (e.g. used some OpenGL functions, which are not available in the Kit).
So does somebody knows how to efficiently render the raw rgb-data into a QtQuick Item?
(I know it is possible with a PaintedItem and Painter, but this uses a QImage which makes the process to inefficient.)
(I do not know much about OpenGL, so if your solution includes it, please be so kind and explain the functions you are using.)

Qt: How to create a .mp4 from a collection of QOpenGLFramebufferObjects or QImages or Glunit textures

I am developing a Qt app for iOS, Android & OSX.
Situation:
I have an std::vector of QOpenGLFramebufferObjects. Each QOpenGLFramebufferObject can of course provide its own QImage or a GLunit texture by doing a takeTexture. So you can also say that I have a collection of QImages or GLunit textures.
Problem:
Now, I want to create a .mp4 video file out of these which works at least on iOS, Android & OSX.
How should I do this? Any examples doing this with Qt? Which classes in Qt should I be looking into?
ffmpeg or GStreamer, whichever works with Qt. But I need to know how to pass these QImages or Glunit textures into the required component or API to create the video.
Should I use QVideoEncoderSettings to create the video?

Quil: Don't even open the window

I'm trying to use quil to procedurally generate images. I think it's really great, but I'm not trying to display the image at all. I'm just trying to save the image to a file.
Is it possible to not actually open the window and just save the file directly?

Render a vector graphic (.svg) in C++

My and a friend are working on a 2D game where the graphics will be .svg files and we will scale them appropriately either by rasterizing them first, or rendering them directly on a surface (which still would require rasterization at some point).
The problem is, I've been looking all day to find a library that will allow me to take an .svg file and eventually get it to render in allegro. As far as I know, it would involve rasterization into some sort of format that allegro can read and then allegro could render the "flattened" image.
So what are some C++ libraries I could use for taking an .SVG file and "flattening" it so I can render it? The library obviously needs to support scaling too so I can scale the vector graphic then rasterize it.
I'm using Windows and Visual C++ Express 2010.
I've tried Cairo, but it only allows writing of .svg files and doesn't allow you to read the .svg file. I've also looked into librsvg which works with Cario, but I was having a lot of trouble getting it to work properly on Windows (because it has loads of GNOME dependencies). If you have any guides for getting these to work (on Windows) that would be great too.
The wxsvg library allows loading and manipulating SVG files. Qt also has an SVG module.
I'm coming a little late to the conversation, but I would suggest you to look at Nano SVG, an extremely lightweight svg renderer that doesn't need cairo/libsvg. I got nanosvg compiled and working in a couple of hours. It's very basic, but it gets the job done.
https://github.com/sammycage/lunasvg is a nice svg parsing, rendering and manipulating library. It is written with pure c++
SVG++ library provides advanced support for SVG reading, so that rendering SVG with allegro can be implemented in reasonable time.
I have recently put together an SVG renderer library in C++:
https://github.com/igagis/svgren
It uses AGG for rendering to off-screen surface.
Supports gradients and all kind of shapes.
Personally, I using NanoSVG in my Simple Viewer GL. It's allowing me easy to load and rasterize SVG images in few lines of code. But this library has weak SVG support.
With the help of nanosvg and many other c++ svg parsers, adding svg rendering capability to your application should be trivial. The recipe is as follows: svg parser + vector rendering library = trivial svg rendering. The vector rendering library can be cairo and a number of other libraries (nanovg comes to mind, as well as a number of other vg libraries). Here's an example of how to support svg rendering with cairo + fltk + nanosvg combo. Now, all the svg parsers, as well as cairo itself, along with other renderers, have bugs/shortcomings, but basic svg support should never present a problem.
I was looking for a real quick way to render SVG file in a Windows OS based MFC project.
In that case, Microsoft Browser Web Browser ActiveX Control is found to be an ideal solution.
And here is the result of loading SVG file using the Browser control.

How to run .gif file in cocos2d

Is it possible to run .gif file in cocos2d for iphone
CCSpriteSheet works really well for animating with spritesheets, you'll need a way to generate the spritesheet from the animated gif.
Read this.
I assume you mean an animated GIF. If so, no, not directly, but you could extract the frames and run them using any of the usual animation classes.