Hanappe Framework.

A little place to chat about the excellent Hanappe library framework.

Moderators: naturally, seebs, ezraanderson, makotok1123

Hanappe Framework.

Postby makotok1123 » Sun Apr 22, 2012 12:11 am

I've created a simple framework for the moai.
Moai intact the existing logic, that incorporate a partial framework can be.

MOAIProp factory object modules.
Powerful module to animate the MOAIProp.
SceneManager class.
Powerful module is a wrapper for the MOAIDraw.

https://github.com/makotok/Hanappe
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby anddrewscott » Sun Apr 22, 2012 1:15 am

Is this replacing your HSFramework?
anddrewscott
 
Posts: 153
Joined: Fri Sep 02, 2011 7:39 am

Re: Hanappe Framework.

Postby makotok1123 » Sun Apr 22, 2012 7:32 am

I will probably replace.

First thought is a good way of HSFramework.
but, HSFramework was having some problems.

1.
Function has been achieved by delegating the MOAIProp.
However, compatible with MOAI was bad.
Easy to miss the evolution of the moai.

2.
Internal source of HSFramework went quite complex.
Was supposed to face unnecessary anxiety to potential bug.

3.
HSFramework was away from MOAI.

In order to improve the above-mentioned problems, you create a HanappeFramework.

1.
Be based on a MOAIProp, how to use and does not change MOAI.
Hanappe can be used immediately by anyone is possible.

2.
Implementation is very simple.
Embedded is a bug so difficult, can be relieved to some extent.

3.
Compatible with existing MOAI is good.
Animation can be used alone in her class that target the MOAIProp.
It also can be used alone, the Graphics class.

4.
There is no big thing to change specifications.
But almost finished, there was a bug fix.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby todd » Wed Apr 25, 2012 1:18 pm

Thanks - that's excellent! :)
User avatar
todd
 
Posts: 262
Joined: Fri Mar 25, 2011 1:11 pm

Re: Hanappe Framework.

Postby makotok1123 » Thu May 03, 2012 8:13 am

Has been updated to V1.1.1 the Hanappe.

* Added Joystick
Was added to a virtual Joystick.

* Strengthening of RPGMapView
Has been enhanced for use with RPG Game, a typical implementation of MapView.
In the future, to add the template RPG game.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby makotok1123 » Thu May 03, 2012 5:38 pm

Has been updated to V1.1.4 the Hanappe.

* Added RPGMapView sample
Attachments
rpgmap_sample_screen.png
rpgmap_sample_screen.png (152.04 KiB) Viewed 14251 times
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby makotok1123 » Sun May 06, 2012 12:59 am

Has been updated to V1.1.5 the Hanappe.

* tmx file encoding support to "csv" and "base64".
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby makotok1123 » Sat May 12, 2012 8:51 am

Has been updated to V1.2.0 the Hanappe.

* Widget
Was added to the Widget class. (Button, View)
Button Button is common.
Add the Widget to View.
View is to add a View is possible.
Future, I want to add another class Widget.

* NinePatch
Added NinePatch easy to use.
MOAIStretchPatch2D is very cumbersome.
NinePatch I have created, the scale will be set automatically by specifying the size.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby nosheet » Mon May 28, 2012 3:46 pm

Thanks, this is absolutely beautiful! I am new to Moai so, naturaly what I wanted to do first, is to write down my own framework but you have made fantastic job already!
One question - is there an english version of the documentation, or online documentation where I can just use Google Translate?
Thanks again for great contribution :)
Nenad
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby makotok1123 » Tue May 29, 2012 9:06 am

nosheet wrote:Thanks, this is absolutely beautiful! I am new to Moai so, naturaly what I wanted to do first, is to write down my own framework but you have made fantastic job already!
One question - is there an english version of the documentation, or online documentation where I can just use Google Translate?
Thanks again for great contribution :)
Nenad


Thanks for watching.

I am not good at English.
I want to remember the English, take some time.

Has been described in all google translation.
Therefore, it may be inappropriate.

I'm sorry, documentation has not caught up.
I will do my best.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby ibisum » Tue May 29, 2012 11:44 pm

makotok1123, maybe you want to focus on some more example projects for your framework, before you worry about the documentation? The reason is that with some better examples, people such as myself can help you with the documentation. I believe that folks such as myself, who eagerly wish to help the MOAI scene grow, can definitely help you with such a task - and our job would be much, much easier if you developed more samples that show the framework features, first of all.
;
--
Email: ibisum@gmail.com
IRC: torpor on FreeNode, see you in the #moai channel
Got a MOAI snippet? Please consider adding it to http://moaisnippets.info/
User avatar
ibisum
 
Posts: 1503
Joined: Mon Oct 17, 2011 1:11 am
Location: Vienna, Austria

Re: Hanappe Framework.

Postby nosheet » Wed May 30, 2012 2:54 am

@makotok1123, I agree with ibisum, examples are always priority over documentation, so better do more examples, and we can help with english docs.
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby makotok1123 » Wed May 30, 2012 5:14 pm

Hi,ibisum,nosheet.

If able to help, I'm very happy.
Any help is welcome also.

I want to add the sample.
The re-written in English luadoc.
If English is wrong,it should be pointed out.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby nosheet » Fri Jun 01, 2012 2:07 pm

@makotok, I wanted to publish a few tutorials of MOAI with Hanappe, but there is one thing that I couldn't understand reading your code. How can I make a hit test for a display object (for example Sprite) ? I have seen the way you implemented isHit() and isHitForChildren() in Widget "class" but couldn't understand how to use it on my own classes (or how to decorate Sprite class with this kind of method).
Can you please post a simple sample with one sprite that use can drag using mouse, that would help understand how hitTest works ?
After that, I could start working on tutorials. :)
Thanks
Nenad
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby makotok1123 » Sat Jun 02, 2012 10:24 am

Hello, nosheet.

MOAIProp: inside fall into hitTest.

But I did not know for this function, I was a cumbersome implementation.
To determine if you can get from MOAIProp MOAIParition, MOAIProp is to have collided.

I was fixed Hanappe.
We have also added a sample of the drag and hittest.

has committed to dev branch.
If there is no problem, and then commit to master branch.

https://github.com/makotok/Hanappe/tree/dev
https://github.com/makotok/Hanappe/blob/dev/samples/display/hittest_sample.lua
https://github.com/makotok/Hanappe/blob/dev/samples/display/drag_sample.lua

Furthermore, dev branch, which also includes other fixes.
Most notably is that the generation of the DisplayObject instance has been improved.
You do not need to inherit by function new.
function must be inherited by init.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby nosheet » Sat Jun 02, 2012 11:28 am

Thanks, makotok...
One question, is it possible to add listener to sprite directly, like in Flash?
For example, is this possible, without use of SceneManager ?
Code: Select all
  1.  

  2. app:importClasses( _G )

  3. Application:appStart(config)

  4.  

  5. local layer = Layer( )--{ isSimulation = true } )

  6. local function touchMe(event)

  7.       print("Sprite has been deeply touched! :) ")

  8. end

  9.  

  10. sprite1 = Sprite({texture = "samples/assets/cathead.png", layer = layer})

  11.  

  12. sprite1:addEventListener( "touchDown", touchMe )

  13.  



How can I properly do it?
Thanks :)
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby nosheet » Sat Jun 02, 2012 11:32 am

Ah, ok I think I understand, it should be:
Code: Select all
  1. function handleTouches( self, event )

  2.         if image:hitTestScreen(event.x, event.y) then

  3.                 print("INSIDE")

  4.         else

  5.                 print("OUTSIDE")

  6.         end

  7. end

  8.  

  9. InputManager:addEventListener("touchDown", handleTouches, image)

Last edited by nosheet on Sat Jun 02, 2012 11:55 am, edited 1 time in total.
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby makotok1123 » Sat Jun 02, 2012 11:46 am

Thank you for suggestion!

I was thinking how to do it first.
In HSFramework was created in the past, Sprite has inherited the EventDispatcher.

But, HSFramework MOAI and fell far away.
Has become so complicated, I was to rebuild the Hanappe.

At that time, also, in order to simplify, in order of performance, its function has been deleted.

I'm happy and I put in the functionality of the EventDispatcher DisplayObject?
I might have been should inherit EventDispatcher.

Because it allows for multiple inheritance, I can easily fix.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Re: Hanappe Framework.

Postby nosheet » Sat Jun 02, 2012 12:01 pm

I actually like it how it is now, with InputManager as a "singleton" that dispatches all touch events.
It's very simple, better then Flash :)
A few games I've made, just before I stopped making them:
http://www.spin-up-game.com and http://www.foosballhero.com
User avatar
nosheet
 
Posts: 424
Joined: Mon May 28, 2012 2:40 pm
Location: Madrid, Spain

Re: Hanappe Framework.

Postby makotok1123 » Sat Jun 02, 2012 12:19 pm

Thank you for answer.

DisplayObject plans to inherit from EventDispatcher.
Will consider later whether to implement the touch event to the DisplayObject.

Incidentally, Hanappe is influenced by the Flash.
makotok1123
 
Posts: 244
Joined: Fri Jan 06, 2012 11:31 am

Next

Return to Flower

Who is online

Users browsing this forum: No registered users and 0 guests

cron

x