Latest!It has been a while since I've updated this post so I thought it time to bring everyone up to speed with the current state of
Selba Ward!
Here, I will be listing the main updates that I've not previously mentioned.
First, though, it should be mentioned that Selba Ward now has a branch that can be used with the currently work-in-progress version 3 of SFML.
You can visit that branch here:
https://github.com/Hapaxia/SelbaWard/tree/sfml3Note that the documentation is still for the current version of SFML (v2) and will stay that way until the official release of SFML 3. However, very little has changed with the way it can be used anyway; most of the (current) changes are just so that it can communicate with SFML 3 without errors.
Now, back to the main (master) branch and SFML 2...
Generally, all drawables have had any use of the quad primitive removed in advance of the upcoming depreciation of it within SFML. This allows it to be more 'future-proof' for later 2.x versions of SFML as well as bridging a gap to the upcoming v3.
The old version of Console Screen has been removed. The newest version is better anyway
New Additions!Starfield 3D (
wiki)
v1.0.1A 3D starfield of randomly generated stars.
I'm sure you must have all seen
Starfield by now. You may also have noticed its limitations due to its simplicity. It's still, of course, available and can be useful for a simple way to draw pixel stars. The pixel limitation was the reason I decided to make something a bit better; if a screen is high-resolution, pixels are smaller and therefore the stars become less noticable and may require drawing to a render texture first before then enlarging them to be able to see them.
Now, Starfield 3D alleviates this issue by allowing you to draw and actual star shape for every star instead of just a single pixel! In fact, this star shape can be anything at all; you can customise it fully (shape and colour)! Starfield 3D then scales and colours the stars based on depth but the scales and colours can be customised too.
Not just that, but the actual starfield itself is now projected with perspective and is now 'actually' 3D. This allows full control over camera movement to allow fully-3D motion including forwards and backwards (into and out of the scene).
Here is a short animation showing the style of effect:
Note that this GIF animation is looped so there is a noticeable jump when the animation restarts. This does not occur in the actual code.
These are the default star shapes but, as mentioned previously, they can be any shape at all - any collection of triangles (positions and colours!). You can simply pass a vertex array to Starfield 3D and it will copy it as a star template. Remember, of course, that it will be drawn with a primitive type of sf::PrimitiveType::Triangles so the vertex array should probably match that if you want predictable results. Note also that stars cannot be textured.
Polygonv1.1Creates a filled polygon from any given number of vertices/points.
Yup! Any convex/concave shape!
It automatically triangulates any 'solid' shape although you should note that overlapping edges are not allowed. It's not perfect and can break and very very complicated shapes but it does the job fine for most normal shapes and I plan to improve it over time.
There is no documentation for this right now but, of course, there will be. Plus, it should be pretty self-explanatory. You may notice there are some methods customise the way that triangulation is performed but there are no extra options at the moment; these will be used when those are added.
Pixel Display (
wiki)
v1.0.1A resizable grid or squares that be coloured individually.
Its intention is to simplify emulating more retro-style displays but can be used for any mosaic-style art.
It stores a palette of colours and then you can reference them by palette index instead of colour. This means if the palette changes, the display also changes and uses the new palette colours. This also allows (built-in) colour-cycling (as shown in the following animation).
You could think of it as a tilemap for colours instead of textures. It also has built-in 'commands' to manipulate it as if it were a pixel display.
It was used to create this animation:
Updates!Now for some updates to already existing drawables:
Spline (
wiki)
v1.6.2A few additions and fixes:
- In standard usage, corners no longer overlap so transparency can be used.
- A Spline can be added to the end (or beginning) or a Spline.
- A Spline can be 'connected' to another Spline. This can move the entire Spline or just the single vertex required. The Spline can also be automatically rotated so that the two joining vertices match orientation.
- Both of the above methods can be done as one act - adding a Spline to the end of the Spline while also moving and/or rotating to match.
GeneralPatch updatesAll or most of the drawables have had patch updates to fix various issues including:
- Removing the use of the quad primitive in advance of it becoming deprecated.
- Fixing compiler errors.
- Code consistency.