RapaNui: a new, open-source, high-level programming framework for Moai

A place for developers to promote games they have created with Moai

Re: RapaNui: a new, open-source, high-level programming fram

Postby stefano.linguerri » Sun Feb 19, 2012 8:21 am

Hi joaobi!

Please do a new pull from origin master with git, in past days there were some bugs.
Anyway are you on Win, Linux or Mac?

thank you
Twitter: http://twitter.com/eljeko
RapaNui: https://github.com/ymobe/rapanui

"Do, or do not. There is no try."
User avatar
stefano.linguerri
 
Posts: 70
Joined: Wed Apr 13, 2011 3:11 pm
Location: Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby joaobi » Mon Feb 20, 2012 6:59 am

I have pulled the last sources from master, but ''m receiving the same error, i'm on Win XP, when i try to run the map samples on my Android test device they work successful.
joaobi
 
Posts: 3
Joined: Sun Feb 19, 2012 5:11 am
Location: Rome, Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby stefano.linguerri » Tue Feb 21, 2012 2:58 pm

Maybe is something related to win.
We will check this.

thank you
Twitter: http://twitter.com/eljeko
RapaNui: https://github.com/ymobe/rapanui

"Do, or do not. There is no try."
User avatar
stefano.linguerri
 
Posts: 70
Joined: Wed Apr 13, 2011 3:11 pm
Location: Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby stefano.linguerri » Sun Feb 26, 2012 8:58 am

@joaobi

We did some test on win7 xp and we can't reproduce the problem.

do you mind to share the moai build you are using for win? do you build it by yourself?

thanks in advance,
Twitter: http://twitter.com/eljeko
RapaNui: https://github.com/ymobe/rapanui

"Do, or do not. There is no try."
User avatar
stefano.linguerri
 
Posts: 70
Joined: Wed Apr 13, 2011 3:11 pm
Location: Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby joaobi » Mon Feb 27, 2012 3:26 am

i have downloaded Moai SDK Version 0.95 Beta Revision 3 not builded by myself; I'm running the samples with Lua 5.1.4 and win Xp.
This is my output:

C:\Documents and Settings\glaquidara\Documenti\Work\rapanui>C:\moai-sdk-beta\moai-sdk\bin\win32\moai.exe "config\config.lua" "main.lua"
PANIC: unprotected error in call to Lua API (.\rapanui-samples/maps/rn-basic-map.lua:20: attempt to index global 'aTileset' (a nil value))
joaobi
 
Posts: 3
Joined: Sun Feb 19, 2012 5:11 am
Location: Rome, Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby Vad1mo » Thu Mar 01, 2012 9:28 am

Suggestion for rapanui refactoring. I see you refractored the code and put the sdk files in ins own directory
now you can't use
require("RNUtil") but have to use require("sdk/RNUtil")

with this snippet code at the beginning or config??

package.path = package.path .. ";./rapanui-sdk/?.lua"

you can return using require("RNUtil") and so on.


Cheers,

it might help
Vad1mo
 
Posts: 14
Joined: Mon Jan 30, 2012 3:28 pm
Location: Zürich

Re: RapaNui: a new, open-source, high-level programming fram

Postby stefano.linguerri » Thu Mar 01, 2012 9:49 am

Hi Vad1mo, I'll check this.

do you mind to open an issue on git (or even do the change and send a pull request)?

thank you very much,
Stefano
Twitter: http://twitter.com/eljeko
RapaNui: https://github.com/ymobe/rapanui

"Do, or do not. There is no try."
User avatar
stefano.linguerri
 
Posts: 70
Joined: Wed Apr 13, 2011 3:11 pm
Location: Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby Sergeyka » Wed Apr 04, 2012 8:58 pm

Hello.

What with support MOAI 1.0 ?

The project is alive? I'm added partial(a little function) a support of RapaNui for Estrella Editor.
http://youtu.be/h5VvlOb9vGw

I think that RapaNui should be include in Moai and make it officially framework. He looks more like a Corona and easier to understand..
Sometimes I use google translate. For example now =)
Sergeyka
 
Posts: 37
Joined: Mon Feb 13, 2012 12:51 pm
Location: Russia

Re: RapaNui: a new, open-source, high-level programming fram

Postby mattfortunati » Sat Apr 07, 2012 3:32 am

Hi Sergeyka,

>What with support MOAI 1.0 ?
We are fixing RapaNui for Moai 1.0 and improving it with new features in rapanuidev branch. We'll merge it to master as soon as possible. The version in rapanuidev is already stable and works for Moai 1.0.

>The project is alive? I'm added partial(a little function) a support of RapaNui for Estrella Editor.
It seems great! Thank you!

>I think that RapaNui should be include in Moai and make it officially framework. He looks more like a Corona and easier to >understand..
Thanks for appreciating our work! I'm happy you like RapaNui!

Have a nice day,
Mattia
User avatar
mattfortunati
 
Posts: 86
Joined: Sat Apr 23, 2011 6:30 am
Location: Rome

Re: RapaNui: a new, open-source, high-level programming fram

Postby Sergeyka » Sun Apr 08, 2012 3:07 am

Hello.

I have a problem.

the game has 2 layers and animated cockroach

First layer is background
Second layer is a piece of paper in top of screen

If the cockroach is over background but under the newspaper - click not work
If the cockroach is over background and the newspaper - click is work

I recorded video - http://youtu.be/E_LeBVXABkI
For testing - http://www.box.com/s/c4aeebe02e2ae1c8d907

added: Executed in Akuma, in Moai 0.9x in both cases does not work. In Moai 1.0R3 and RapaNuiDev also as in Akuma..

added2: problem with transparent color. It is not visible but the click works on it, but not on the cockroach =(

How to solve problem? Have you any ideas?
Thanks and sorry for my english.
Sometimes I use google translate. For example now =)
Sergeyka
 
Posts: 37
Joined: Mon Feb 13, 2012 12:51 pm
Location: Russia

Re: RapaNui: a new, open-source, high-level programming fram

Postby mattfortunati » Tue Apr 10, 2012 6:05 am

Hi Sergeyka,
thanks for having attached a sample, it helped a lot.

It seems there's a sort of bug in RapaNui's touch. Obviously, since the image newspaper image is over the others it receives the callback for the touch.

A possible solution could be to have two smaller images for the newspaper, one for the top and the other for the bottom part of it.

But you are right, there should be the possibility to fix this from code in RapaNui, maybe a sort of filter for touch callbacks like a boolean "image.setTouchable" to be set for RNObjects.

However, don't worry, these days we are working to fix/improve the touch listener and this will be for sure an improvement we'll make.

Thank you again! Have a nice day!

Mattia
User avatar
mattfortunati
 
Posts: 86
Joined: Sat Apr 23, 2011 6:30 am
Location: Rome

Re: RapaNui: a new, open-source, high-level programming fram

Postby Sergeyka » Tue Apr 10, 2012 10:20 am

A possible solution could be to have two smaller images for the newspaper, one for the top and the other for the bottom part of it.

If a images have a square shape then yes, i can sliced a big images on few parts.

But in my case will still be areas where the touch will not work =)

Image

However, don't worry, these days we are working to fix/improve the touch listener and this will be for sure an improvement we'll make.

Cool, thanks =) I just learn rapanui and do not hurry you :roll:
Sometimes I use google translate. For example now =)
Sergeyka
 
Posts: 37
Joined: Mon Feb 13, 2012 12:51 pm
Location: Russia

Re: RapaNui: a new, open-source, high-level programming fram

Postby fderudder » Tue Apr 24, 2012 9:11 am

I've been toying a little with Moai and Rapanui lately, as i plan to work my lua and cpp skills with an isometric game (i like having a clear goal when it comes to learn something). This said, i've made a little test map in Tiled, isometric, and tried to load it (successfully) via Rapanui. But when it comes to draw it, it's kinda... messed up.

Image

where it should look like this Image

So i'm wondering, since MOAI supports diamond tiled map, where i should look to get this working properly ? (i've quickly checked the parsers provided by Rapanui, but i have to admit i'm kinda lost as i havent found a proper file spec doc for .tmx). Thx in advance.
User avatar
fderudder
 
Posts: 7
Joined: Thu Apr 12, 2012 1:35 am
Location: Paris, France

Re: RapaNui: a new, open-source, high-level programming fram

Postby stefano.linguerri » Tue Apr 24, 2012 9:34 am

Hi,

Put sample code somewhere we will try it. We didn't test with diamond maps.

thanks in advance
Twitter: http://twitter.com/eljeko
RapaNui: https://github.com/ymobe/rapanui

"Do, or do not. There is no try."
User avatar
stefano.linguerri
 
Posts: 70
Joined: Wed Apr 13, 2011 3:11 pm
Location: Italy

Re: RapaNui: a new, open-source, high-level programming fram

Postby fderudder » Tue Apr 24, 2012 10:23 am

Sure !

Enclosed you'll find my IntelliJ project with the map (in /scene) and its tileset (in /scene/tilesets). It's based on your Director Sample : it starts by adding the test_iso.lua scene and draw it.

This said i've noted a "drawmode" parameter in RNMapFactory:loadMap which is unassigned; but it seems it can be assigned through the RNMap:setDrawmode(drawmode) function. Though, you can find the drawmode parameter in layer:drawLayerAt function (RNMapLayer line 175). I'll be try stuff here (i'm still a bit lost with all the "dynamic" nature of lua. I'm used to have explicit types here and there).

UPDATE : deepest call to drawmode is in RNMapLayer:initLayer, but it's still unused. Maybe you planed to get some special handling of diamond/hex/square maps here, but i guess it didnt make it in the current version ^_^ )
Attachments
moai_isometric.zip
(186.98 KiB) Downloaded 53 times
User avatar
fderudder
 
Posts: 7
Joined: Thu Apr 12, 2012 1:35 am
Location: Paris, France

Re: RapaNui: a new, open-source, high-level programming fram

Postby fderudder » Wed Apr 25, 2012 8:17 am

As far as i've checked, with my little knowledge of both Rapanui and MOAI, i've found that diamond shaped grid are init by MOAI calling the initDiamondGrid() method on the grid created.

I'm going to try if i can hack your RNMapLayer:initLayer() function if it's possible to use the drawmode parameter (which isnt used so far) to get a Diamond Shape grid.

UPDATE :

indeed, using grid:initDiamondGrid() with the attributes from the tmx yields some results.
Since attributes are parsed in RNTiledMapParser, we can call it with the proper arguments

in RNMapLayer:initLayer()
Code: Select all
  1.    

  2. self.grid = MOAIGrid.new()

  3. self.grid:initDiamondGrid(self.parentMap["width"],self.parentMap["height"],self.parentMap["tilewidth"],self.parentMap["tileheight"])



Though it's still buggy. I guess it's related to the fact that the orientation attribute in the tmx is not passed somehow. I'll continue to hack and test and keep you informed if i find any clue.
Image


UPDATE #2 :
just saw that the self.grid:setSize() overrides the initXXXGrid() set right before.
User avatar
fderudder
 
Posts: 7
Joined: Thu Apr 12, 2012 1:35 am
Location: Paris, France

Re: RapaNui: a new, open-source, high-level programming fram

Postby fderudder » Wed Apr 25, 2012 9:10 am

Hum, i was doing some search in the forum and it seems that i've been mistaken : what i thought was isometric support wasnt per se what i thought it was.

It seems that what they called "diamond" (and according to the grid-diamond sample) is actually a "zig zag" isometric mapping (or staggered row according to some material i've found online).

Image

(and there http://stackoverflow.com/questions/8928 ... ame-worlds )

UPDATE : I've added the patch from Paxton Hare (post2627.html), rebuilt the host and called the initIsometricGrid

I guess i'm getting closer.
Image
User avatar
fderudder
 
Posts: 7
Joined: Thu Apr 12, 2012 1:35 am
Location: Paris, France

Re: RapaNui: a new, open-source, high-level programming fram

Postby Sergeyka » Wed May 02, 2012 12:23 am

Hi.

The problem with the touch has not been fixed?
Sometimes I use google translate. For example now =)
Sergeyka
 
Posts: 37
Joined: Mon Feb 13, 2012 12:51 pm
Location: Russia

Re: RapaNui: a new, open-source, high-level programming fram

Postby mattfortunati » Wed May 02, 2012 12:31 am

Hi,

Yes, it has been fixed! Check this:
https://github.com/ymobe/rapanui/blob/m ... chable.lua

-- by default RNObject aren't touchable only when a listener it's set they start to be touchable.

Let us know if it's ok!

Have a nice day,

Mattia
User avatar
mattfortunati
 
Posts: 86
Joined: Sat Apr 23, 2011 6:30 am
Location: Rome

Re: RapaNui: a new, open-source, high-level programming fram

Postby fderudder » Wed May 02, 2012 2:51 am

Just in case, the isometric display is on hold while i'm working on parsing the differents formats of TMX. So far, RapaNui supports only plain XML .tmx files, while you have the opportunity in Tiled to save tilemaps as xml/csv, or base64 (this one seems a little tricky so i prefere the csv part which is more "human readable" and easier to get). Would you be interested on getting the code when i'll be done with that ?

For example instead of having lots of :

Code: Select all
  1.  <layer name="ground" width="10" height="10">

  2.   <data>

  3.    <tile gid="175"/>

  4.    <tile gid="11"/>

  5.    <tile gid="11"/>

  6.    ...

  7.   </data>

  8.  



you have

Code: Select all
  1.  <layer name="ground" width="10" height="10">

  2.   <data encoding="csv">

  3. 175,11,11,11,11,11,11,11,11,11,

  4. 11,11,11,11,11,11,11,12,11,11,

  5. 12,11,12,12,11,11,11,12,12,11,

  6. 11,11,12,11,12,12,11,11,11,11,

  7. 11,12,12,11,11,11,11,11,11,38,

  8. 12,12,12,12,12,11,12,12,11,15,

  9. 12,12,12,12,12,12,12,12,11,11,

  10. 11,11,11,12,12,12,12,12,12,11,

  11. 11,11,12,12,12,12,12,12,12,11,

  12. 11,11,11,12,12,12,12,11,11,11

  13. </data>



I think that when this is done, i'd be able to pinpoint the "reversed" isometric problem. This said, i hope that Paxton's isometric patch will be available in future Moai's release
User avatar
fderudder
 
Posts: 7
Joined: Thu Apr 12, 2012 1:35 am
Location: Paris, France

PreviousNext

Return to Made With Moai

Who is online

Users browsing this forum: No registered users and 0 guests

x