PaperMod Site Height Fix

Ever since I caught a glimpse of the elegant PaperMod theme of Hugo static site builder, I knew I got to use it. While PaperMod theme is very slick and fast it has a few minor drawbacks, which need to be addressed. One of them being wrong height of the title page when navigation element is wrapped. This looks kinda cumbersome mainly on mobile devices, where, the page is just too high when no content is shown. Footer on the following image is out of the view: Here we have it fixed: ...

June 2, 2022 · 2 min · Matěj Černý

Auto Block Digging, Translator and UTF-8

(Well it’s been some time I’m aware… well college and stuff.., was little busy.) Anyway some improvements were made. New Language selector screen was added. Translator and UTF-8 First big thing is Translator which is simple static class that offers method translate(String& key)(obviously). Usually it’s good thing to separate strings that are shown to user from strings in source code, preferably store them in some .txt file. Also adding another language is as simple as adding another lang file and registering the language in code. ...

January 26, 2021 · 4 min · Matěj Černý

3D Editor Update

Gotta admit that in this update there was really not much in Terraria clone (Sandbox project). Nevertheless here are some minor tweaks for the Terraria clone: Optimized Particle renderer Fixed particle fadeaway effect Once again added support for spawning particles using Lua. Now for the many new things in the engine itself (NiceDay project): Mono C#, Added crude support for using C# as another scripting language (apart form Lua) If hotswaps are enabled, application will look every second at Managed.dll file to see if new version is available to reaload it. That’s very useful for development, in Dist HotSwap should be disabled. Currently supports adding C# Layers which look similar to C++ Application layers (In the future, ECS will be bound to C# as well). NBT supports glm::vec<size,float>, that means that things like nbt["pos"]=glm::vec3(0.f); are possible Fixed textureAtlas (huge memory leak and to some extension optimized) Added ECS using lib entt Now for the many new things in 3D Editor (SandboxTest project): The most important thing is of course the change of ImGui style (to resemble a certain 3D editor) Customizable and persistent layouts. (no longer need to change the size and pos of window at every start) Windows can be resized and even hidden and shown using View tab option Editor windows: Material bar to show and create new materials (change their properties == uniforms),(materials are bound to a shader which can be changed and reloaded on the go) Mesh bar to show and load new meshes (from .fbx or .obj. or binary) (binary file can be created from already loaded model to dramatically speed up loading in the future) Scene Window to manage all models, lights, cameras Scene entities are composed of entt components. Also they can be moved, scaled and rotated in the editor. no scene serilization yet :(

September 25, 2020 · 2 min · Matěj Černý

JSONification of Blocks, Docking

The amount of data in blocks.cpp has become impossible to maintain. I decided to outsource the data to json files located in res/registry. There is no space in cpp code for that! To add new block, one no longer needs to write an entry in header file as well as cpp files. To add a new block: 1. add entry to blocks.ids (choose unique id for the block) 2. add json map object to blocks.json 3. fill the object with desired attributes (hardness, lightSrc…) 4. CPP version can be still used nevertheless alongside with json: just specify blank constructor with string block_id, all of the attributes get copied from json file so one can focus solely on overriding functions. ...

July 14, 2020 · 3 min · Matěj Černý

Sun, Moon and Stars, Sound

Well, it has been 5 months since last TIMELINE entry, but that doesn’t mean that I haven’t done anything, not even close! As it’s obvious from the title Engine now finally has full Sound support. There are three main parts to this madness: libogg (for loading sound streams) libvorbis (for decoding ogg sound streams) and finally portaudio to play the data and yeah of course the thing I wrote… Gotta admit that I was considering using some already available sound engines, mainly OpenAL but since it’s not entirely free to use (API is, implementation is not) I decided to write my own. To put it simply there were few requirements: ...

April 28, 2020 · 3 min · Matěj Černý

Lua, Items and XMas

Even though adding scripting language to the engine was in DEEP FUTURE plans, once I realized how easy it would be to just rewrite one text line, hit enter and spawn particles with slightly tweaked velocities instead of recompiling the whole game again I finally decided that that time had come. Ladies and gentlemen, Brace yourself for… The Story of adding Lua: Adding lua itself was the easiest thing, simply add statically native lua lib and that was it, then I used ConsoleWindow template found in imgui_demo.cpp and suddenly I could use Lua console within the game itself :D ...

December 24, 2019 · 4 min · Matěj Černý

GUI Module (Engine)

We all know that making a GUI from scratch can be truly difficult and time consuming and maybe even boring, it would make sense then if engine provided such a thing, wouldn’t it? Ok, Ok, lets do it… (I could have just used IMGUI but…) Basic GUI module in engine (13_11_2019) in order to start with inventory, one must create some sort of GUI before… currently contains Windows (which can overlap), Label, Button, CheckBox, TextBox, HorizontalSlider and Image + layouts: (Column, Row, Grid) There is one GUIContext which cares about parent-child structure and events of GUIElements and GUIRenderer, which renders those elements positions are relative to the parental element currently no resizability to change a color, one has to change the GUIRenderer ...

November 23, 2019 · 1 min · Matěj Černý

ParticleSystem, Trees, Flowers, PlayerSprite

Ability to walk on blocks which are 1high without jumping. Player has a walk animation. Added entity health bar. Crude ParticleSystem using BatchRenderer2D temporarily, will have its own renderer with shader in the future. Can do 3500 particles without a problem. Added multiblock structure = tree and its generator. After placing a sapling block, sapling tile entity counts the worldtime and then calls TreeGen. Trees have random number of branches(dry or normal) and random corona. Everybody loves flowers. and graaasss. (Sheep are in sight :D)

August 25, 2019 · 1 min · Matěj Černý

Lights, Day/Night cycle, Entities

Multithreaded lights, Inheritance Entity System (maybe will change to ECS in the future)(22_07_2019) Added NBT to save and load entities. (No entity saving yet, though.) Added basic physics system with polygon collision detection. In the pic: The first entity after Player was (who would have guessed…) TNT! In the pic: red Zombie attacks black Player. (and then mysteriously disappears up in the sky) Smooth wallLight vs edgy blockLight, Day/Night cycle (12_08_2019) Added dynamically created TextureAtlas. Added painting and multiblock structure support. Oh, shoot!

August 12, 2019 · 1 min · Matěj Černý

The Great Start

Pictured changelog Basic tile render (03_05_2019) Corner tile render (06_05_2019) Lighting prototype with water-spill-algorithm (18_05_2019) Platforms, grass, sky (20_05_2019) Blocks, Walls, Background (26_05_2019) Colorful block corners, glass, procedural chunk generation (14_06_2019) Dynamic and Cached monochromatic lighting system (19_06_2019) Cached lighting is only calculated onBlockChange

June 19, 2019 · 1 min · Matěj Černý