mOOnpunk's Recent Forum Activity

  • > I guess you would have to check for a command then when a command is recognised then act on it.

    >

    > mytextbox.text = "Player.Angle.40"

    >

    > set player.angle to int(tokenat(mytextbox,2,".")

    >

    > mytextbox.text = "Player.Movement.Horizontal.Right"

    >

    > set player.x to player.x+1*60*dt

    >

    > etc.

    >

    While the second one works, the top one would only allow me to input that value, IE the command only works and sets the value if it is 40

    Ah yes, you are right. if the inputted text is "Player.Angle.40" we could check the command without the .40 part so you could do,

    system object, compare 2 values,

    left(mytextbox,len("Player.Angle")) = "Player.Angle" , set player.angle to int(tokenat(mytextbox,2,".")

    so waht you are doing is getting the characters in the string starting from the left for the length of the text without the ".40" and seeing if it matches the command witout the number.

  • I guess you would have to check for a command then when a command is recognised then act on it.

    mytextbox.text = "Player.Angle.40"

    set player.angle to int(tokenat(mytextbox,2,".")

    mytextbox.text = "Player.Movement.Horizontal.Right"

    set player.x to player.x+1*60*dt

    etc.

  • If the format doesnt change then "Player.Angle.40" is basicly a string of tokens with "." being the seperator, so you could do -

    set variable to int( tokenat( mytextbox, 2, ".") )

    where mytextbox is the text box holding the string, 2 is the 3rd token in the string (starting at 0), and "." is the seperator. The int() then turns the "40" text into a number.

  • I havent noticed any issues running my game, however for me its the editor. When i reach around 1000 events the editor begins to lag and menus take a while to open. I filed a bug report but they didnt seem interested in investigating since i couldnt provide a way to reproduce, though i submitted a profile.

    I think it has to do with this blog post https://www.scirra.com/blog/ashley/35/layout-is-the-next-frontier-of-web-app-performance about how slow the layout is. A result of their decision to put the editor in a browser. I just have to put up with it i guess. I turned off menu effects and things, and there was a recent update to the layouts which may have helped.

  • I think the browser plugin can change the game to fullscreen.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Since the game level is a board and people move on squares in a grid, you could find the square you want to move to, mark that sqaure as 0. Then go outawards in a circle pattern so the next squares surrounding that would all be 1, then go outwards again and all those squares would be 2 etc until each square on the board is covered. Dont count squares with a wall as you cant move there. Now all the person who is moving needs to do is to always move each step towards the sqaure with the lower value to the square its currently standing on to move there.

    You could artifically inflate the value of squares under certain conditions to make those squares less attractive to move to, such as if an enemy drops a bomb then that would add say 100 to the sqaures value and would radiate 99, 98, etc for the bombs explosion range. The person would avoid those squares and find a path around them.

  • I think Bomberman uses a minmax algorithm like chess where all possible moves and outcomes are tested then the best result is chosen. I don't think its possible to do it with events as it would be too slow and complex.

    An easier approach (which has its owns problems) is some thing like this https://www.gamedev.net/forums/topic/622051-ai-for-simple-bomberman-game/

  • - Preview, debug.... button on main screen. Is it possible to make them all visible?

    There is only a "Preview layout" button and a little arrow to press on to show more options. It would be nice to be able to customize it to show more then one button.

    I already asked them to put back the debug preview button, it seems their server can track how many times a button is clicked, apparently not enough people clicked on them so they put them all under the little arrow. It's all about the hot keys don't you know.

  • I don't use any collision detection in the game, and it doesnt matter if its not grid based, you can just use sort by y position ascending.

  • The way i did it for my sim game was to have the tiles on a bottom layer, then another layer above for the buildings and people. I kept it simple by putting only the buildings and shadows into a family to z order. Once i sorted them i then picked each of the shadows child character by storing the characters uid in the parent shadow and moving it above its shadow. This means no matter where the child is it is always correct to the parent. Notice how the people characters can bounce, and how the ships are also correct and building icons too with no worry for origin points.

    Sorry for poor quality.

  • I'd also really like to have these suggestions.

  • Gigatron i will try it. Thank you.

mOOnpunk's avatar

mOOnpunk

Early Adopter

Member since 29 Mar, 2017

Twitter
mOOnpunk has 2 followers

Trophy Case

  • 7-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

13/44
How to earn trophies