Eclipse workspace setup for subgame

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

Eclipse workspace setup for subgame

by LouisDB » Sat Nov 05, 2016 10:43

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 » Thu Nov 10, 2016 08:31

Nobody knows how to setup Eclipse for Minetest ??
 

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

Re: Eclipse workspace setup for subgame

by firefox » Thu Nov 10, 2016 11:23

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 :)
my game: viewtopic.php?f=49&t=15860 --- building inspiration: viewtopic.php?f=3&t=15550 --- =(^.^)= nya~
 

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

Re: Eclipse workspace setup for subgame

by LouisDB » Thu Nov 10, 2016 20:42

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: 1430
Joined: Wed Jan 14, 2015 07:34
Location: Xanadu
In-game: Red_Fox

Re: Eclipse workspace setup for subgame

by firefox » Thu Nov 10, 2016 20:56

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...
my game: viewtopic.php?f=49&t=15860 --- building inspiration: viewtopic.php?f=3&t=15550 --- =(^.^)= nya~
 

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

Re: Eclipse workspace setup for subgame

by LouisDB » Thu Nov 10, 2016 21:47

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
Location: Linux
GitHub: cdqwertz
In-game: cd cd2

Re: Eclipse workspace setup for subgame

by cd2 » Fri Jan 06, 2017 09:14

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: 595
Joined: Thu Oct 13, 2016 10:45
Location: DE

Re: Eclipse workspace setup for subgame

by hajo » Fri Jan 06, 2017 10:46

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 » Mon Jan 30, 2017 09:59

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: 120
Joined: Mon Jan 23, 2017 16:18

Re: Eclipse workspace setup for subgame

by lightseer » Tue Jan 31, 2017 21:21

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: 7452
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Eclipse workspace setup for subgame

by azekill_DIABLO » Thu Apr 20, 2017 08:37

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.
 

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

Re: Eclipse workspace setup for subgame

by Rochambeau » Mon Nov 20, 2017 08:53

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
 


Return to Game Discussion



Who is online

Users browsing this forum: No registered users and 1 guest