November 22, 2017, 01:06:14 AM

Author Topic: noob first step  (Read 1279 times)

bruno

  • Newbie
  • *
  • Posts: 3
    • View Profile
noob first step
« on: April 30, 2014, 05:52:46 AM »
Hi there

I am completely new to the world of haxe
I just know php and want to code the dungeon crawler of my dream

 I choose haxe Punk (and not the other one ;)
The comments saying that is most structured help me in my choice

Btw does I need to install nme to code as they suggest here or continue with haxe openFL and HaxePunk?

http://www.gemfruit.com/articles/programming/getting-started-with-haxepunk

Thanks for the explanation


ibilon

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 581
    • View Profile
    • My website
Re: noob
« Reply #1 on: April 30, 2014, 06:13:43 AM »
The nme mentioned in this article became openfl.

See here for an introduction on installing haxepunk: http://haxepunk.com/documentation/tutorials/getting-started/

bruno

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: noob
« Reply #2 on: April 30, 2014, 07:37:18 AM »
Thanks I've already installed it as mentioned on the website

Thanks a lot for your fast answer

bruno

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: noob
« Reply #3 on: April 30, 2014, 11:10:18 AM »
just for the newbie in Windows I think it's interesting I continue to tell you my troubles
Hope it'll help a newcomer

Website of Flashdevelop is here
http://www.flashdevelop.org/

For Flash develop we need to install this
http://haxepunk.com/documentation/tutorials/flashdevelop/

We Need to install flash projector here and associate with swf
flashplayer_13_sa.exe
the download is here

Then choose release flash
Download the Windows Flash Player 13 Projector (EXE, 9.95MB)
http://www.adobe.com/support/flashplayer/downloads.html#fp11.9

When you begin the first code
http://haxepunk.com/documentation/tutorials/haxepunk-basics/

Be sure to use
Code: [Select]
import com.haxepunk.Engine;
import com.haxepunk.HXP;

class Main extends Engine
{

override public function init()
{
#if debug
HXP.console.enable();
#end
HXP.scene = new scenes.GameScene();
}

public static function main() { new Main(); }

}

By the way
It'll be more easy to give the new Block.hx in the final code section
Code: [Select]
package entities;

import com.haxepunk.Entity;
import com.haxepunk.graphics.Image;
import com.haxepunk.utils.Input;
import com.haxepunk.utils.Key;

class Block extends Entity
{
    public function new(x:Int, y:Int)
    {
        super(x, y);

        graphic = new Image("graphics/block.png");
    }

    public override function update()
    {
        if (Input.check(Key.LEFT))
        {
            moveBy(-2, 0);
        }

        if (Input.check(Key.RIGHT))
        {
            moveBy(2, 0);
        }


        super.update();
    }
}

That's all for the moment