Yann's Recent Forum Activity

  • It's possible with ajax, but ajax works on the same domain the page is on.

    Won't work to call .txt from other domains.

    dialog.capx

    Works fine here

    http://dl.dropbox.com/u/23551572/C2-Gam ... index.html

    But I'm pretty sure it won't work if you export the .capx in your own webhost.

  • you made 2 mistakes and I made 1

    Although I don't know why, I had to add the layerangle and not substract it. It doesn't make much sense to me.. but heh that works now

    sniper.capx

    by the way your first mistake was that you didn't copy my formula correctly (you substracted distances instead of multiply them) and the second is that you didn't calculate position on a per instance basis but in a global value and from the position of the target (thanks for translating your capx <_< I'm traumatised by german since highschool)

  • Or don't use layer rotation, just rotate the helico and make the layout angle follow the helico angle (:

  • lilypadding.capx

    WindowWidth and WindowHeight are the real size of the display. either you put fullscreen on scale or crop mode, if you have a 1920 by 1080px like me (who has bought a dual screen 2x24" recently and can't seem to stop to brag about it) WindowWidth will be close to 1920 with a browser properly stretched.

    But the value you want is 640 since you scale to fit the display.

    If you were in crop mode you would use WindowWith, but there you have to create your own variable with 640x480

  • Yeah layer projection is a pain

    I don't use layer angle, but if the center of rotation is the center of the layout, basically the conversion is quite simple

    if X and Y are the position in the unrotated layer

    rX and rY the same position in the rotated layer

    cX = Layoutwidth/2

    cY = Layoutheight/2

    you just have to take the point and counter-rotate around the center of rotation of the layer, with the same angle.

    It's exactly the same formula as the other topic on planete rotating around a sun

    rX = cX/2+cos(angle(cX,cY,X,Y)-LayerAngle)*distance(cX,cY,X,Y)

    rY = cY/2+sin(angle(cX,cY,X,Y)-LayerAngle)*distance(cX,cY,X,Y)

  • Yeah it was the aim of the 'trigger once'.

    I didn't wrote it nicely I think you misread that the 'trigger once' was a nested condition

    +Keyboard: down arrow is down
      -> Sprite: set crouching to true
      -> Sprite: set Platform vectorX to 0
      -> Sprite: set Platform vectorY to 0
      -> Sprite: Platform start ignoring control
      +System: trigger once
        -> Sprite: set animation to 'crouch'
  • just the angle between the mouse and the character

    angle(character.X,character.Y,mouse.x,mouse.y)

    you plug that in the formula above and that should do the trick

  • oh! right click ok

    nice (:... maybe the moon should go behind the text 'cause it's pretty close in values and it blends a bit too much with the title. So either way from the center, either a bit darker (:

  • the mask should be in destination-out and your layer should be set to force own texture = yes

    Also, don't do it in the first layer. You'll dig a hole in the canvas and see the grey behind it :D

  • RicardLF

    You can also describe a basic IA algorithm and some people used to fiddle with c2 could tell you if it's easily doable or not by event or if you should create a plugin (the might even provide an implementation example).

    Anyway, IA shouldn't be an issue with C2. Saving and loading stuff seems to me more problematic than that.

    Also Kyat did a behavior plugin for pathfinding. And I think pathfinding is a basic form of game AI. So yeah... pretty doable.

    And even if you are skilled programmers, you should start with some basic tutorials. Because even if in my point of view, C2 is a form of programming, it is very unsettling for those used to scripting.

    By the way smitchell's answer made me think of a water simulation I did on construct classic. I could do the same with c2, it's just a bit hard on CPU.

    waterSim.exe

    It was just an algo I found on the net (it was written in java) and I adaptated it.

    Did the same for a maze generator from a ruby algo

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • System -> Create

  • I also may add that for awesomely big world, you could use random seed.

    The idea behind that is that all number returned by this kind of random() function would always take your seed number at a start and return every time the same numbers.

    Because you might not now it but a random doesn't really exists in a computer world. Random() function are series. You take a starting number and then always apply the same operation to have the next pseudorandom number.

    Well now that I've explained that for those who didn't know.

    If you apply the same random operation for creating your big world, you can understand now that if you have the same serie of randome number you'll generate the same exact world.

    Then basically you could store an entire world in one single number (and I believe it's how minecraft works). Then you just have to store what has been modified in this world. Which would be far less than the big world.

    The only downside is that generating the world, if it's a really big one, could take some time.

    But there's some ways to split your big world in tiny ones (that's the purpose of Arsonide's gridTree plugin for Construct Classic) to avoid this overhead (also minecraft might use something like that).

    That's all (:

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann