kubic-c / spock_engine Goto Github PK
View Code? Open in Web Editor NEWC++ 2D Game Engine | Spock Engine
License: MIT License
C++ 2D Game Engine | Spock Engine
License: MIT License
Now that most of the engine has been smoothed out and redesigned, we must turn to the main purpose: Tiles.
Tiles:
Tilebodies:
Currently, the internals of spock engine are unclear from misorganized data to unclear naming or lack of clear naming standard.
This leads to an odd access pattern with in data/variables.
Solution:
refer to commit 661e43b's description.
Currently spock engine's UI canvas's design is slightly cluttered and includes a lot of boiler blate user side.
Solution:
// 1. && 2. example
ui_canvas_t* canvas = scene.canvas;
// this will make the element display in the middle of the screen
canvas->add_text("hello_world").add_horizontal_constraint(SPK_MIDDLE).add_vertical_constraint(SPK_MIDDLE);
Adding ways to debug render lines, circles, and other polygons onto to entities will allow end-users to debug render positions and other things.
Solution:
vvv Straight to the point vvv
Changes:
Rendering and meshing are now both entirely in the render folder, meaning no random render related code in the systems/ folder. This allows much more easier focus on tile logic and such
Rendering and meshing systems are held in lists and then called by a new class called "render context". So instead of being called through a flecs pipeline, theyre managed directly. This was largely for readability and allowing them to be "tooken away" from the systems/ folder
Removed old UI systems, will need to be redone, wasnt really satisfied with how they were done, and plus TONS of messy logic interpolated with rendering code together.
Cameras components now no longer have a View-Projection matrix, it is now stored in rendering context. The camera compoents now just holds things like pos, scale, etc. and then the VP in the rendering context is updated with the current cameras config via 'recalculate'. This also prevents rendering systems having to call get_mut or get_ref which is ugly.
Changes to come in the main branch directly:
Input detection/management within spock engine is all over the place and not well planned out.
Making a object oriented interface for input management (within the window class) is the best way to go about making a fully fledged input detector
Example below:
spk::window_t& window = spk::window();
window.is_pressed(SOME_KEY_NUM);
window.mouse_click_pos();
window.mouse_pos();
window.mouse_is_pressed(SOME_MOUSE_BUTTON_NUM);
Currently spock engine gives the user no ability to play sound
Solution:
// example
const char* sound_file = "sound_file.mp3"
uint32_t sound_id = spk::load_sound(sound_file);
spk::play_sound(sound_id);
Further development of the UI design, im pushing this off later to go work on the primary focus of the engine which would be tiles.
To get to the point: allow a FLECS style creation of a UI element.
The reason I want to add this is it would simplify creation of UI elements, and reduce boiler plate. (PS i hate boiler plate)
example below
// this will make the element display in the middle of the screen
canvas->add_text("hello_world").add_horizontal_constraint(SPK_MIDDLE).add_vertical_constraint(SPK_MIDDLE);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.