Version for MTEngine 5.2.0. Also improve player and wieldhand textures
@ -1,5 +1,5 @@
|
|||||||
minipeli 0.2.4 by paramat.
|
minipeli 0.2.5 by paramat.
|
||||||
A game for Minetest Engine 5.1.0 and later.
|
A game for Minetest Engine 5.2.0 and later.
|
||||||
See each mod for mod-specific credits and licenses.
|
See each mod for mod-specific credits and licenses.
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ About Minipeli
|
|||||||
This game is intended to be an 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.
|
This game is intended to be an 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.
|
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 the game called 'Minetest Game', which has most content in one large mod called 'default'. It is better to split content into many smaller mods.
|
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 split content into many smaller mods.
|
||||||
|
|
||||||
Because creating animated meshes is difficult, the player model from Minetest Game is used, it seems suitable for many games.
|
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 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.
|
||||||
@ -123,6 +123,7 @@ Minetest Game mods used heavily modified:
|
|||||||
'default' mod:
|
'default' mod:
|
||||||
The minipeli 'gui', 'hand' and 'media' mods are derived from it.
|
The minipeli 'gui', 'hand' and 'media' mods are derived from it.
|
||||||
|
|
||||||
|
|
||||||
'gui' mod contains:
|
'gui' mod contains:
|
||||||
Textures:
|
Textures:
|
||||||
gui_formbg
|
gui_formbg
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
Minipeli mod: gui
|
Minipeli mod: gui
|
||||||
=================
|
=================
|
||||||
See license.txt for license information.
|
|
||||||
Derived by paramat from Minetest Game 'default' mod.
|
Derived by paramat from Minetest Game 'default' mod.
|
||||||
|
|
||||||
Authors of source code
|
Authors of source code
|
||||||
|
@ -6,8 +6,7 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
|
listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF] ]]
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local info = minetest.get_player_information(name)
|
local info = minetest.get_player_information(name)
|
||||||
-- 'info and' is a temporary workaround for an engine bug
|
if info.formspec_version > 1 then
|
||||||
if info and info.formspec_version > 1 then
|
|
||||||
formspec = formspec .. "background9[5,5;1,1;gui_formbg.png;true;10]"
|
formspec = formspec .. "background9[5,5;1,1;gui_formbg.png;true;10]"
|
||||||
else
|
else
|
||||||
formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
|
formspec = formspec .. "background[5,5;1,1;gui_formbg.png;true]"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
Minipeli mod: hand
|
Minipeli mod: hand
|
||||||
==================
|
==================
|
||||||
See license.txt for license information.
|
|
||||||
Derived by paramat from Minetest Game 'default' mod.
|
Derived by paramat from Minetest Game 'default' mod.
|
||||||
|
|
||||||
Authors of source code
|
Authors of source code
|
||||||
|
Before Width: | Height: | Size: 109 B After Width: | Height: | Size: 109 B |
@ -1,5 +1,5 @@
|
|||||||
Minipeli mod: light
|
Minipeli mod: light
|
||||||
===================
|
===================
|
||||||
See license.txt for license information.
|
|
||||||
Source code by paramat (MIT).
|
Source code by paramat (MIT).
|
||||||
Textures by paramat (CC BY-SA 3.0).
|
Textures by paramat (CC BY-SA 3.0).
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
Minipeli mod: mapgen
|
Minipeli mod: mapgen
|
||||||
====================
|
====================
|
||||||
See license.txt for license information.
|
|
||||||
Source code by paramat (MIT).
|
Source code by paramat (MIT).
|
||||||
|
|
||||||
|
Authors of media
|
||||||
|
----------------
|
||||||
All textures by paramat (CC BY-SA 3.0).
|
All textures by paramat (CC BY-SA 3.0).
|
||||||
|
|
||||||
All sounds from Minetest Game:
|
All sounds from Minetest Game 'default' mod:
|
||||||
|
|
||||||
Mito551 (sounds) (CC BY-SA 3.0):
|
Mito551 (sounds) (CC BY-SA 3.0):
|
||||||
dig_cracky.ogg
|
dig_cracky.ogg
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
Minipeli mod: media
|
Minipeli mod: media
|
||||||
===================
|
===================
|
||||||
See license.txt for license information.
|
|
||||||
Derived by paramat from Minetest Game 'default' mod.
|
|
||||||
|
|
||||||
Authors of media
|
Authors of media
|
||||||
----------------
|
----------------
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
Minipeli mod: player_api
|
Minipeli mod: player_api
|
||||||
========================
|
========================
|
||||||
See license.txt for license information.
|
|
||||||
Derived by paramat from Minetest Game 'player_api' mod.
|
Derived by paramat from Minetest Game 'player_api' mod.
|
||||||
|
|
||||||
Provides an API to allow multiple mods to set player models and textures.
|
Provides an API to allow multiple mods to set player models and textures.
|
||||||
|
@ -96,6 +96,15 @@ end)
|
|||||||
local player_set_animation = player_api.set_animation
|
local player_set_animation = player_api.set_animation
|
||||||
local player_attached = player_api.player_attached
|
local player_attached = player_api.player_attached
|
||||||
|
|
||||||
|
-- Prevent knockback for attached players
|
||||||
|
local old_calculate_knockback = minetest.calculate_knockback
|
||||||
|
function minetest.calculate_knockback(player, ...)
|
||||||
|
if player_attached[player:get_player_name()] then
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
return old_calculate_knockback(player, ...)
|
||||||
|
end
|
||||||
|
|
||||||
-- Check each player and apply animations
|
-- Check each player and apply animations
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
@ -104,14 +113,8 @@ minetest.register_globalstep(function(dtime)
|
|||||||
local model = model_name and models[model_name]
|
local model = model_name and models[model_name]
|
||||||
if model and not player_attached[name] then
|
if model and not player_attached[name] then
|
||||||
local controls = player:get_player_control()
|
local controls = player:get_player_control()
|
||||||
local walking = false
|
|
||||||
local animation_speed_mod = model.animation_speed or 30
|
local animation_speed_mod = model.animation_speed or 30
|
||||||
|
|
||||||
-- Determine if the player is walking
|
|
||||||
if controls.up or controls.down or controls.left or controls.right then
|
|
||||||
walking = true
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Determine if the player is sneaking, and reduce animation speed if so
|
-- Determine if the player is sneaking, and reduce animation speed if so
|
||||||
if controls.sneak then
|
if controls.sneak then
|
||||||
animation_speed_mod = animation_speed_mod / 2
|
animation_speed_mod = animation_speed_mod / 2
|
||||||
@ -120,18 +123,19 @@ minetest.register_globalstep(function(dtime)
|
|||||||
-- Apply animations based on what the player is doing
|
-- Apply animations based on what the player is doing
|
||||||
if player:get_hp() == 0 then
|
if player:get_hp() == 0 then
|
||||||
player_set_animation(player, "lay")
|
player_set_animation(player, "lay")
|
||||||
elseif walking then
|
-- Determine if the player is walking
|
||||||
|
elseif controls.up or controls.down or controls.left or controls.right then
|
||||||
if player_sneak[name] ~= controls.sneak then
|
if player_sneak[name] ~= controls.sneak then
|
||||||
player_anim[name] = nil
|
player_anim[name] = nil
|
||||||
player_sneak[name] = controls.sneak
|
player_sneak[name] = controls.sneak
|
||||||
end
|
end
|
||||||
if controls.LMB then
|
if controls.LMB or controls.RMB then
|
||||||
player_set_animation(player, "walk_mine", animation_speed_mod)
|
player_set_animation(player, "walk_mine", animation_speed_mod)
|
||||||
else
|
else
|
||||||
player_set_animation(player, "walk", animation_speed_mod)
|
player_set_animation(player, "walk", animation_speed_mod)
|
||||||
end
|
end
|
||||||
elseif controls.LMB then
|
elseif controls.LMB or controls.RMB then
|
||||||
player_set_animation(player, "mine")
|
player_set_animation(player, "mine", animation_speed_mod)
|
||||||
else
|
else
|
||||||
player_set_animation(player, "stand", animation_speed_mod)
|
player_set_animation(player, "stand", animation_speed_mod)
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 217 B |
Before Width: | Height: | Size: 163 B After Width: | Height: | Size: 160 B |
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |