I've used two 2d game frameworks (SpriteKit and Corona SDK) and have not found a way to programmatically create low res 2d shapes. They seem to be more centered on using sprites or image files.
For an example look at eliss infinity https://www.youtube.com/watch?v=VuKGJyJZY7s
How is something like this done?
Related
Plotting packages offer a variety of methods for displaying data. Write an interactive plotting application for two dimensionsional curves. Your application should be able to allow the user to choose the mode (line strip or polyline display of the data, bar chart or pie charts), colours, and line styles.
You should start with the GUI editation like this:
Does anyone know of a low level (no frameworks) example of a drag & drop, re-order-able list?
and change it to your primitives (more points per primitive instead of one ... handle each point as (sub)object so you can change its position later).
Then just add tools like add object,del object,... For hand drawing tool use piece wise interpolation cubics
The grid can be done like this:
How to draw dynamic 2D grid that adjusts according to camera zoom: OpenGL
Mouse zooming/panning is also important
Zooming graphics based on current mouse position
Putting all above together into simple editor looks like this:
Using GPU for curve rendering might give you some nice speed and functionality boost:
Is it possible to express "t" variable from Cubic Bezier Curve equation?
Mouse selection of objects might be a speed problem if your scene contains too many objects so in such case its best to use index buffers where you can mouse select with pixel perfect precision for almost free in O(1):
OpenGL 3D-raypicking with high poly meshes
The example is for 3D , in 2D is much simpler ...
Also do not forget to implement save/load functionality to some vector file format. I recommend using SVG it might be complicated to start with it but you can quickly check it contents in any SVG viewer or browser also in notepad as its just a text file. If you use just basic path elements and ignore the rest of SVG features you will see the parsing and creating SVG is not that hard for example See these:
Get Vertices/Edges From BMP or SVG (C#)
Discrete probability distribution plot with given values
For really big datasets you might want to use spatial subdivision techniques (Bounding (Volume)Area Hierarchy, or Quad tree) to ease up the operations...
More in depth implementation details about 2D vector gfx editors depends on language, OS, gfx api and GUI api you using and task you are aiming for ...
I am a beginner at graphics and I was wondering if anyone had any experience in programmatically splitting isometric tile sheets, in particular Reiner Tile Sheets Here is an Example Image:
.
I have been splitting it using guides by hand in gimp but there is some sort of pattern going on that I feel can be used to programmatically split this. Before I tried to make my own, I wanted to see if there was any such algorithms premade / software that could do it currently. Its not a simple grid that needs to be cut with same width and height for each one. Thanks for the help!
Some stuff for thinking and read
First take a look at:
2D Diamond (isometric) map editor - Textures extended infinitely?
for some inspiration. Especially take a look at (3. tile editor) part. The operations described there are exactly what you are looking for (to add the missing stuff you are doing manually right now).
However your tile set is oriented differently so the masks will be slightly different ...
In case you want to extract tileset from image you would need something like this:
Grid image values to 2D array
And also take a look at this (for even more inspiration):
Improving performance of click detection on a staggered column isometric grid
The pixel perfect O(1) mouse selection at the end is a good idea to implement.
Your tile map
so you have a tilemap image but you do not have the tiles boundaries. So first identify tileset resolution... There might be more tile sizes present so you need to know all of them. Your image is 256x1024 pixels and from a quick look you have 32x32 pixels tiles. Most of the tiles are 64x64 however they are constructed from 4 tiles of 32x32 pixels. The white color is the transparent one. So you just divide the image to 32x32 squares or regroup to 64x64 ones.
I've been working on 2D games for a long time now (because 2D is all I know how to do) and want to step it up a notch. I don't want to go fully 3D because I don't think I have the mathematical knowledge to work with 3D graphics, but instead want to start developing some graphics that lie somewhere inbetween.
By inbetween I mean graphics that will still render as 2D, but may have been created using 3D software and then exported at various angles. Some examples of the style could include:
Age of Empires 1.
Diablo 1 & 2.
Starcraft 1.
Is there any software used specifically for creating a 3D model and then generating a 2D sprite-sheet from it? Here is an example of such graphics that may help in making sense:
Blender is free 3D modeling tool, where you can make sprite sheet out of the model. I don't know how to do this but I know it's possible, because my friend is using it for our game (he is making 3D spaceship models and transforming them into 2D sprites)
http://www.blender.org/
I am not aware of such a specialized software, but have you considered simply using a 3d engine with a fixed camera looking at the scene from above and all objects at ground level?
That way you can use regular tools for modeling and still have the logic and (with a few settings to the physics engine) physics of a of a 2D game.
Unity engine might be able to help you.
Can anyone give me a hint or example how to write in real 3d on canvas?
I do not mean 3d projected on 2d like OpenGL or vectors, but on a screen as LG 3d or EVO3d. What if I have 2 stereoscopic images and want to show them as one. How can I do this?
(I prefer not to use OpenGL to render the real 3d since my graphics are so simple it does not require the use of OpenGL, think of it as a standard gallery that wants to display a picture/bitmap or pre-rendered animation)
I did some research before posting this question (of course) and found that many 3d-foto's are nothing but 2 fotos next to each other, does that maybe work for a game too? That I have to write on a canvas of dimensions (2*width, height) in stead of (width, height)?
I'm trying to set base to a 2D game with destructible terrain and/or particle effects, scroll, zoom, characters, etc... I'd like to know if there is a graphics library that would support those things in both software and hardware acceleration (need pixel access). I've tried SDL (even with DirectX back-end), but it seems hardware does its job only in full screen. I'd appreciate any suggestion.
Use OpenGL. Perhaps via another library e.g. SDL. I do not know why you can't get windowed HW acceleration working, it might be a platform thing (but it's certainly a different question).
Set the projection matrix to orthographic and use one of the axis (typically z) to organise 'stacking' elements. With an appropriate transformation in the display subroutine, you can align the x/y coordinates with "traditional" drawing (i.e., top-left down, rather than bottom-left up).
Build your graphical elements into bitmaps, convert them into textures and draw them on top of OpenGL Rects.