FlatCraft
- 23 Devlogs
- 113 Total hours
dig make https://flatcraft.blxm.me ROADMAP:https://github.com/users/BlxCode/projects/5
dig make https://flatcraft.blxm.me ROADMAP:https://github.com/users/BlxCode/projects/5
this will be my last ever devlog!
It works like this:
Seeds are not that important, though they do play a part for terrain generation.
The terrain is basically just a huge array with preset Y levels depending on the terrain type, ie: mountianus, hilly, flat.
Ores are truly random. It dosn’t depend on the seed.
Trees are also truly random
Double press the key in the direction you want to go to sprint
that’s it! plz rate it well 
Honsetly, school has been removing litterally half of the day I would have used to do flatcraft, so… yeah. im also writing this at school cuz i needed to sleep. dont tell anyone lol
It’s quite simple actually. Just saving an object with some world data to local storage. Honestly, that’s it.
flower. very cool
Terrain generation, no ore generation lol
it’s like 2:30 on a friday. not bad, but considering school is back, not good either. Honestly, i swear Idk if i can actually finish this before sep 20th, so if i can’t i’ll actually do 100 pushups. and it WILL be on a devlog. so uhh… yeh. idk why but you can see me do 100 pushups.
defenatly not in a row tho my arms are actually twigs bro. ok enough yapping, let’s actually get into this.
tools. the final implementaiton was quite simple actually. I just added tools to the textures, and added them to the metadata, added a few bits of code for the speeding up of breaking blocks and boom! tools.
i’ve been slacking off recently, and I mean it. I’ve coded less, and played more games due to the uhhh looming school season starting again but like… i’ve still managed to make things like lighting, dropping stuff, and shuffeling stuff in ur inventory by using the number keys.
At first, this was one of the reasons why I decided to switch to little js, but like their system is not designed for 2d minecraft use, so I had to improvise. The lighting system consists of two basic things. One is the ambient lighting, which basically fills the whole screen with light / filling the whole screen without light, and the second thing is like “light objects” by that, I mean like point lights, which are like round lightbulbs per say, and they emit light. Those would be used for stuff like torches.
Dropping things with q didn’t exist in the 2 part drops update, cuz i was too lazy to implement that. But now, I added that. It’s simple really, it just creates a new droppped item every time u press q. and if u press q with control, then it drops everything in the hotbar slot hovered, and u can drop things in ur inven by hovering over it.
I added that cuz im just used to that in uhhh…. bloxd.io so yeah, i just added that.
press mouse button 0 to attack. currently just attack animation for now
Uhhhh it’s in the title… nothing interesting.
https://github.com/users/BlxCode/projects/5
custom skins.
How it works:
Ok so i’ve basically just coded the inventory system. uhhh
Ok so this is how it works:
Uhhh… place blocks
and it also checks if the block u placed collides with any blocks or players and if it is next to a block
Dont mind the fact that the game bugged out… it’s cuz i forgot to add metadata to the pine logs and rickroll block thingy
Last devlog, I finished the drop part of drops! This time, I finished the pickup part of drops, and the hold part, though I feel like I do need to tweak the values, I just don’t know by how much.
The pickup part of drops is basically just an if statement that runs like every frame to see whether or not the player is near enough to a dropped item for them to pick it up. It’s quite simple.
I feel like I finished the hotbar, not the inventory system yet, just the hotbar. I finished the “rendering” part, by that I mean like viewing the inventory object and rendering the stuff that is on the hotbar.
Drops! Though… you can’t pick them up yet… uhhh, and I’m nearing the 10-hour mark, so… yeah. I also completely rewrote the movement code and tweaked the values in collision detection, so that’s like half of the time. Also, it turns out I am not an engineer, as I rewrote my own drops code TWICE in the span of TWO HOURS because of chatgippity roasting me and me roasting myself, respectively. (Also, new dev log format, yay!)
Drops were annoying to implement, partially because I’m a skill issue, and also because I had to learn new things like making classes and stuff like that.
The old system was weird and also sometimes inconsistent, so I rewrote the movement system and tweaked the collision system.
Overall, a bit of a smaller update if you ask me, and its ONE AND ONLY FEATURE wasn’t complete. Oh well… looks like we’re going to get the next dev log soon.
half of the time was spent fixing bugs
uhh… ignore that youtube video…
Players are finally out. After what? 2 progress updates? Wow, that was harder than I imagined. Especially the physics. I had to think creatively and outside of the box for this. Also, this devlog continues from the last one. Just pretend that the progress updates like didn’t exist or just aren’t canon.
ps. if you are wondering why the screen recording has some static noise, it’s because i have a small desktop fan running like really close, because it’s kinda hot indoors. I don’t know why it’s making tha t sound, it dosnt make that sound irl to be clear. I think it’s because i accidently turned on my mic and my mic is currently my crappy very quiet laptop mic
I’m too stupid to do physics. I should have made everything with Box2D. I’m currently fiddling with side collisions, as all other collisions (I hope) are done. I’ve also finished jumping and falling physics. Also, I’ve spent another 8 hours, and I want every minute to be for my new 3d printer.
My Jumping physics thingy is like the poor and stupid man’s way to do it, but hey… at least it works. It kinda just has a jump multiplyer and it goes down every frame and every frame the player goes up something like 0.05 block units multiplied by the jump multiplier
Falling is basically the same as the jumping one.
yes, its a sky :D only a gradient. ill add sun and moon soon prob hopefully idk if there will be night, idk if i can create a night in time.
This is stupidlly harder cuz my blocks’ x center is at 0, not 0.5. this means that a block spans from like -0.5 to 0.5. My brain cant handle this… thing.
Why, you may ask, do I do progress updates? It’s because only 10 hours MAX can be logged per dev log, and uhh… I think you get the picture. So, without further adieu, this is what I’ve been working on.
That’s a huge jump from the last time I’ve updated you on the progress on players. Now the thing is, physics is annoying. And I’m not old enough to study calculus at my high school. Which is a shame, as I really like the idea of calculating values based off of differentiating values. I’ve literally just been playing around with the physics at 3 am!??!? Wow! It’s literally 3:30 in the morning. I should go get some sleep. The jumping and crouching are a bit finicky, but I’ll fix them sometime later.
First of all, a lot of the 10 hours in this progress update have been miscellaneous things like bug fixes or just general tweaks. I’ve also been realizing that this project is big. But the end of the tunnel is still nowhere in sight. Yet, if I can stop sitting around and start sprinting towards, uhh… any direction, there will be light at the end of the tunnel. I hope I can finish this project before school starts. I’ll have to grind like a lot, and especially at night because my siblings are quite brain-rotted, annoying, and loud.
After a lot of time getting the back-end setup (with some help from ChatGPT, I’d have to admit), custom skins are here! (Granted… players aren’t here yet so you can’t really try them out lol.)
I have been grinding this, and I haven’t posted a dev log in a while because I haven’t really finished anything, so this will be a progress report.
The old textures suck, because in between blocks there would be like a small section where there is like no detail, so I added those details and recolored the grass bit of the grass texture because the old one was too “limy.”
Self-explanatory; no interesting thing happened that I would want to yap about
Last devlog, I ported my rendering side of the game to LittleJS, a browser game engine. Why? Because I realized that I wouldn’t have the time and effort to manually do advanced stuff like lighting and particles. Hence, I ported to LittleJS. Now, in the days after the port, I had to fix a lot of things and bugs. Originally, the game would render everything, even if it wasn’t on screen, so I fixed that. I made it so that if you couldn’t see the blocks in the camera, they wouldn’t be rendered.
I decided that tinkering with sandbox mode first would be stupid, as I would still have to make players, inventory system, etc. I feel like I’ve finished everything, but there is something missing. The sky. I still need to make the sky. I don’t know if it should be an image or something else.
All I have done for players is literally a goffy ahh skin (which I should make better) and a player variable. I think you would be able to piece together what I want for this.
I want to make custom skins. I have completed the UI, the security part of the server-side (aka my old broken ahh Chromebook) code, and a simple UI for it. All I need to make now is server-side code to store the custom skin and deliver it to the client.
Yes, this doesn’t look like much, but it took 5 hours over the span of multiple days and a LOT of trial and error to get to this point! I had to learn so many things, like Promises, async and await, how to make new classes, and LittleJS. But why? Why go through so much trouble? That’s because I’ve realized that I would not, in my current state, be capable of making a full Minecraft clone using only the vanilla HTML Canvas. I chose littleJS because of the promise of fast and lean, and I had already tried it before but failed; I wanted to redeem myself.
(NEXT UPDATE: Create worlds from seeds 😭 i need help with this)
This is a BIG UI update, and in the next update I’ll add scripting to most of the world menu UI, which has not yet been scripted.
Added a loading screen which goes to 90% and then waits for the CrazyGames SDK.
Removed all NPM dependancies and replaced them with CDNs
Added a squeeze in animation when closing Loading screen and Main Menu
And much more!
(NEXT UPDATE: Create worlds frm seeds with basic terrein 😭 i need help with this)
The Backdrop Update
main menu, new cursor
re-done block rendering, adding a function instead of just drawing it onto the canvas, added more textures (gems in block form) and redid dirt texture. Also added movement (only canvas movemnt)
maple (oak) trees and fps counter
Inventory UI, Block Creation, some textures