Yann's Forum Posts

  • vars.lastsound and not "vars.lastsound" (no quote)

  • The first one: basically when you use the eraser brush, you can't erase the first row and column of pixels

    <img src="https://dl.dropbox.com/u/23551572/C2/Report/bugs/imageEditor/border1.png" border="0" />

    The second one: when you use the line tool with smooth mode active, the first row and column of pixels gets blurred with alpha

    <img src="https://dl.dropbox.com/u/23551572/C2/Report/bugs/imageEditor/border2.png" border="0" />

    Maybe it's graphic card related bug so here's my spec:

    OS: Windows 2008 server r2 (64-bit)

    Graphic Card: Nvidia GeForce GTX 460

  • you could do a

    -> enemy: spawn bullet

    -> bullet: set angle toward mouse.X,mouse.Y"

    -> bullet: set angle to angle+random(-10,10)

  • posted a link a while a go didn't I

  • same link

  • I know nothing it's just logic. Your problem was caused by some imprecision, by using a grid movement system you're 100% accurate, then it's just a matter of changing direction.

    Ok I lied, I know unit circles and affine functions. But well... almost everybody learn that in highschool.

  • I went to artschool actually...

  • if you understand the code, it's just one line to change

  • easier with a grid movement type of algo botAI.capx

    you can even set the speed super high like 10,000 px per second, you won't lose any bot

  • Wastrel and you haven't even tasted them yet!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can save the X and Y position of your object each tick in two private variables, and then

    if there's overlapping

    • > fall back the the previous position
    • > then randomly pick any of the 3 cardinal directions your object wasn't moving toward (loop three or four times)

       -> check each time if you won't run into a wall again (overlap at offset)

       -> and then apply and break the loop

  • +Monsters is overlapping region
    +Bat pick by UID Monsters.UID
      -> do Bat related things
  • Remember that the window size must be bigger than the layout size

    Actually, that's the opposite (:

  • First, your road sprite aren't really well designed. You shouldn't split the road in half. You should create a whole section of road and also create intersection sprites of the same size. Here in your cap you can't create a T intersection for instance. Then you start to see that you'd need many more sprites.

    Second, one of the way to generate a street would be to create the road network first. By road network I mean simple 0 or 1 in your array to figure out if it's a road cell or a non road cell.

    Then you just have to spawn the road sprite and check their surrounding to display the proper frame.

    Now the algo to create such a road could be :

    loop until you can't find any available cell

    • > cell at X,Y = 1 (1 = road, 0 = no road)
    • > choose a random direction between (1,0) (0,1) (-1,0) (0,-1)
    • > if the next cell is a valid one (not already a road cell and not out of grid) set X and Y to it.

    But then you will have a simple path without branching. For branching you'd have to go back in the road you've made and check for other adjacent available cells.

    Anyway, look at some maze algorigthm you might find some good tips.