.xtend files problem

How do I make Jmonkey recognize .xtend files?
I already imported the following libraries:

org.eclipse.xtend.lib-2.6.2.jar
org.eclipse.xtext.xbase.lib-2.6.2.jar

Thanks in advance!

Erm what is your intend?
It looks like you added eclipse plugins to you project, tihs diesprobably not make sense.

1 Like

First of all thanks a lot for your reply.
I’m trying to create a virtual dice roller and i found a project created with jme called Virtualmat that have some of that code.
Here it is:
https://www.assembla.com/code/vmat/subversion/nodes/104/tags/old1/src/main/java/net/virtualmat/dice
Some of that code depends of .xtend files.
Thanks in advance!

Ah, looking at the project,

did you execute the provided gradle build? It should do all necessary dependence resolutions.

1 Like

I wasn’t trying to compile the virtualmat project i was trying to use some of that code in a new project created by me.
I was able to start building the Virtualmat project but how do I add that dependencies to my own project?

All files that are used can be found in youruserdir/.gradle somesubfolder wit artifact and group names in it.

So you should be able to reference them correctly

1 Like

Thanks a lot mate i will try it when I arrive home :slight_smile:

You should not have any dependency on xtend in version I gave you. Project itself was using it, but dice rolling part was quite independent.

In any case, you should probably take resource files and then write your own roller, just taking inspiration from my classes. They were not really designed to be extracted into independent part.
I recall that I have done some dice design app
https://www.assembla.com/spaces/vmat/documents/bjHyzEJv8r4kOFeJe4gwI3/download/bjHyzEJv8r4kOFeJe4gwI3
which you can use to play around. I think that main source for that was at
https://www.assembla.com/code/vmat/subversion/nodes/104/tags/old1/src/main/java/net/virtualmat/tools/DiceDesignEditor.java

In any case, if you really want to use xtend (which I suggest in general, it is so much better than generic java), you need eclipse installation and install reasonably new plugin from
http://www.eclipse.org/xtend/download.html

Then you just right-click on project and do ‘add xtend nature’.

1 Like

Great job with the Virtualmat Artur!
I will try to compile Virtualmat to try it and I will create a little dice roller project to learn about Jmonkey.
Thanks for your help.

I would suggest against compiling virtual mat. It depends on certain assets and setup which is not in the svn and I won’t be able to really support old version of it. It is in constant rewrite, version you are looking at was one with reasonably working dice rolling, but not neccesarily working otherwise. It even might require some small changes to jme3 core.

Please look at the code, borrow code etc - but compiling everything is going to be a lot harder than it is worth.

1 Like

OK mate thanks for the advice, I will follow it, I thought it was a complete project with all I needed to compile it.
Thanks for your time :slight_smile:

Hi Artur,

I was successful in getting your code working, at least the dice loading part.
I had to make considerable changes but voilá!! :slight_smile:
When I refactor and complete the dice rolling feature i will post the code.
Here is a screenshot:

http://postimg.org/image/mn24uq8fv/

NOTE: For some reason the D4 it isn’t well mapped do you know why?

What do you mean by not mapped well? From screenshot it looks proper. Do you mean result mapping?

Hi Artur, forget about the note i rarely used the D4 in D&D and i thought that each face only have one number. My mistake :s