OpenGL 2D editor? - iphone

I want to draw different 2D objects in OpenGL for example a path/Road ,is there any program i could draw them using a GUI then transfer them to points so i could use them in my program ?

I have personally used Inkscape to do this. If you save your data as SVG, then any standard XML parsing library should make it relatively easy to extract your data. Even better, you might even find an SVG parsing library that will make it even easier. I created one in Python, based on the work of Martin O'Leary of supereffective:
http://pypi.python.org/pypi/svgbatch
It's very fragile and incomplete (it barfs on svg elements it doesn't recognise) but if you stick to the SVG elements it recognises (closed polygon paths, no curves) then it works, and it might help you put together one of your own.

Somewhat heavy handed, but you could use Inkscape to create SVG files, and then just parse out the path vertexes.

Related

How can I organize tiles in a tileset?

I am trying to follow the tutorial for a dungeon RPG, which involves creating a tileset.
As part of this (bookmark to exact time in video (edit: thanks, corrected)) in the video it's possible to move around tiles into separate folders. I am trying to re-create this on Unity 2022.2.0.a14.2406, and I don't seem to be able to do this: Whenever I move around tiles (from a tileset) to other folders in my assets, I end up moving the whole tileset (see image below, with the left-arrow linking to the tileset). This of course prevents me from splitting up tiles, e.g. into categories like players/walls/etc.
How would you do this? I also tried using tags, but they seem to have the same issue - they get applied to all tiles in a tileset.
Edit: Example with multiple tiles (showing the first few) extracted via 'sprite editor => slice/automatic'. It's 256 tiles, so to use them it'd important to have some way to group these tiles.
I bumped into a similar situation, and solved it rather naively by firing up Paint.NET to edit the gigantic sprite sheets I had found online into smaller similar ones for the different types of terrains, and making a distinct PNG for each character and game object.
Good naming is critical: use a short but descriptive name for each PNG, so it imports and breaks down into say Torch_0, Torch_1, etc. and Castle1_0, Castle1_1, BlueBlobBaddy_0, etc.; have all the sprites needed for a given terrain type in the same import file, import them into dedicated folders/subfolders, then splice them into tiles.
It's honestly quite a lot of work, but it's well worth it in the end.
I'm hoping this post will honor the age-old rule "if you want to learn how to do something, post the wrong way to go about it online" and will prompt a better, not-so-naive approach to this problem which I presume everyone working with 2D tilesets in Unity has encountered.

iPhone : 3d Objects with animation

What is the best format to use for 3D characters with the iPhone. I am looking to find free characters and did look at md2 (previous post), however there does not seem to be much free quality stuff about.
All I am after is to have a few normal 3D people walking around on my iPhone. I do have some animated 3ds / x animated characters. I am just trying to work out via what tools and format I should use for the iPhone.
Update:
Keeping this simple how do I get animated .x files or animated .3ds file on to the iPhone?
The md2 example seems like a dead end as can't convert 3ds / .x animated files to md2 successfully with jpg textures .
The choice of the file format does not depend on the target plattform but on the capabilities provided by it, the amount of thrid party libraries you want to use or the effort you want to put in writing a custom file loader.
There is no such thing like the "best file format".

iOS app view background (Image vs draw) design question

Suppose I was writing a game which involved a relatively complex geometric game board. Something like a dartboard.
I would want a view to display the game state. What is the best way to implement that view?
For example, should I draw the board off line in something like photoshop, add it as a resource, and then show it using a UIImageView? Or should I use drawing primitives and essentially draw the board programmatically?
What are the trade-offs?
If I do use an image, what format should I prefer? .png, .tiff, .gif, .jpg?
Thanks,
John
If you decide to go the image route you should use png. Displaying any other format you pay a performance hit (as mentioned in the comment).
To decide between building photoshop vs drawing via code you need to decide how much time you want to put into learning Quartz/CoreGraphics. Apple's docs:
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html
If you already know Photoshop then building the graphic there is probably much easier, if you don't then learning Quartz is prob a less steep learning curve than Photoshop...
If it's a simple board, it's easy enough to draw it into the view, which gives you the possibility of easily manipulating it in interesting ways. Drawing in a view is done with a set of postscript like primitives.
For something more fancy, photoshop might be the way to go.
PNGs are preferred.

Drawing vector art in an iPhone app

Im developing an iPhone game, and I want to know how to draw vector art, right now Im drawing all my art in Illustrator + Photoshop, it looks ok, but what I do is to save my vector art to png and then I use it in my game.
What I want to do, is to use my vector art instead, how can I do this?
Thx.
(I've read that I should use Quartz2d and Core Animation.. but dunno what those are or how to use them tbh)
You should start by reading the Quartz 2D Programming Guide.
Quartz 2D is the underlying drawing technology in iOS, and is vector based.
If you plan to use art drawn from illustrator & photoshop you may have to jump through some hoops to turn your assets into something you can draw directly.
You may consider exporting your assets to pdf and using the Quartz 2D's pdf support to draw them. If it's not quick enough, you may yet be able to use it to cache stuff to bitmaps. I haven't tried this myself, but it's certainly what I'd try first.
Good luck!

Vector drawing tool for iPhone development

This isn't strictly a programming question, but I'm asking it here because it's certainly a software development question, if you take "software development" to include all aspects of creating a software system.
I am an independent iPhone developer. Except for translations, I handle all aspects of my apps myself—graphics included. I have to create icons, buttons, and UI elements of all sorts on a regular basis. I've learned a few tricks along these lines, and while they're certainly not works of art, I can effectively use gradients, shadows, border strokes, transparency, and textures to create minimalistic, attractive effects.
So far, I've used a vector drawing tool called VectorDesigner for all of my development, with occasional raster postprocessing by Pixelmator. It's worked mostly okay so far, but VectorDesigner has a host of issues:
It uses a package format for its files, which interferes with the use of Subversion.
It is very much a print tool, and I have to be very careful not to end up with objects on fractional pixel values which cause antialiasing.
While you can take the union or intersection of shapes, or add and subtract them, curves tend to deform with repeated boolean operations, sometimes quite dramatically.
And it offers very little control over strokes, to the point where I barely use them.
So I'm looking for a better tool for this specific purpose: shape-based drawing of simple icons, buttons, and UI elements on a Mac by someone without graphic design training. Good functions for exporting would be a plus—ideally it should be almost as easy to export a PNG to the place it goes in my project as it is to save (not save as) the file.
The perfect tool for me would be one that would allow you to define an object's shape by stacking up areas and masks defined by primitive shapes (which would remain separately editable), then define properties on those objects like transforms and strokes. I have no idea if something like this exists, though.
Adobe's tools generally strike me as very heavyweight, and are usually expensive, but I suppose they're a possibility. (Fireworks, with its emphasis on screen design, seems like it might be particularly suitable, but I don't know that much about it.) But what else is out there? If you're in a position like me, what do you use? What do you recommend?
Edited to add: Of course a graphic designer could get better results from an ancient copy of MacPaint than I could from Illustrator CS5. No tool can replace skill and taste, and many programmers have little of either. I'm aware of that. But I'm fortunate enough to have at least some taste—enough that my users compliment my apps' appearance in their reviews. I'm not hugely talented, but I do know my limitations, and I don't let myself produce anything ugly. Given my budget, that will have to do for now.
Try Opacity. A little rough on the edges, but one of the coolest and most unique features they have is export as source code (in Quartz, Cocoa, Cocoa Touch, or Canvas)
I'd suggest OmniGraffle
OmniGraffle is easy to use, can save as a PNG, can create binary non-package files (it's an option in the interface). You can also set the units to pixels to ensure exact alignment. (Canvas Size -> Ruler Units)
Finally, the Graffletopia website has some nice iPhone stencils for getting it right:
http://graffletopia.com/search/iphone
I think the only acceptable answer here should be "hire a designer".
But it sounds like Pixelmator/Inkscape are your best bets.
Though if you do find something better, that'd be really cool. Like a jQueryUI but for native.