Adding sprites and animations to my game engine

  Рет қаралды 2,307

cient

cient

Күн бұрын

Data locality segment inspired by "Game programming patterns" By Robert Nystrom
Music:
- Rhombus by Peppsen

Пікірлер: 20
@cient_dev
@cient_dev 23 күн бұрын
As a quick note before I make the next dev log, I just want to say that in practise, you usually don't want to store the animation map in the AnimationComponent itself (Was just for demo purposes) Instead, store a string or enum in the component to index a map holding every available animation in some kind of Asset manager class so you don't store identical animations across different components!
@kactusking243
@kactusking243 25 күн бұрын
Bro please keep making videos
@cient_dev
@cient_dev 24 күн бұрын
Working on a new one!
@kactusking243
@kactusking243 24 күн бұрын
@@cient_dev nice, I saw all of them were from a month ago and got worried you’d quit
@ryanlockhart5328
@ryanlockhart5328 4 күн бұрын
0:09 I felt that
@tay7931
@tay7931 6 күн бұрын
i want to get into game development but then i realise how complex coding languages look to me and i get super overwhelmed lol
@cient_dev
@cient_dev 6 күн бұрын
There are so many engines now that make it so accessible, you don't have to do what I'm doing here! Toby Fox claims to know very little about coding and he went ahead and made Undertale in GameMaker studio
@tay7931
@tay7931 5 күн бұрын
@@cient_dev oh i see, thank you!
@clumsygiant_
@clumsygiant_ Ай бұрын
Subbed! Keep up the good work
@cient_dev
@cient_dev Ай бұрын
Will try and make you proud
@SkitzFist1
@SkitzFist1 23 күн бұрын
Nice video. Would love to see a deep dive of your ECS
@cient_dev
@cient_dev 23 күн бұрын
You'll probably enjoy the next dev log
@SkitzFist1
@SkitzFist1 23 күн бұрын
Awesome! Looking forward to it 😁
@clafted871
@clafted871 Ай бұрын
Awesome! Love to see ECS stuff, though I do wonder, as I work on my own ECS engine too, would it help to have the entities and their component data be serializable? I was thinking of a JSON-style format, so that someone could simply make a new component with something like: "CollisionComponent { Width: 10 Height: 12 }" I figured it may be an easier implementation than a whole game editor as larger game engines like Unreal and Godog have, yet I can't figure how to do it. Thoughts??
@cient_dev
@cient_dev Ай бұрын
Honestly I haven't really played with serialization much in the context of an ECS, but having it could definitely be helpful (especially with state) and there are some libraries I've encountered that can dump simple structs like components into a JSON from within the code to handle serialization. But if you want to avoid hardcoding components and just have your own JSON-esque component ecosystem, maybe just have a Component class with a name and map, like struct Component { string name; map properties; } And you could parse the JSON file into this general struct, so that 'name' would be assigned as 'CollisionComponent' and properties would contain 'width: int(10)' and 'height: int(12)'. Then you simply just retrieve a desired component by name, and can get it's values using the properties map, like if (component.name == 'CollisionComponent') { int width = std::any_cast(component.properties["width"]); } Not sure if that's the most efficient solution but that's what I'd do if I went with JSON approach
@bakje24
@bakje24 12 күн бұрын
3:22 very random and probably doesnt matter but why 4? why not 2? top left and bottom right is all you need no?
@cient_dev
@cient_dev 12 күн бұрын
Good question! You can definitely just provide 2 corners and derive the rest from it in RenderSprite, I just personally find it more readable for RenderSprite to take in 4 UVs without having to do any of the derivation logic within the function (Separation of concerns I guess); And the Renderer::Sprite struct is just a way to wrap parameters to send to the function so it's more readable, it's a stack allocation and is destroyed at the end of the call so added memory isn't really an issue.
@OscarMdev
@OscarMdev Ай бұрын
Hello, I am trying to make an engine with ECS, I wanted to ask if you followed any class design or sequence for your engine. Currently I have been trying to apply it to a Java game but I always have the same problem regarding its architecture.
@cient_dev
@cient_dev Ай бұрын
I don't follow a specific architecture for the engine, but try to follow design patterns that I've picked up over time when they're helpful. Reading game programming patterns by Robert Nystrom is a good start, and if you'd like to see how some games implement an ECS, check out some games that use EnTT (an ECS library) here github.com/skypjack/entt/wiki/EnTT-in-Action
@diadetediotedio6918
@diadetediotedio6918 23 күн бұрын
​@@cient_dev I recommend some Sanders Mertens articles like 'Why its time to start thinking games as databases' and others, even if you don't use flecs, it is very inspiring, and the articles have a high quality.
I Designed A CPU (And So Can You)
19:14
Owen Gibson
Рет қаралды 14 М.
Bob Nystrom - Is There More to Game Architecture than ECS?
23:06
Roguelike Celebration
Рет қаралды 194 М.
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН
Did you believe it was real? #tiktok
00:25
Анастасия Тарасова
Рет қаралды 52 МЛН
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 9 МЛН
Improving My Game With Tester Feedback
17:49
AngeTheGreat
Рет қаралды 173 М.
Making an Entity Component System for my game engine
4:50
How I Solved Real Time Motion Blur
10:20
Sphynx_Owner
Рет қаралды 22 М.
A truly 2D game isn't what you think it is...
13:23
NivMiz
Рет қаралды 20 М.
EA Won't Let Me Play This Game - So I Hacked It
8:49
Nathan Baggs
Рет қаралды 293 М.
AI Learns to steal
17:23
Dingus Labs
Рет қаралды 336 М.
Answering Your Questions
29:12
Sebastian Lague
Рет қаралды 307 М.
Code a DOOM-like game engine from scratch in C [PART I]
27:47
The Old School Coder
Рет қаралды 16 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 691 М.