getting started
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
getting started
Hi,
i just installed luanti yesterday, tryed little things just to see if it was working and now i'm wondering how i should start my project.
Basically, i want to use luanti for the game's world and then make my own gameplay around it.
I didn't search nor read much yet but i found that : https://api.minetest.net/games/
I'm thinking i should start from scratch.
If you have any good tutos, links, advices, you are welcome; I have a few questions about the engine through.
-Like minecraft, luanti allow a third person camera.
is it easy to change the camera angle and distance? can i do it with mods or do i need to recompile the engine?
-For now i just want to use a flat world and add walls with different designs. I saw some world generator that can generate a world with images like a pixel = a block or something. Any userfriendly stuff like that compatible with luanti that you could advice me?
-What are the limitations for the player character? I mean what are my limitation if i want to replace it with another 3D model or whatever. What is the format used? Can i use another? Is there limitation with the squeleton of the character as well?
How would it impact the perfomance in multiplayer if i would be using character with more polys but maybe with the same collision boxes?
-Could you give me a tutorial for creating my own blocks?
Again, i didn't search much yet but i prefer asking on the forum first so you could maybe lead me in the right direction.
Thanks for your help.
i just installed luanti yesterday, tryed little things just to see if it was working and now i'm wondering how i should start my project.
Basically, i want to use luanti for the game's world and then make my own gameplay around it.
I didn't search nor read much yet but i found that : https://api.minetest.net/games/
I'm thinking i should start from scratch.
If you have any good tutos, links, advices, you are welcome; I have a few questions about the engine through.
-Like minecraft, luanti allow a third person camera.
is it easy to change the camera angle and distance? can i do it with mods or do i need to recompile the engine?
-For now i just want to use a flat world and add walls with different designs. I saw some world generator that can generate a world with images like a pixel = a block or something. Any userfriendly stuff like that compatible with luanti that you could advice me?
-What are the limitations for the player character? I mean what are my limitation if i want to replace it with another 3D model or whatever. What is the format used? Can i use another? Is there limitation with the squeleton of the character as well?
How would it impact the perfomance in multiplayer if i would be using character with more polys but maybe with the same collision boxes?
-Could you give me a tutorial for creating my own blocks?
Again, i didn't search much yet but i prefer asking on the forum first so you could maybe lead me in the right direction.
Thanks for your help.
Re: getting started
These may help you understand things a little easier:
https://minetest.gitlab.io/minetest/
https://github.com/minetest/minetest/bl ... lua_api.md
https://content.luanti.org/packages/?type=game
https://minetest.gitlab.io/minetest/
https://github.com/minetest/minetest/bl ... lua_api.md
https://content.luanti.org/packages/?type=game
- Blockhead
- Moderator
- Posts: 2096
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: getting started
Luanti, as in the very engine itself, needs you to add Lua code and assets to it to make any kind of world. With the right Mapgen Aliases, you can ask it to generate terrain for you (including a flat generator), or you can write your own generation. For an example of the minimum, see Void by Linuxdirk or Minipeli by paramat.psych0mega wrote: ↑Wed Nov 27, 2024 11:29Hi,
i just installed luanti yesterday, tryed little things just to see if it was working and now i'm wondering how i should start my project.
Basically, i want to use luanti for the game's world and then make my own gameplay around it.
I didn't search nor read much yet but i found that : https://api.minetest.net/games/
I'm thinking i should start from scratch.
Instead of going straight to the minimum, I recommend you try some of the top games on ContentDB, to see what's possible and what's been done. Even though you may want to throw a lot of it out, you'll get a sense for what Luanti can do.
Tenplus1 has already mentioned several good links. I will add:psych0mega wrote: ↑Wed Nov 27, 2024 11:29If you have any good tutos, links, advices, you are welcome; I have a few questions about the engine through.
- Rubenwardy's modding book. Use this version, not one on "minetest dot org" (even if it appears in search results, use Ruben's copy instead for the same chapter, because the other one is out of date).
- The Lua 5.1 reference manual. You will want this as a reference while you learn Lua.
- Not just lua_api.md, but the rest of the docs directory.
Like Minecraft, Luanti has the first, "second" (facing at the avatar) and third person cameras. Those 3 cameras are hard coded. You can hack another camera in by creating an entity and attaching the player to the entity, so you could put the camera over to one side of the player or further away.psych0mega wrote: ↑Wed Nov 27, 2024 11:29-Like minecraft, luanti allow a third person camera.
is it easy to change the camera angle and distance? can i do it with mods or do i need to recompile the engine?
You need a game for Luanti with some nodes (what Minecraft calls blocks) before you can just start making a world. You either make that game yourself, or you install a pre-made one. A "game" is a collection of mods, and each mod consists of: Lua code files, textures, 3D models, locale files, audio files, and a few other types. Mods that are added on top of the game can replace mods from the game, or add stuff of their own. Mods are compatible with at least one game, sometimes multiple.psych0mega wrote: ↑Wed Nov 27, 2024 11:29-For now i just want to use a flat world and add walls with different designs. I saw some world generator that can generate a world with images like a pixel = a block or something. Any userfriendly stuff like that compatible with luanti that you could advice me?
Once you have that world, you choose built-in terrain generation ("mapgen") in the menu.
After creating a world with its own mapgen setting, you can enable mods for the world that can override and replace the built-in C++ generators; one of the generators is called "singlenode" which creates an empty world, but singlenode + a mapgen mod is useful for creating worldgens in Lua.
Once you have added a world to the main menu, you can open the world inside of Luanti and play the game, placing nodes in it. You can mod it to add more nodes, and you can use mods like WorldEdit, Edit, Terraform and others to help you place and rearrange the nodes - see the ContentDB category World Maintenance and Tools. Note that this is why I recommend installing a game like Minetest Game (mod soup game) or Mineclonia (Minecraft clone) - you can add some of those mods to it and figure out what they are like, then use them inside of your own game if you make one.
The player by basic engine default is represented by a 2D sprite, like in Devtest. You can replace that with a different sprite by providing a player.png file in a mod or texture pack.psych0mega wrote: ↑Wed Nov 27, 2024 11:29-What are the limitations for the player character? I mean what are my limitation if i want to replace it with another 3D model or whatever. What is the format used? Can i use another? Is there limitation with the squeleton of the character as well?
The player character in a more featureful game is a 3D model with skeletal animation on a single timeline, often made in Blender. I do not think multiple animation actions or animation blending are supported. The supported 3D formats are listed in the docs as: .obj (no animation), .x and .b3d (old formats, kind of hard to export these days) and gltf & glb (newer format, easy to export, but not as well established in Luanti.
You can definitely use a character with more more polygons.psych0mega wrote: ↑Wed Nov 27, 2024 11:29How would it impact the perfomance in multiplayer if i would be using character with more polys but maybe with the same collision boxes?
I gave a link above, "more nodes" :)
It's worth giving an explanation at this point:
- 1 node = the basic unit of the world; a Minecraft "block"
- 16x16x16 nodes = 1 block a.k.a MapBlock; note that this is a cube not a vertical slice like Minecraft. Luanti has much more height and depth, but less width and height: 30912 in every direction.
- 5x5x5 blocks = 1 mapgen chunk. Map generation is done one "chunk" at a time, but the idea of the "chunk" doesn't have relevance after mapgen.
This does help us review what to send to newcomers, and tailor it, but please do search stuff out, try to figure it out a bit, and hopefully come back with some good question :)psych0mega wrote: ↑Wed Nov 27, 2024 11:29Again, i didn't search much yet but i prefer asking on the forum first so you could maybe lead me in the right direction.
Thanks for your help.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
Thanks for the answers.
Yes, i will check all this more deeply, i need to get more familiar with it all.
I was interested in "not actually the bare minimum" as well.
Thanks again.
Yes, i will check all this more deeply, i need to get more familiar with it all.
I was interested in "not actually the bare minimum" as well.
Thanks again.
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
I was able to get started with void and spawnbuilder.
I made my first own node:
does "inderstructible" actually works? if i remove oddly_breakable_by_hand my block is inderstructible since there is no tool in my game but i cannot say more about it.
The first little problem i encountered was the fullscreen, it doesn't work?
If i set fullscreen in the option, luanti don't start at all anymore.
My second problem is about the model of the player.
It's working with blockcolor, custom model and custom animations, but i'm guessing the blender importer doesn't import the animations (nor export them actually) so i'm a bit confuse. i can use blender and animate a biped but if the exporter doesn't work anymore, what's the point? (i'm wondering why it doesn't work anymore, i think i used .x before with irrlicht or something, what happenned that their exporter, no animations anymore? Oo)
and it's as you said about gltf & glb
anyway, i'm actually thinking, what if i just use animated sprite?
is there an example that replace the player green stuff with an animated sprite?
Thanks
I made my first own node:
Code: Select all
print("This file will be run at load time!")
core.register_node("cnode:floor_1", {
description = "floor_1",
tiles = {"cnode_floor_1.png"},
groups = {oddly_breakable_by_hand = 3, cracky = 1}
--groups = {indestructible = 1, cracky = 1}
})
core.register_alias('cfloor_1', 'cnode:floor_1')
The first little problem i encountered was the fullscreen, it doesn't work?
If i set fullscreen in the option, luanti don't start at all anymore.
My second problem is about the model of the player.
It's working with blockcolor, custom model and custom animations, but i'm guessing the blender importer doesn't import the animations (nor export them actually) so i'm a bit confuse. i can use blender and animate a biped but if the exporter doesn't work anymore, what's the point? (i'm wondering why it doesn't work anymore, i think i used .x before with irrlicht or something, what happenned that their exporter, no animations anymore? Oo)
and it's as you said about gltf & glb
anyway, i'm actually thinking, what if i just use animated sprite?
is there an example that replace the player green stuff with an animated sprite?
could you be more specific please? is there any example that does something similar?You can hack another camera in by creating an entity and attaching the player to the entity, so you could put the camera over to one side of the player or further away
Thanks
- Blockhead
- Moderator
- Posts: 2096
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: getting started
No, I have no idea where you got the idea that the indestructible group would do anything, I can't find it in the Lua API docs or in fact any of my mods. It's just that if the hand's capabilities doesn't list a group then it's not breakable with the hand, simple as that.psych0mega wrote: ↑Thu Nov 28, 2024 14:44does "inderstructible" actually works? if i remove oddly_breakable_by_hand my block is inderstructible since there is no tool in my game but i cannot say more about it.
The hand is the empty item name, defined in the "builtin" (Lua) part of the engine, and overrideable (src).
Open Luanti from a terminal and let us know what the error message is, and/or consult debug.txt inside your Luanti directory.psych0mega wrote: ↑Thu Nov 28, 2024 14:44The first little problem i encountered was the fullscreen, it doesn't work?
If i set fullscreen in the option, luanti don't start at all anymore.
The B3D importer loses animation info. Work off .blend files wherever you can; the blockcolor one lives in bc_core/models. I can't really answer every little point in this, I just recommend working with gltf if possible, given the info in the gltf thread, or b3d if that fails.psych0mega wrote: ↑Thu Nov 28, 2024 14:44My second problem is about the model of the player.
It's working with blockcolor, custom model and custom animations, but i'm guessing the blender importer doesn't import the animations (nor export them actually) so i'm a bit confuse. i can use blender and animate a biped but if the exporter doesn't work anymore, what's the point? (i'm wondering why it doesn't work anymore, i think i used .x before with irrlicht or something, what happenned that their exporter, no animations anymore? Oo)
and it's as you said about gltf & glb
Yes, I'm sure I've heard of using animated sprites before. It's an option for entities and for players. However, I can't think of a player example offhand. Looking into the source of player_api from MTG, you will want the visual to be upright_sprite. This is not animated by default, but you can change the visual texture when a player is in motion. player_api would not be suitable to use in your own game for a sprite player though, because that mod is written, changing animation state is only possible for mesh models.psych0mega wrote: ↑Thu Nov 28, 2024 14:44anyway, i'm actually thinking, what if i just use animated sprite?
is there an example that replace the player green stuff with an animated sprite?
In the mod Advtrains attachment offset patch (thread), the player is attached to an entity which is itself attached to the train. The entity attachment changes the reference point for the player's camera. I can't say much more as I haven't understood the intricacies myself.psych0mega wrote: ↑Thu Nov 28, 2024 14:44could you be more specific please? is there any example that does something similar?You can hack another camera in by creating an entity and attaching the player to the entity, so you could put the camera over to one side of the player or further away
P.S. my tip for how I do quotes is to use the quote button, and just paste everything between [] in the open quote several times. When that info is filled out, the little up arrow links back to the original post.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
I just saw that in a mod's source but maybe the modder implemented the group somewhere else in the code, didn't really checked. ^^;No, I have no idea where you got the idea that the indestructible group would do anything,
i will try to find more infos about the other stuff.2024-11-28 17:16:21: WARNING[Main]: Irrlicht: OpenGL driver version is not 1.2 or better.
2024-11-28 17:16:21: WARNING[Main]: Irrlicht: Failed to load OpenGL's multitexture extension, proceeding without.
2024-11-28 17:16:21: ERROR[Main]: An unhandled exception occurred: "Les nuanceurs sont activés mais GLSL n'est pas pris en charge par le pilote."
2024-11-28 17:16:21: ERROR[Main]: In thread 312:
2024-11-28 17:16:21: ERROR[Main]: /home/runner/work/minetest/minetest/src/main.cpp:275: int main(int, char **): A fatal error occurred: "Les nuanceurs sont activés mais GLSL n'est pas pris en charge par le pilote."
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
for the model, there is fragmotion : http://www.fragmosoft.com
it ask you to type a prayer to get a 7days licence (renewable) lol but it recognized the model from blockcolor with its animation so i suppose it got full .b3d support. i will experiment with it.
it ask you to type a prayer to get a 7days licence (renewable) lol but it recognized the model from blockcolor with its animation so i suppose it got full .b3d support. i will experiment with it.
- Blockhead
- Moderator
- Posts: 2096
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: getting started
Ah, well, now that you mention fragmotion, I remember there was actually a guide from sirrobzeroone on his process for using it to recover information out of b3d format. Hope that helps.psych0mega wrote: ↑Thu Nov 28, 2024 17:24for the model, there is fragmotion : http://www.fragmosoft.com
it ask you to type a prayer to get a 7days licence (renewable) lol but it recognized the model from blockcolor with its animation so i suppose it got full .b3d support. i will experiment with it.
The thing is, when it comes to blockcolor, that you have the .blend file available (src), so I'm not sure why you wouldn't start with that and then work out exporting it. Just un-gzip it and open it up (or maybe Blender can open it straight, not sure).
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
I was just checking things.
Here i think i should be using gltf. From what i understand, it can handle one big animation that i can divide later kinda with the frames. The gltf exporter with blender seems to work fine but i didn't check the details discussed in the topic about the scale, orientation or other stuff.
Here my problem is about making the big animation. That do a while i didn't use blender i need to check some little tutos maybe to put together some animations i got on mixamo.
Or i was thinking, could i just switch the model each time for each action having each model basically being the same but with another animation like a state machine.
And of course, how to actually switch the model? I found some mods about the player model i think, i need to experiment with them and see how it's done.
Any help is welcome.
Thanks
Here i think i should be using gltf. From what i understand, it can handle one big animation that i can divide later kinda with the frames. The gltf exporter with blender seems to work fine but i didn't check the details discussed in the topic about the scale, orientation or other stuff.
Here my problem is about making the big animation. That do a while i didn't use blender i need to check some little tutos maybe to put together some animations i got on mixamo.
Or i was thinking, could i just switch the model each time for each action having each model basically being the same but with another animation like a state machine.
And of course, how to actually switch the model? I found some mods about the player model i think, i need to experiment with them and see how it's done.
Any help is welcome.
Thanks
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
i have my model knight.glb with different animations but i don't know how to get started with my script.
how do i get the player variable?
i saw a few different methods but i end up with error or it return null.
what is the proper way to do to it?
how do i get the player variable?
i saw a few different methods but i end up with error or it return null.
what is the proper way to do to it?
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
found that:
viewtopic.php?t=9687
but it hasn't been fixed since 2014? (is luanti dead or something? i just discover it so i don't know, is there a more active branch?)
i cannot use:
i'm not really familiar with lua so i'm not sure i understand the workaround in the topic, can anyone enlight me about all this?
Thanks.
viewtopic.php?t=9687
but it hasn't been fixed since 2014? (is luanti dead or something? i just discover it so i don't know, is there a more active branch?)
i cannot use:
Code: Select all
minetest.register_on_joinplayer(function(player))
player:set_properties({
visual = "mesh",
mesh = "knight.glb"
})
Thanks.
- rubenwardy
- Moderator
- Posts: 7021
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: London, United Kingdom
- Contact:
Re: getting started
The bug described in that thread has been fixed for years
There's a syntax error in the code you posted - an erroneous ) on the first line
If the issue is your changes aren't taking effect then the problem is likely that another mod is overriding your changes to the properties. Probably player_api if you're running Minetest game. How you deal with this depends on which mod it is
There's a syntax error in the code you posted - an erroneous ) on the first line
If the issue is your changes aren't taking effect then the problem is likely that another mod is overriding your changes to the properties. Probably player_api if you're running Minetest game. How you deal with this depends on which mod it is
-
- New member
- Posts: 9
- Joined: Wed Nov 27, 2024 00:31
Re: getting started
well, it's very frustrating.
with or without the ), end or whatever, it doesn't work at all and i don't understand how to do it.
lua is a bit confusing to me.
could you give me the correct piece of code that i can put in my empty script to see if it work at all with correct coding?
so at least i could try the model maybe...
i use only my mods kinda so there is nothing that should be overwriting my script when i try.
i started with void, just added spawn builder to get started (removed it already to continue my project)
i made one mod to add custom nodes for me to build, so i started building...
and i started another mod for model and animation of the player but the script is empty... or with quoted stuff --
i put together some animations from mixamo into a blender fille so i have a knight with some moves... impossible to export to b3d after trying all kind of file format converting, i even install an older version of blender to try some exporter but it didn't work at all. i wanted to try to replace the model in the game blockcolor to see if it could work with the b3d but i failed to get my knight to this format whatsoever.
i have my knight.glb with all animations on only one track but not sure if i did it correctly as i can't try it out with luanti since i don't undertsand how to code this even if it looks very easy.
btw cannot use fullscreen because it's like it ask me to update opengl >< i need to find the sdk or something to try it out i guess
thanks for your help, it's really appreciated and actually, i hope i'm not wasting my time building my bigass maze and i hope i can customize luanti as i wish... a big world that loading fast with networking already implemented is a big help for a little dev like me.
with or without the ), end or whatever, it doesn't work at all and i don't understand how to do it.
lua is a bit confusing to me.
could you give me the correct piece of code that i can put in my empty script to see if it work at all with correct coding?
so at least i could try the model maybe...
i use only my mods kinda so there is nothing that should be overwriting my script when i try.
i started with void, just added spawn builder to get started (removed it already to continue my project)
i made one mod to add custom nodes for me to build, so i started building...
and i started another mod for model and animation of the player but the script is empty... or with quoted stuff --
i put together some animations from mixamo into a blender fille so i have a knight with some moves... impossible to export to b3d after trying all kind of file format converting, i even install an older version of blender to try some exporter but it didn't work at all. i wanted to try to replace the model in the game blockcolor to see if it could work with the b3d but i failed to get my knight to this format whatsoever.
i have my knight.glb with all animations on only one track but not sure if i did it correctly as i can't try it out with luanti since i don't undertsand how to code this even if it looks very easy.
btw cannot use fullscreen because it's like it ask me to update opengl >< i need to find the sdk or something to try it out i guess
thanks for your help, it's really appreciated and actually, i hope i'm not wasting my time building my bigass maze and i hope i can customize luanti as i wish... a big world that loading fast with networking already implemented is a big help for a little dev like me.
Who is online
Users browsing this forum: No registered users and 0 guests