No video

Creating a Map of Tiles // Game Engine series

  Рет қаралды 36,303

The Cherno

The Cherno

Күн бұрын

Пікірлер: 54
@toffeethedev
@toffeethedev 4 жыл бұрын
I LOVE the new chilled-out vibe of your videos recently. Maybe it's the cozy jumper
@prowhiskey2678
@prowhiskey2678 4 жыл бұрын
Before reverts, either stash or commit. The you can always undo the revert. Also git reflog can almost always save you.
@TheCherno
@TheCherno 4 жыл бұрын
I probably would, it was just a case of discarding a local directory of extra files I was done with before merging a branch, but then realizing that deep in that hierarchy there was actually an important source file... I'll be more careful next time :)
@glennstormdesign
@glennstormdesign 4 жыл бұрын
It's eerie how often this series' video releases mirror what my dev experience is. (also level building this week) And _yes_ so many ways to use tiles to build content ... pls let me share another example; a procedural method to lay the foundation of terrain, so (now) I can place specific tiles for the level. Inspired by Unity terrain layers, and 'painting' alpha of tiled textures in somewhat random ways to make tile image repeating less obvious, my system takes tile terrain layers for different 'biomes'. For example, a soil base layer, rocks, roots, 'pebbles', grass and 'flowers', all with some negative space where nothing is drawn except the base layer. Each has a tile that can repeat, and the layers go in this order, however to a) not simply cover everything from the previous and b) make the repeats less obvious, I use another tile: a repeatable noise texture (I simply painted white over transparent, made repeatable) The base (soil) layer fills the environment (an efficient single-draw batch render is employed for this whole method btw), and the next layer is drawn. To draw the layers, this noise tile is looked up, offset in x and y randomly, and then each pixel of that offset noise corresponds to how much to make the whole tile of the terrain layer transparent. Because each layer re-randomizes this offset, the subsequent layers (rocks, roots, grass, etc) are sufficiently broken up, and no repeating is obvious. Now, that looked _okay_, but to get fancy, and because Yan showed clearly how to do fragment shader jazz, I pass these terrain layer draws through a GLSL shader that samples the surrounding eight tiles for their alpha value (again, taken from that noise tile). Then, the shader linearly blends from the edge or corner (average alpha value from one tile to neighbor) to the center. [Good fragment shader practice] This makes an endless non-repeating procedure generated terrain with any 'recipe' I like for different 'biomes' (using a different set of terrain layer tiles); all super smooth and organic. From here, I can place scene object tiles to represent level-specific things (collide-able, decoration, triggers, etc) but I don't have to think about making the base ground, and it looks pretty awesome. This example for making procedural terrain base with authored tile objects has set me up for the level-building stage I'm at now, with some scene class development in place as well. ... sorry, long post. (:D But, this is all fun to share with everyone. And thanks, Yan!
@rift1067
@rift1067 4 жыл бұрын
Do you plan on doing a deep-dive analysis sort of thing on the Unreal Engine PS5 demo? Would be cool.
@TheCherno
@TheCherno 4 жыл бұрын
Looks super amazing - maybe once they release the technical details I will make a video :)
@samuelrasquinha6712
@samuelrasquinha6712 4 жыл бұрын
Very Nice! You seem very positive today! Nice work! :D
@TheCherno
@TheCherno 4 жыл бұрын
😊
@sebastianzander87
@sebastianzander87 4 жыл бұрын
I would probably code a quick and dirty editor feature, which allows you to select an active tile/sub texture (from a ImGUI window "texture browser") and lets you place it on a grid by holding down the left mouse button and rectangular mass fill when additionally holding down a control key; possibly clear a tile by holding down the right mouse button; and for the sake of a faster workflow also a tile copy and paste function. And then of course serialize the data into a map file before you quit the application ;) I have always been a fan of in-game editing when you start the development of a game. Over time such a sandbox application could become a proper standalone editor.
@Light-wz6tq
@Light-wz6tq 3 жыл бұрын
This is the 69th video in the game engine series nice
@nerdastics3987
@nerdastics3987 Жыл бұрын
BTW: using a text-based tile mapping system will help in map creating because it both reduces file size and is also easier to use because you don't need a map making tool, you can just use a text editor
@Brad_Script
@Brad_Script 5 ай бұрын
true but map making tool that generates the text-based tile is even better lol
@osys7832
@osys7832 11 ай бұрын
there's a big red button with "Delete" text on it cherno: 🤩🤩🤩🤩
@hjups
@hjups 3 жыл бұрын
Did you ever continue working on 2D tiles in Hazel? I couldn't find a followup video. There was a graphical bug with one of the tiles where a seam would appear next to the quads depending on the camera scale / position, so it would be interesting to see what the cause of that is / how to fix it. I am guessing it's a coordinate representation issue, however, by drawing each tile as a single quad, I don't know how you would fix that other than having some custom tile grid where the fp coordinate values are guaranteed to be identical (i.e. bit identical).
@Sebanisu
@Sebanisu 2 жыл бұрын
You could use a string_view instead of const char * and then the length would be known.
@sam_is_people1170
@sam_is_people1170 2 жыл бұрын
thanks!!
@madeso
@madeso 3 жыл бұрын
20:00 you are doing lookups twice. If you are c++17 use a if with initializer, otherwise just store it in a temp: if(auto found = map.find(tileType); found != map.end()) texture = found->second; else texture = barrel;
@BeheadedKamikaze
@BeheadedKamikaze 4 жыл бұрын
It looks like you didn't notice yet... the only transition tiles that work with water are the grass tiles (at least, in the sprite sheet - there may be others in amongst the full set). You'll either need to redo your map layout to be grass instead of dirt at the shoreline, or you'll need to augment the sprite sheet.
@8DaMusic
@8DaMusic 4 жыл бұрын
oh hi cherno
@retroryuu7254
@retroryuu7254 4 жыл бұрын
Next Episode: I accidentally deleted the GitHub repo xD
@agfd5659
@agfd5659 4 жыл бұрын
I accidentally dragged My Computer into the bin and now my computer is gone
@TheCherno
@TheCherno 4 жыл бұрын
Hopefully I won't accidentally delete my KZfaq channel lol
@toffeethedev
@toffeethedev 4 жыл бұрын
Re; mentioning optimisations at the end -- something I do is create a texture the size of the world and render the individual quads to it when we initialise the world, then just render that single texture every frame. It saves CPU cycles but at the cost of memory. Is that something you think is worth doing?
@NattyVega
@NattyVega 4 жыл бұрын
What I did is to render in NxN chunks by uploading an array of "texture atlas IDs" of the entire chunk to an uniform buffer object, drawing a single quad, while the shader does the tile selection for you.
@AliHeravi
@AliHeravi 4 жыл бұрын
Great Videos. When is the move semantics video coming?
@lorenzopazzification
@lorenzopazzification 4 жыл бұрын
What are you opinions on the recently released videos of Unreal Engine 5?
@zoltankurti
@zoltankurti 4 жыл бұрын
They are not telling the whole thruth about triangle counts. No way they ship a game where a simple scene has a billion triangles in it.
@TheCherno
@TheCherno 4 жыл бұрын
Looks amazing! I watched it on the latest patron live stream because it was requested - super cool stuff and definitely the way forward. Definitely interested in the technical details - once that comes out I may make a video on that. :)
@gurjindersingh3843
@gurjindersingh3843 4 жыл бұрын
These days I can't take anyone saying their game is "RPG" seriously
@nwalkeruk
@nwalkeruk 3 жыл бұрын
Hi The Cherno, thanks for this, if possible can this be taken further like creating a custom binary .map file and doing a similar thing for the tiles so jo blogs doesnt have easy access to all those lovely tiles we spend so much time creating?
@batuhandev4847
@batuhandev4847 4 жыл бұрын
Hey Cherno, Whe you will add the 3D to the Hazel
@radol
@radol 4 жыл бұрын
Recent factorio development blog (Friday Facts #344) game some interesting insight on map tile transitions
@DJayDiamond
@DJayDiamond 4 жыл бұрын
Btw your security certificate expired 2 days ago on your site
@domeen0gt895
@domeen0gt895 4 жыл бұрын
Recently I found out about a game engine called Corona and now I find out about one called Hazel what's next, pickle?
@Aluminum0013
@Aluminum0013 4 жыл бұрын
Still waiting for you to push the previous episodes' commits to github.
@cadfoot568
@cadfoot568 4 жыл бұрын
Какого бренда “the cozy jumper”?
@TheCherno
@TheCherno 4 жыл бұрын
Честно - даже не знаю! Скоро Cherno бренд будет! 😉
@nextlifeonearth
@nextlifeonearth 4 жыл бұрын
How do you even keep getting these data loss issues? From now on, you're going to stash everything instead of revert, ok?
@RedCraftRPG
@RedCraftRPG 4 жыл бұрын
You mean like... Git revert? You can undo that because there is a history of everything
@TheCherno
@TheCherno 4 жыл бұрын
I discarded my local changes. As far as I know, normally if you do that they're gone.
@RedCraftRPG
@RedCraftRPG 4 жыл бұрын
@@TheCherno You can see your history with "git reflog". Could be worth a try next time, works definitely to undo a "git reset --hard HEAD^"
@ibrahimhussain3248
@ibrahimhussain3248 4 жыл бұрын
If you use something like a git, which I believe you do. Shouldn't you be able to revert the reverted?
@radol
@radol 4 жыл бұрын
If you revert/delete some change before commit, you cannot get it back
@ricknaam5658
@ricknaam5658 4 жыл бұрын
I like to use Tiled to make a map, it spits out JSON files
@OneMeanDragon
@OneMeanDragon 4 жыл бұрын
Still early yet, waiting for you to get into isometrics etc lol
@Clystron426
@Clystron426 4 жыл бұрын
While you wait for him to do that, research the subject yourself 😊
@eat-hhh
@eat-hhh Жыл бұрын
关于图集的这部分代码竟然没找到。好像没有提交吧
@xarisfil58
@xarisfil58 4 жыл бұрын
Why uint32t in for loop?
@TheCherno
@TheCherno 4 жыл бұрын
No reason, just a habit. You can use either int or uint32_t (or really any integer type) in this case, doesn't make a difference.
@maxi-g
@maxi-g 4 жыл бұрын
Yan you should make Hazel a commercially avaliable engine. Make it like Unity or Unreal just better and sell it. You won‘t have success with an engine with witch you can make floppy bird with. There are hundets of these out there already. You absolutely have the talent to make an AAA engine with your knowledge.
@ismailAx2011
@ismailAx2011 4 жыл бұрын
Can you do a video on font rendering with libfreetype and opengl? Thanks.
@miko007
@miko007 4 жыл бұрын
the values you do not plan to change at runtime should really be constexpr
@suryabond0077
@suryabond0077 4 жыл бұрын
Coding is HARD☹️😔
@neemaadam
@neemaadam 4 жыл бұрын
i'd guess cherno comes from the word chernikov if you think so please leave a lije!
I made it FASTER // Code Review
38:46
The Cherno
Рет қаралды 535 М.
I REMADE My First Game 12 YEARS LATER!
37:50
The Cherno
Рет қаралды 57 М.
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 17 МЛН
Ik Heb Aardbeien Gemaakt Van Kip🍓🐔😋
00:41
Cool Tool SHORTS Netherlands
Рет қаралды 8 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 18 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 51 МЛН
How Sprite Sheets/Texture Atlases Work // Game Engine series
24:00
LDtk - Powerful 2D Level Editor from Dead Cells Creator
12:15
Gamefromscratch
Рет қаралды 29 М.
How to Build a 2D Renderer | Game Engine series
39:30
The Cherno
Рет қаралды 88 М.
All about MEMORY // Code Review
33:42
The Cherno
Рет қаралды 163 М.
Instruções de uso: Tiled Map Editor
12:09
Antônio ENGEBOT
Рет қаралды 5 М.
Coding Quickie: Isometric Tiles
22:13
javidx9
Рет қаралды 116 М.
How To Make A Tile Editor In C++ | Devlog #5
20:06
Cakez
Рет қаралды 1,8 М.
NES Development Environment
14:58
NesHacker
Рет қаралды 350 М.
Batch Rendering Textures (+ Debugging!) // Game Engine series
46:30
Code-It-Yourself! Simple Tile Based Platform Game #1
39:41
javidx9
Рет қаралды 218 М.
Comfortable 🤣 #comedy #funny
00:34
Micky Makeover
Рет қаралды 17 МЛН