Page 3 of 3

Re: Mogamett

Posted: Thu Jul 31, 2014 2:11 pm
by nodepond
Hi there. Mogamett looks really cool - more modular like the Zoetrope, that is a little bit too high level for my taste.

Here my question: I try to get the PhysicsBody-mixing running, but have problems doing so. Before getting into the details... It would be cool, to have a downloadable project, with example stuff in it - then maybe questions like this would become obsolete.

Here I define the Player-object.

Code: Select all

require 'mogamett/mogamett'

-- physics enabled entity template
Player = mg.class('Player', 'Entity')
Player:implement(mg.PhysicsBody)

function Player:new(world, x, y, settings)
    Player.super.new(self, world, x, y, settings)
    self:physicsBodyNew(world, x, y, settings)
end

function Player:update(dt)
    self:physicsBodyUpdate(dt)
end

function Player:draw()
    self:physicsBodyDraw()
end
When I try to initialize with that

Code: Select all

player = Player(mg.world, 100, 100,{})
I got the following error:
mogamett/mixins/PhysicsBody.lua:53 attempt to index a nil value

Going back to Player.lua line 9:

Code: Select all

self:physicsBodyNew(world, x, y, settings)
Any ideas, what could be wrong? I also tried different inits of the Player-object, like
player = Player.new(mg.world, 100, 100) or player = Player:new(mg.world, 100, 100,{})

Re: Mogamett

Posted: Thu Jul 31, 2014 3:39 pm
by nodepond
Ohh.

I've got the suspicion, that somehow the mg.world was not fully initialized at the example above. I did try it in

Code: Select all

function love.load()
	mg.init()
	playerTest()
end
When I run the playerTest-method later during runtime, there is no error. So I guess it was just an init-issue. When calling it after mg.run() it seems to work.

Re: Mogamett

Posted: Sat Aug 02, 2014 4:50 pm
by adnzzzzZ
You're supposed to create entities using the createEntity function. http://mogamett.com/documentation/world ... on_methods

Re: Mogamett

Posted: Tue Aug 05, 2014 5:34 pm
by nodepond
adnzzzzZ wrote:You're supposed to create entities using the createEntity function. http://mogamett.com/documentation/world ... on_methods
Ok, that was the secret! Thanks! Maybe it would be a good idea, to mention this creation-method at the PhysicyBody-documentation: http://mogamett.com/documentation/physicsbody/

Re: Mogamett

Posted: Tue Sep 30, 2014 6:01 pm
by nodepond
I wrote a little parser, that converts tilemap-data from the "Pyxel"-pixeleditor (http://pyxeledit.com) to mogamett (the quite current version - there are no official versions yet, so it seems).

If anyones interested, here is the stuff:
https://gist.github.com/nodepond/5e71171ffbe2ec09aa03

Usage:
Run this script in the same folder, where you have exported the 'tilemap.json' from Pyxel.

The tilemap is named 'Layer 0'
The collisionmap is named 'Layer Collide'

It generates lua-code ready to c&p paste. There is an more accurate usage example in the ruby-file itself.

Re: Mogamett

Posted: Sat Oct 04, 2014 12:26 am
by Zilarrezko
All of everyone's plugs, so many haha.

This is an awesome collaboration of everything, good too see everyone in the community likes it as well.

Re: fuccboiGDX

Posted: Thu Dec 18, 2014 1:09 am
by adnzzzzZ
Released the latest version as fuccboiGDX: http://fuccboi.moe/

Tutorials
Examples
Documentation

Re: fuccboiGDX

Posted: Sat Jan 03, 2015 7:16 pm
by nodepond
I am just curious... Why the renaming of Mogamett to fuccboiGDX? (I just get used to Mogamett.) And what does GDX stand for?

Re: fuccboiGDX

Posted: Sat Jan 03, 2015 8:34 pm
by adnzzzzZ
It doesn't stand for anything, but I answer why I used it in the FAQ

Re: fuccboiGDX

Posted: Wed Jan 07, 2015 10:45 pm
by nodepond
I made an small update to the Pyxel Edit tilemap to fuccboiGDX-parser. http://www.nodepond.com/blog/779-pyxel- ... er-in-ruby