3eldu / bamboo Goto Github PK
View Code? Open in Web Editor NEWminecraft-like topdown sandbox
minecraft-like topdown sandbox
On world generation, with a small chance, one of few flowers can turn into berry bush. There would be no more than 1 naturally generated berry bush on chunk.
A player though, can plant as many berry bushes as he want on one chunk.
Berry bush has a capacity of four berries. Going from an empty bush, it slowly grows berries one by one, until it grows four berries, then it stops. A bush has natural limit of growing 64 berries, after which it dries up, and needs to be watered using a funnel. If the berry bush neighbors with a water block, it doesn't require manual watering.
On a campfire, you can gather seeds from a berry, which could be planted into a bush.
Crafting system. When player stands to some blocks (campfire, for example), more crafts become available.
Craftng menu can be opened by pressing Enter
.
Entities are aligned to the pixel grid, unlike blocks. They are also drawn on top of the block grid. They support all the features that blocks do, like interactivity, breaking, with some exclusive features. Entities can be larger than one block in size. Entities support per-pixel AABB collision.
When a player holds an interactive item, that does something to a block, show a visual outline around the block being interacted.
There would me multiple cave levels, each "deper" than previous one. Each level will be slightly smaller in size, will contain rarer ores, and will be more dangerous than previous one, resulting in a total of 4 levels.
To enter a "deeper" level, you'll need to find an entrance to it, which will be hidden behind a wall.
Widgets were there from the day 1st, but now they're practically useless, used only once in the whole game: for displaying FPS/TPS.
This can be easily replaced by directly drawing text on the screen.
For more advanced use cases, there's a whole UI library, which is tweakable and customizable.
Each item has a different weight, and a player can hold only a limited weight. Some items weigh much more, and some much less.
For example, player can hold a lot of sticks, since they are very lightweight, but only one log, since it is very heavy.
Player speed also varies with how much weight the player carries.
Generating chunks from scratch is actually much faster, than loading them from disk.
I suspect, gob
encoding is core of the problem.
We could try implementing our own encoding method, or using an existing one ( NBT, as an example )
component := ui.HStack() // Horizontal stack
.Gap(5.0) // Gap between children
.Padding(1.0)
.AddChild(
ui.Image(some_image)
.Size(24.0, 24.0)
.Build()
)
.AddChild(
ui.VStack() // Vertical stack
.AddChild(ui.Heading("Craft something").Build())
.AddChild(ui.Paragraph("lorem ipsum dolor sit amet...").Build())
.Build()
)
.Build()
ui.Stack
. If we just want to create a horizontal stack, it get's really cumbersome: ui.Stack(ui.StackOptions{Direction: ui.HorizontalStack}, children)
ui.HStack() // H stands for horizontal
.addChildren(children)
.build()
Writing each method call on each line is optional, of course. If the code is small enough to fit on one line, writing everything on one line would be fine: ui.HStack().addChildren(children).build()
.
.padding()
, or .margin()
, you get the point.Can be used to water a berry bush (and other plants in future).
Made from clay on a campfire.
Add a "looking glass" button, with which you can point at any block in the world, and it will show help and description on it. Those tooltips should help new players, but they shouldn't spoiler everything right away. A player still should think for himself.
Example: You hover over sand with stones
Tooltip: Wonder what these stones are? Try to pick them up.
A player will try to interact with the block, and thus, will discover new materials and game mechanics.
Yeah, inventory is pretty bad as of now. The most logical "expansion" of inventory I can think of are backpacks, and other bags.
Also I should probably fix bugs related to inventory, as there are a lot of them.
Drops from short & tall grass with 5% chance, or with 100% chance from pine tree in quantities from 1 to 2.
Can be planted in grass block, slowly grows through multiple stages until finally grows to a full tree.
Besides colored text, add visual effects to the text like:
Can be found on sand, and used to craft various tools and instruments on a campfire.
By placing a few sticks on the ground, and using flint on them, you can light a campfire.
A campfire has a limited burning energy, and needs to be refueled with flammable items like sticks, wood, etc.
Title speaks for itself.
Show a background with horizontally scrolling world, dimmed, so it won't be too bright.
Not yet sure how to reproduce this, but I just saw this happening.
When hovering over items in inventory, show a tooltip with their name, description, etc. which will be unique for each item
After window was resized to fullscreen, buttons in pause menu aren't clickable.
Sometimes if window is not maximized and several clicks were done - button works.
Move block type enumeration and function declarations (NewBlock, NewGrassBlock, etc.) to types
package, while the actual implementation will be 'injected' from the implementation package.
Thus, we will avoid import cycles, and make the architecture more flexible.
As of now, inventory isn't saved like world is, and when world reloads, all items are lost.
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.