Eclipse workspace setup for subgame

Post Reply
User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Eclipse workspace setup for subgame

by LouisDB » Post

Hi,

I'm trying to setup Eclipse to make a subgame by following this guide : here
It seems outdated because for what I understand, Koneki is not maintained anymore, I couldn't find it, so I use LDT.
I tried many thing, I cloned the minetest_game repo, I'm not sure if I have to clone the minetest repo. I tried putting minetest_game as a submodule in the games directory. Anyway, it won't launch Minetest. It's probably a problem with the run config, like wrong working dir or wrong init file.

Can somebody help me setup my workspace ?
Thanks in advance.

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Eclipse workspace setup for subgame

by LouisDB » Post

Nobody knows how to setup Eclipse for Minetest ??

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

Re: Eclipse workspace setup for subgame

by firefox » Post

i have no idea what eclipse is, but to run a subgame you just need to move it to the "games" folder inside the "minetest" folder in your home directory.
then the game appears on the bottom of the menu screen in minetest.

to make a new subgame you just need any text editor.
copying the default minetest_game can be helpful if you don't know where to start, as it contains the basic setup for a functional game.
you can then add more mods and/or make changes to make your game different from default minetest_game.

does this help? =(^.^)=

if not, tell what exactly you want to do :)
✨🏳️‍🌈♣️✨

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Eclipse workspace setup for subgame

by LouisDB » Post

Eclipse is an integrated development environment. I want to use it to code a subgame. I don't like to use a text editor, I need a IDE with auto-completion. So if someone can teach me how to launch Minetest with Eclipse, it would be nice. Maybe it's more a Lua problem, I don't quite understand how Lua works.

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

Re: Eclipse workspace setup for subgame

by firefox » Post

LouisDB wrote:I need a IDE with auto-completion
that could be complicated...
i know something like this exists for html and similar languages, but Lua is different.

i don't know Lua either, but i know that the engine is written in C and uses a Lua based API to add game content.
i guess an auto-completion method for this would have to be specifically created...
✨🏳️‍🌈♣️✨

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Eclipse workspace setup for subgame

by LouisDB » Post

Too bad, I guess I'll have to use a gold old text editor, it's gonna be a pain ...

User avatar
cd2
Member
Posts: 562
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
In-game: cd cd2
Location: Linux
Contact:

Re: Eclipse workspace setup for subgame

by cd2 » Post

LouisDB wrote:Too bad, I guess I'll have to use a gold old text editor, it's gonna be a pain ...
You could use atom. Idk if it has auto completion for lua, but I am sure that there is a package for that.
https://atom.io/

PS : Sorry for the late reply.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: Eclipse workspace setup for subgame

by hajo » Post

LouisDB wrote:I'm trying to setup Eclipse to make a subgame
So, essentially mod-development, as opposed to working on minetest's core.

Eclipse is a fairly big IDE, aimed at working with Java/ big projects / many files etc.
Most likely overkill for modding.

If all you need is an editor that supports multiple files, syntax-highlighting and a launcher,
try a lightweight IDE like Geany, or editors like AkelPad and Notepad++ .
LouisDB wrote:I need a IDE with auto-completion
Auto-complete for plain lua, or for the various minetest-api's ?

User avatar
LouisDB
Member
Posts: 14
Joined: Wed Oct 12, 2016 16:23
GitHub: DBLouis

Re: Eclipse workspace setup for subgame

by LouisDB » Post

Thanks for the replies :)
I wanted to use Eclipse because I used to it. After doing a bit of research, it seems that it is not suitable for Lua, even if there is a plugin, because I won't be able to use the graphical debugger.

lightseer
Member
Posts: 132
Joined: Mon Jan 23, 2017 16:18

Re: Eclipse workspace setup for subgame

by lightseer » Post

I located some information about the Koneki debugger setup: http://wiki.eclipse.org/Koneki/LDT/User ... s/Debugger

I'm not sure if I want to learn Eclipse myself, but that looks like instructions.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Eclipse workspace setup for subgame

by azekill_DIABLO » Post

firefox wrote:
LouisDB wrote:I need a IDE with auto-completion
that could be complicated...
i know something like this exists for html and similar languages, but Lua is different.

i don't know Lua either, but i know that the engine is written in C and uses a Lua based API to add game content.
i guess an auto-completion method for this would have to be specifically created...
hey, notepad ++ has auto complition once you start coding.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Eclipse workspace setup for subgame

by Rochambeau » Post

Maybe it's a little too late, but I got Eclipse running and debugging mods by following these steps:

1. Install Eclipse
2. Install LDT:

In your Eclipse 4.3+ go to Help > Install New Software...
Add the following repository:
http://download.eclipse.org/ldt/releases/
Now you can install the Lua Development Tools.

3. Install lua-socket and/or luarocks.
3. Start a new Lua Project and Choose "Create project at existing location (from existing source)" and point to your mod folder
4. the very first line of your init.lua should be this:

Code: Select all

require("debugger")(idehost, ideport, idekey)
which imports the debugging client
5. when your mod is ready to test, start your debugging session in eclipse by opening the debug configurations and choose "Lua Attach to Application"
6. Download the Lua Debugger Client (debugger.lua) via the link at the top of the connect tab and place it in the lua_path folder. For me, downloading to my home directory worked.
7. Enter a name for this configuration and choose your project. Leave the rest as it is. For testing purpose, you can activate "Break on first line".
8. click "Debug" Now you have 30 seconds to start a Minetest game with your mod
9. Eclipse should break at the first line (if option is set) or at a manually set breakpoint and you can step through your mod

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest