nantas's Recent Forum Activity

  • And if for some reason I did want to do vector stuff for the web I'd just go back to using Flash, because that's what Flash does. No reason to reinvent the wheel. Especially since Flash has perfected that particular wheel.

    That says it all. Please focus on what C2 does best and features that user can't get from other sdk/engine. Don't get involved in some stupid "html5 vs flash" crap. It's not a competition, it's a matter of variety and specialty.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi it's me again. The question I asked in the OP is perfectly answered. But I would like to use this thread to post my other questions from my first project, so anyone can check the latest progress of the project and see the problem solution better. Please tell me if it's appropriate or not.

    This time I got stuck on some physics simulation. I would like to shoot arrow and let it move along a parabola. I want to make it simple so let's say the horizontal velocity of an arrow is a constant value. And during its flight the only force in effect is the gravity.

    I tried to use Platform behavior at first, to quickly get the movement and gravity going. The gravity works, but I can't apply a initial speed other than towards angle=0. I found it very confusing that the gravity seems to change its direction when the object's angle changes. So I can't fire the arrow with a upwards angle and expect gravity to work towards bottom.

    After messing around for a while I decide to drop all movement behaviors and write the movement logic myself. So I added 3 instance variable "Vx", "Vy", "Gravity" and use dt to calculate the position of the arrow for every tick. I won't describe the events in detail here, you can see it easily in the project.

    For some reason I can't get the behavior as I want. No matter how I set up the initial velocity Vy and Gravity, the arrow will always flying downwards. Where did I do wrong?

    Also at the end of the event sheet I have a group of event handling the angle of the arrow sprite (just sprite rendering, not angle of movement speed). Since C2 uses clockwise angle it's a bit confusing how to correctly apply trigonometric functions. If you could take a look at that part it would be very helpful to me :D

    Here's the download link of the project again:

    arrowTestGame

    Thanks a lot!

    ============================================

    EDIT: After I posted this I found the thread discussing about gravity:

    scirra.com/forum/general-gravity_topic44414_page1.html

    And the example posted in this thread is very helpful. I soon realized that I messed up C2 x,y coordinate with math x,y coordinates. I did all my math assuming y is increasing when moving upwards! So stupid...

    After that sorted out. My script works finally!

    Again all the problem I got so far is due to my lack of knowledge and C2 is very well designed!

    Here's the project file that has the correct coordinate setup. If someone has similar question, you can compare the two to see what's wrong.

    Working Project File

  • Hi Ashley, thanks for the information, I got it work like a charm! That's very fast reply and clear instruction. I love this tool and the support very much!

  • Hi there I'm a new user of Construct 2. So far I like it a lot!

    I got some problem with my first project. I can't get the "compare two value" condition to work. So I want to check the value during runtime to make sure they are correct. I've searched the forum and internet, a lot of people mentioned you can enter "debug mode" and do this/that. But I can't find any information about how to enter debug mode with Construct 2.

    Can someone show me a direction?

    Also here's my project, I want to compare the position of mouse.X and player.X and flip the sprite accordingly. No response so far. If someone can show me how "compare two values" work in this situation it would be much appreciated as well!

    dl.dropbox.com/u/1397194/arrowGameTest.capx

nantas's avatar

nantas

Member since 3 Sep, 2011

None one is following nantas yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies