fongka2's Forum Posts

  • pin object?

  • fongka2 Thanks for the demo. In the next day or so I'll take a look at it. I understand what your code is saying and it seems like a good, viable usage. I completely agree, there's no need to make the problem more complex if it doesn't need to be.

    Also, would you mind if I saved your demo and added it to my GitHub account and whatnot? I'd like to have a documentation source for others in the future that might stumble on this post. I didn't see a lot of documentation on the subject past a couple of forum posts and jayderyu 's tutorial.

    Sure ofcoz

    all of this forum's code i guess = free to use/free to copy

  • >

    > > Thanks! But I get how to keep him in the air, and i know how im going to have him keep going, the problem I'm simply stuck with, is how to use a layout of 1280x720 instead of a giant layout of like 12,000x12,000, but keep it scrolling on him even if he's outside of the layout. Right now, the camera just stops following him once he's outside of 1280x720

    > >

    > you don't see?

    > bullet!!

    > add bullet on your player

    > and it will keep flying

    >

    oh i got that, the only thing I had a problem with was getting it to scroll infinitely on x, and y axis but keeping the layout small

    if you want to keep layout small

    i think this is a Different things

    frist,player not move forever!and other scene object add bullet and move

    then when player moved *** distance system spawn new scene object

  • When you have time, is there anyway you could provide a quick example file with how it corresponds to creating movement or controlling movement of another object? I was having a hard time finding documentation to do this. I get how drag and drop works to click and hold an object to move it. What I was not getting, or how to make it possible, was how to drag an object, such as a joystick or squares in your link, to make another object, like the player, move in the corresponding direction?

    I'll admit that there may very well be an easier way, but not one that i understand at this moment. I wanted two joysticks, one to control movement and one to control player rotation. I wanted the joystick to disappear when not in use. I also wanted them to adjust to where the player places their finger on the screen. I didn't want the joysticks to stay in a static position on the screen.

    Edit: To better explain my dilemma from your example, all I'm seeing is two squares with drag and drop behaviors attached to them. How does clicking and dragging correspond to measurement movement to make another object move in a specific direction.

    DO NOT MAKE Problem Complex!!!!!!!!!!!!!!!!!!!!

    http://www.mediafire.com/download/r5nb8 ... idemo.capx

    HERE IS A DEMO MADE BY 1 MIN

    THIS IS A SUPER EASY JOB

    Please do not put any problems complicate

    this is my game

    [attachment=0:eb3ispu9]sendhelp3.png[/attachment:eb3ispu9]

    var nowthis = this ;

    nowthis.addEventListener(Event.ENTER_FRAME,RotationEvent);

    function RotationEvent(me:Event):void{

    var TmpA : Point = new Point(nowthis['TestObj'].x,nowthis['TestObj'].y);

    var TmpB : Point = new Point(nowthis.mouseX,nowthis.mouseY);

    nowthis['TestObj'].rotation = PointRotation(TmpA,TmpB);

    }

    function PointRotation(PointA,PointB) {

    var Pa = new Point(PointA.x,PointA.y);

    var Pb = new Point(PointB.x,PointB.y);

    var Dx = Pb.x - Pa.x;

    var Dy = Pb.y - Pa.y;

    var DRoation = Math.atan2(Dy,Dx);

    var WRotation = DRoation/Math.PI*180;

    return WRotation;

    }

  • Thanks! But I get how to keep him in the air, and i know how im going to have him keep going, the problem I'm simply stuck with, is how to use a layout of 1280x720 instead of a giant layout of like 12,000x12,000, but keep it scrolling on him even if he's outside of the layout. Right now, the camera just stops following him once he's outside of 1280x720

    you don't see?

    bullet!!

    add bullet on your player

    and it will keep flying

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you ready to make the game for mobile

    The key point is which planform tools you use

    eg: phonegap=lag lag lag lag|intelXDK.crosswalkujs@adnroid=very fast

    don't try to use mobile browser play the game

    =======

    about pc&mobile

    just make two Controller

    if user.planform=PC then

    touch UI.invisable

    and enable user to use the mouse ball

  • This is my demo....

    my lovely demo

    http://www.mediafire.com/download/9cvdt ... /test.capx

    Using drapdrop&touch&bullet

  • you should add new var for peers.animation

    and sync that new var

    like this

    [attachment=0:273hdo5x][/attachment:273hdo5x]

  • Mmmh exactly WHERE? I see no FOR there.

    okok

    ====worker:100====

    for

    &

    var worker >0

    then>>>

    worker-1

  • hahahah

    You just make the problem more complicat

    i give you some tips...

    using two DragDrop

    like this http://hkfcp.com/gg

    and then

    all problems gone <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    [test @ iPhone ios7 Safari]

    i never detect touch using touch.x touch.y etc...

    ill use dragdrop and check object.x .y

  • um...just like this i guess

    player gas:100

    player kickasstimes:3

    [1]

    player.KickassTimes>0

    =

    then

    player.angle set to 270

    &

    player.gas add 20

    [2]

    every 0.1s

    &

    player not collision object(land)

    then

    player.angle set to player.angle-1

    &

    player.bullet.speed set to player.gas*10

    &

    player.gas = player.gas-3

    [3]

    when player collision other object(land)

    then

    player.angle set to 270

    player.gas set to player.gas-20

  • my game using ajax+crosswalk working fine

    i guess your APP Permissions setting wrong

    or maybe you upload you capx here

    and i goto help you try

  • like this?

  • Seems Nodewebkit "Run file" not working

    [attachment=0:19tivxdh]upupup.png[/attachment:19tivxdh]

    GAME FILE

    http://www.mediafire.com/download/8p6ab ... /win32.zip

    Use z key to test

  • > I'm making a big MMORPG online game

    > many many npc chat word need to store about 10000line

    > i tried Dictionary&listbox

    > but its very slow!

    > about 10sec

    >

    > please may i ask any good idea about store 10000+line text?

    > the best way i wish to store the file in RAM

    > but i don't know how to

    >

    > thankyou

    >

    Use project files as guys say. And just instead of one massive file make smaller ones per area,location or city. Once in the area, just load it in to array. And you don't need to do it all at once ( since player still has some time to get to location with npc's I assume ), just several lines of code every x seconds (ms). Be gentle

    guess no one Understand my **** english

    my all of NPC chat text == local project file

    not read from server

    if you wanna to know what i'm talking about

    You should try to write your own 10,000*100-word at array/Dictionary

    and read it