Files
m4kc/README.md
T

69 lines
2.6 KiB
Markdown
Raw Normal View History

2021-05-07 23:34:55 -04:00
# M4KC
2021-05-07 23:44:27 -04:00
![Grass block icon](icons/icon.png)
2021-05-07 23:44:27 -04:00
*Minecraft 4K - C Rewrite - KolibriOS*
2021-05-07 23:34:55 -04:00
## Notation
2021-05-07 23:34:55 -04:00
This is a port of **M4KC** game from **sashakoshka** for KolibriOS.
2021-05-07 23:34:55 -04:00
More info and Linux/Windows versions can be found in [original repo](https://github.com/sashakoshka/m4kc/).
2021-05-07 23:34:55 -04:00
2021-05-07 23:48:22 -04:00
## Dependencies
2021-05-07 23:34:55 -04:00
2025-03-24 09:40:41 +01:00
* KolibriOS [GCC Toolchain](https://git.kolibrios.org/Egor00f/kolibrios-gcc-toolchain)
* KolibriOS [SDK Folder](https://git.kolibrios.org/KolibriOS/kolibrios/src/branch/main/contrib)
* KolibriOS [SDL2 Library](https://git.kolibrios.org/KolibriOS/SDL2)
## Build instructions
2025-03-24 09:40:41 +01:00
1. Put SDL2 soruce code inside your SDK folder, like this:
```text
/contrib/sdk/sources/SDL2
```
2025-03-24 09:40:41 +01:00
2. Run `make` inside this folder, to build SDL2 for KolibriOS
3. Put M4KC source code into your SDK folder, like this:
2025-03-24 09:40:41 +01:00
```text
/contrib/sdk/sources/m4kc
```
2021-05-07 23:34:55 -04:00
2025-03-24 09:40:41 +01:00
4. Build it using provided xmake.lua:
2021-05-07 23:38:47 -04:00
2025-03-24 09:40:41 +01:00
```text
xmake build m4kc-kolibri
```
Or use your preferred build system.
2021-05-12 15:27:15 -04:00
## FAQ
I've either been asked these, or I expect to be at some point.
> What's with the cryptic variable names like `f22` and `i6`?
2022-07-17 19:17:18 -04:00
A lot of this code is decompiled from the original java version, and those are names the decompiler assigned to the variables. Much of the code is extremely obfuscated due to what are probably compiler optimizations, and some variables have not been deciphered and renamed yet. This is why they mostly appear in the `gameLoop` function.
2021-05-12 15:27:15 -04:00
> Why is it so slow?
The game uses a 3D voxel raycaster to render things, which is a lot slower than more traditional methods of rendering. Luckily, C provides more powerful ways to optimize something like this than Java - and optimizations will keep coming.
2022-04-14 01:03:46 -04:00
2022-05-08 01:42:46 -04:00
> Will you add in \_\_\_\_\_ from Minecraft?
I plan to port over a lot of user interface features, controls, and gameplay mechanics from the official game. However, this game will be taken in its own direction content-wise. For example, crafting will be a part of the game eventually, but creepers will not. New features will be added if they fit with the aesthetic and feel of the game, and make sense from a technichal and gameplay perspective.
2025-03-24 09:40:41 +01:00
> Where does it put saves in KolibriOS
Game will save it's data into same folder as executable, if placed on disk with write support. Otherwise, all data will be saved into `/tmp0/1/m4kc`.
2022-04-14 01:03:46 -04:00
## Screenshots
What this actually looks like.
<img alt="Main menu" src="screenshots/0.png" width="100%">
<img alt="Cool house" src="screenshots/1.bmp" width="100%">
<img alt="World selection" src="screenshots/2.png" width="100%">
<img alt="Rolling hills" src="screenshots/3.bmp" width="100%">
<img alt="A beach" src="screenshots/4.bmp" width="100%">