[Game] 'minipeli', a game minimal requirements example

Post Reply
User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

[Game] 'minipeli', a game minimal requirements example

by paramat » Post

Image

Download link https://github.com/paramat/minipeli/archive/master.zip
View code https://github.com/paramat/minipeli

Most of the contained mods are derived from Minetest Game mods. The rest are created by me.
Minetest Game forum thread viewtopic.php?t=9724
Minetest Game repository https://github.com/minetest/minetest_game

The intention of Minipeli
-------------------------
The intention of this game is to provide one example of minimal requirements for a MT game.

There have been several requests in the forum for examples of minimal requirements, to help with creating new games.
Also, recently i have become increasingly interested in creating new games, and became interested in what the minimal requirements are, as well as what would be a good mod structure.

I write 'one example of minimal requirements' because minimal requirements vary according to what is supported and included.

I have orientated this game towards what seems the most common desired content:
* The 3D player model from Minetest Game.
* Support for all non-V6 mapgens, and their features such as dungeons, cave liquids and the sloping rivers of some mapgens.
* Loosely realistic Earth-type biomes that vary suitably with altitude, including dry land, sloping rivers with river water, beaches, seas, sandy seabed, water-flooded caves and magma deep underground.

How to use this game
--------------------
To clarify, the intention here is to help others and myself create 'entirely new games' that make a clean and much needed break from 'Minetest Game based mods and games'. This is not a game base to add unaltered Minetest Game based mods to, most will not work and will need alteration.

The content of this game is meant to be altered and edited. The textures are simple because they will very probably be replaced. The registered biomes are only an example of one vertical 'biome stack' with a particular heat/humidity point, more biome stacks with differing heat/humidity points will very probably be desired.

Alternatively, this game can simply act as example reference material to help someone create a new game.


The rest of this post is the game README.txt file:


minipeli 0.2.6 by paramat.
A game for Minetest Engine 5.2.0 and later.


Authors of media
----------------
paramat (CC BY-SA 3.0):
header.png
icon.png
screenshot.png


About Minipeli
--------------
'Peli' is the Finnish word for 'game'.

This game is intended to be one example of minimal requirements for a Minetest Engine game, while still supporting all non-Mapgen V6 mapgens and providing a minimal number of biomes with appropriate vertical variation.
The intention is to help others and myself create completely new games.

This also suggests a good mod structure, as opposed to the problematic structure of Minetest Game, which has most content in one large mod. It is better to divide content into several mods that correspond to the distinct elements of the game.

Because creating animated meshes is difficult, the player model from Minetest Game is used, it seems suitable for many games.
The player API of Minetest Game is very useful and quite fundamental, so the 'player_api' mod from Minetest Game is included, but with new player textures.

The 'light' mod is only provided to illuminate caves and dungeons during testing.


Why Mapgen V6 is not supported
------------------------------

In the 'game.conf' file, mapgen v6 is set as a disallowed mapgen.
Mapgen V6 is very different to all the other mapgens, it has hardcoded biomes and does not use the Biome API. Due to this it makes game code far more complex and more difficult to maintain, the mapgen also misses many features.
I recommended that games do not support Mapgen V6 for these reasons.
This document is written assuming Mapgen V6 is not supported.


The mods and their functions
----------------------------

'player_api'
A mod from Minetest Game, mostly unmodified, but new player textures are used.
Provides an API to support multiple registered player models and to set the player model, player textures or a particular player animation.
Provides an animated player model and skin texture.
Sets suitable animations according to control inputs and player health.

'gui'
Contains formspec and HUD related stuff:
Formspec background, bubble and heart textures.
Sets the formspec prepend.

'hand'
Contains the hand related stuff:
The wieldhand texture.
Registers the hand.

'creative_mode'
Activates in creative mode.
A simple creative mod without a creative inventory.
Overrides the hand registration for special digging capabilities.
Enables placing unlimited nodes without removing from inventory.
Prevents dug nodes being added to inventory if already present.

'media'
Contains textures and sounds that have no suitable location anywhere else:
The node-digging progress texture 'crack_anylength'.
The 'player_damage' sound.

'mapgen'
Contains the mapgen related stuff:
Terrain, water, cave liquid and dungeon nodes, their textures and sounds.
Mapgen aliases to tell the engine mapgens which nodes to use.
Biome registrations for one vertical stack of biomes.

'light'
Only included to provide illumination for testing.
Gives 64 lights to a new player.


Mapgen aliases
--------------

Since MT 5.0.0, dungeon nodes and cave liquids are defined in biome definitions, so now only 3 mapgen aliases need to be registered: stone, water, river water.


Biomes
------

This game registers a single 'biome stack': A set of vertically stacked biomes all with the same heat and humidity points.
A more developed game would usually add extra biome stacks at differing heat and humidity points.

The 'grassland' biome stack in this game consists of:

"grassland":
Dry land of dirt with a grass surface layer.
Extends from beach top up to world top.
Any flooded caves contain water.

"grassland_sea":
With the sand of beaches, lakebeds and seabeds.
Extends from beach top down to y = -127 to contain most sea depths.
Sand may occasionally appear in caves due to how mapgen works.
Any flooded caves contain water.

"grassland_under":
Meaning 'underground'.
Stone only, below most sea depths.
Extends from y = -128 down to y = -1023.
Any flooded caves contain water.

"grassland_deep":
Meaning 'deep underground'.
Stone only.
Extends from y = -1024 down to world base.
The depth where magma appears, any flooded caves can contain water or magma.


How this game was created
-------------------------

Minetest Game mods used slightly modified:

'player_api' mod:
Use new player textures, update credits and licence.
Delete unnecessary mod.conf file.


Minetest Game mods used heavily modified:

'default' mod:
The minipeli 'gui', 'hand' and 'media' mods are derived from it.
'creative' mod:
The minipeli 'creative_mode' mod is derived from it.


'gui' mod contains:
Textures:
gui_formbg.png
bubble.png
heart.png
init.lua:
minetest.register_on_joinplayer to set the formspec prepend.

'hand' mod contains:
Textures:
wieldhand.png
init.lua:
minetest.register_item to register the hand.

'media' mod contains:
Textures:
crack_anylength.png
Sounds:
player_damage.ogg
init.lua:
Required but empty.

'creative_mode' mod contains:
init.lua:
minetest.override_item() to override the hand.
minetest.register_on_placenode() for placing unlimited nodes without removing from inventory.
Redefinition of minetest.handle_node_drops() to prevent dug nodes being added to inventory if already present.
Creative inventory and per-player creative mode are not included for simplicity.
Players can use chat command '/giveme' to obtain nodes they want to place, and can drop an inventory itemstack to clear space in inventory.
Attachments
screenshot_20200217_212857.png
screenshot_20200217_212857.png (196.87 KiB) Viewed 3331 times
Last edited by paramat on Sat Aug 29, 2020 20:23, edited 5 times in total.

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Game] minipeli

by twoelk » Post

uhm, very basic :o

seems all my flora and fauna mods I have installed depend on default in some way or other
interesting
I don't quite understand the need for the own character texture though.

oops, some of my own mods have dependencies I hadn't noticed before
interesting indeed

so this is not about collecting some other people's mods and calling it "the game I made"
this is really a basis you would have to actually add own creative work to get a game.
interesting

just to push future users of this basis into the right direction maybe adding a basic ingame help/information system right from the start might be an idea

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] minipeli

by paramat » Post

twoelk,
EDIT: Sorry, i think i misunderstood what you meant. But anyway, i prefer to not add an in-game help/information system.
Last edited by paramat on Thu Feb 20, 2020 02:12, edited 1 time in total.

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Game] minipeli

by Linuxdirk » Post

So you unpublish the Mount Meru mod because of this? :(

Good concept, though.
Last edited by Linuxdirk on Wed Feb 19, 2020 10:53, edited 1 time in total.

User avatar
firefox
Member
Posts: 1709
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: [Game] minipeli

by firefox » Post

great! exactly what i needed (i guess)
✨🏳️‍🌈♣️✨

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] 'minipeli', a game minimal requirements example

by paramat » Post

I have added new text to the first post to clarify some stuff. See the sections titled 'The intention of Minipeli' and 'How to use this game'.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] 'minipeli', a game minimal requirements example

by paramat » Post

New version released for use with MTEngine 5.2.0.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Game] 'minipeli', a game minimal requirements example

by Napiophelios » Post

I been adding trees and plants to my copy,
was wondering how to add a plant that will generate with the papyrus
but not collide with it?

I copy papyrus from MTG default mapgen for the new plant as well as payrus;
but my new cat tail plants sometimes 'over write' the payrus and leave them floating above new plant.

Ultimately, I want them to look mingled.
Right now they look just side by side when generated
or a row of one in front of the other.

I tried using different 'spawn' surfaces but they look even more seperated.

Image
screenshot.png
screenshot.png (393.51 KiB) Viewed 3331 times

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] 'minipeli', a game minimal requirements example

by paramat » Post

> my new cat tail plants sometimes 'over write' the payrus and leave them floating above new plant.

The order of decoration registration determines the order of generation.
Swapping the order of generation should fix the problem.
The order of MTG decorations is carefully chosen to avoid this problem: Trees and multinode decorations come first.

Good to see you using this game =)

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Game] 'minipeli', a game minimal requirements example

by Napiophelios » Post

paramat wrote:
Wed May 20, 2020 01:11
Good to see you using this game =)
It's been a nice starting point for building a game.
I think I am getting carried away with all the different trees tho.
Image
screenshot_20200521.png
screenshot_20200521.png (780.99 KiB) Viewed 3331 times

thanks for the tip, my plants are generating correctly now.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Game] 'minipeli', a game minimal requirements example

by Sokomine » Post

Napiophelius wrote: It's been a nice starting point for building a game.
I think I am getting carried away with all the different trees tho.
Trees are good :-) Glad they're growing in your game. Reminds me that I ought to maintain and update my trees_lib mod eventually...so much is common for all trees...

The plants also look nice (from existing mods?).
A list of my mods can be found here.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Game] 'minipeli', a game minimal requirements example

by Napiophelios » Post

Sokomine wrote:
Tue Jun 02, 2020 12:34
Napiophelius wrote: It's been a nice starting point for building a game.
I think I am getting carried away with all the different trees tho.
Trees are good :-) Glad they're growing in your game. Reminds me that I ought to maintain and update my trees_lib mod eventually...so much is common for all trees...

The plants also look nice (from existing mods?).
Thanks.
I included most of plants and trees from MTG, plus added some.
I made schematics for all the trees from the old Forest mod by Gael De Sailly

I use your "lakes' mod in the game and the cat tail plant was made specifically for that :)
the ponds look nice with lots of tall grass and papyrus.

User avatar
firefox
Member
Posts: 1709
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: [Game] 'minipeli', a game minimal requirements example

by firefox » Post

starting a world with Minipeli (or a game based on it) in creative mod makes no difference.
i guess i need to include the "creative" mod from MTG, but it depends on "default" and i have no idea why...

how can i get the creative inventory into Minipeli?
✨🏳️‍🌈♣️✨

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Game] 'minipeli', a game minimal requirements example

by Linuxdirk » Post

firefox wrote:
Tue Aug 11, 2020 15:06
how can i get the creative inventory into Minipeli?
The cleanest solution would be writing one by yourself.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] 'minipeli', a game minimal requirements example

by paramat » Post

firefox,
minipeli used to contain a slightly edited MTG 'creative' mod (plus MTG 'sfinv' mod on which it depends).
See the code at this point in history https://github.com/paramat/minipeli/tre ... 37d7d0de67

However that does add a lot of complexity, some of which may be unnecessary.
I did not attempt to rewrite and simplify 'creative', it would be best to do that.

User avatar
firefox
Member
Posts: 1709
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox
Location: Xanadu

Re: [Game] 'minipeli', a game minimal requirements example

by firefox » Post

paramat wrote:
Fri Aug 14, 2020 16:49
firefox,
minipeli used to contain a slightly edited MTG 'creative' mod (plus MTG 'sfinv' mod on which it depends).
See the code at this point in history https://github.com/paramat/minipeli/tre ... 37d7d0de67

However that does add a lot of complexity, some of which may be unnecessary.
I did not attempt to rewrite and simplify 'creative', it would be best to do that.
my problem was that "creative mode" is activated via the main menu when selecting worlds, but there seems to be no creative mode and it's just a button for MTG's creative mod.

but now i found a solution to get MTG's creative mode working in my game.
using MTG, Minipeli and an old backup of my previous game attempt, i made a new base similar to how Minipeli was created from MTG. (i couldn't continue with Minipeli as it was, because the mod structure didn't fit with what i want)

basically it's an empty MTG in which i removed every game content and only left the player and inventory mods.
i couldn't break up the default mod, so i gave it a new purpose. "default" now contains the formspec, hudbar, sun and moon textures, as well as all sound tables and some functions not related to specific nodes.
this means all mods will depend on "default" for sounds, but there's no unnecessary baggage and i don't have to define node sounds in every single mod.
✨🏳️‍🌈♣️✨

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [Game] 'minipeli', a game minimal requirements example

by paramat » Post

Minipeli 0.2.6 released.

First post updated with new README text.
Commit message of latest commit:
'Add screenshot and description. 'gui' mod: Use own textures, remove 9-slice formspec prepend option, remove custom hotbar textures code. Add simple 'creative_mode' mod with no creative inventory'

firefox, your posts got me thinking, and i decided to add a simple 'creative_mode' mod:

Activates in creative mode.
A simple creative mod without a creative inventory.
Overrides the hand registration for special digging capabilities.
Enables placing unlimited nodes without removing from inventory.
Prevents dug nodes being added to inventory if already present.
Creative inventory and per-player creative mode are not included for simplicity.
Players can use chat command '/giveme' to obtain nodes they want to place, and can drop an inventory itemstack to clear space in inventory.

I have always wanted to avoid the complexity of the MTG creative inventory, which would also require the MTG sfinv mod. But i think it is desirable to have at least some functionality in creative mode. This is a compromise that will show game makers how to get basic creative mode functionality.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Game] 'minipeli', a game minimal requirements example

by sirrobzeroone » Post

I know not really designed as a playable game, but I've been using minipeli as a test bed for de-integrating with MTG which its great for, so thank you Paramat :)

I did find the brown default dirt a little on the blackside and shifted it lighter a few brown tones (probably indicates i've spent way too long hanging around in game), attached a copy all yours to use or not paramat. pick whatever liscence you like :)

Thanks again.
Attachments
mapgen_dirt.png
mapgen_dirt.png (5.36 KiB) Viewed 3331 times

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests