AllanR's Recent Forum Activity

  • the art looks great.

    do you have idle animations? you could just stop running the animation when it gets to its target, but it would look better to have an idle animation.

    I am not really clear on what you have in the array? just the animation name? you could add extra columns for different animations:

    Array_Player_Full.At(Player_Select,0) for idle

    Array_Player_Full.At(Player_Select,1) for walk

    Array_Player_Full.At(Player_Select,2) for run

    Array_Player_Full.At(Player_Select,3) for Attack, etc...

    or skip the array, and set Player_Select to the character type (Warrior, Ninja, Wizard, or Knight) and then set animations as you need like this:

    Set Animation to Player_Select & "_Idle"

    or Set Animation to Player_Select & "_Walk"

    in events 11 to 15 I see you checking Stage and starting to move the character to a destination, but I don't see you updating Stage. That means those events will happen every tick. Once a sequence has been started, you should update Stage, or add a trigger once. then when the sequence finishes, set animation to Player_Select & "_Idle"

  • in event 6, just add some time to ShootSpaceship.

    if you want the spaceship to shoot 10 times a second, set ShootSpaceship to 0.1

    for 5 times per second, set ShootSpaceship to 0.2

    for 3 times per second, 0.33

    twice a second, 0.5

  • I have used much bigger arrays without any problem.

    I read somewhere that javascript uses an average of 9.7 bytes per cell, so a 24,000 cell array would use less than 240K of memory. You could quadruple the size and still be under a megabyte.

    graphics take up way more space!

    brunopalermo's suggestion is good, and would be slightly quicker to search through, but I doubt you would actually see any difference.

  • check out this thread too:

    https://www.construct.net/en/forum/construct-2/general-discussion-17/trajectory-arrow-118686?kws=angry_birds.capx

    I have a couple samples on there that shows a trajectory in an angry birds type game. The one that uses Chipmunk physics is a better version (but requires the chipmunk plugin).

  • like plinky said, the Set Item was in a bad place - that whole group was running every tick - 60 times a second, continuously resetting the buttons... and there were a lot of other bugs and issues.

    you can't know what the MaxLevelWon is until after the array is loaded from local storage.

    the State variable on the LevelSprite was not really necessary since the second column of the array was being used to tracking whether a level was locked or not. So, I simplified things a bit.

    the SaveEvent even sheet wasn't very useful - and definitely not needed on each level layout (so I removed it). Once the array is loaded from local storage, it is global (you don't need to load it again when a level starts). The proper time to save the array to local storage is when a level is complete.

    I made a number of other minor improvements, plus added at button to reset progress (delete the local storage item) for testing purposes...

    https://www.rieperts.com/games/forum/levels.c3p

    I wouldn't say this was extremely simple. Arrays give lots of people trouble, and so does local storage. I have seen tutorials on how to lock and unlock levels that didn't actually work and gave people really bad advice!

  • I am not a 100% sure, but that seems to want to return either true or false - not one of the values you want.

    I would use

    Set GotoX to choose(Cruiser.X+random(20,40),Cruiser.X-random(20,40))

    Set GotoY to choose(Cruiser.Y+random(20,40),Cruiser.Y-random(20,40))

  • you do it in the event sheet - System Create Object ArrayName

    you can also add an array to a container. Then, whenever an instance of the container is created the array will also get created (and automatically picked with the container).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yes, the whole array is converted to JSON and saved/loaded as a single string.

  • I gave it a try...

    every tick I calculate the distance the mouse is from the middle of the face - between a max of -100% and +100% in both x and y axis, then move each eye that percentage of the max distance it is allowed to move.

    the face is a container, that has the face, a left and right eye, and an eye background. That allows for multiple faces to be on the screen at once, and each set of eyes gets set based on where the face is in relation to the mouse...

    the faces have drag and drop so you can move them around. add a face by pressing Z, delete a random face by pressing X, change the scale of each face to a random value between 50% and 200% by pressing Space.

    https://www.rieperts.com/games/forum/face.c3p

  • I don't think there is a standard way to do it...

    when I need a lot of buttons, I find it easier to have one button sprite (with a normal, hover, and down animation), and I then pin a text object to each one for the text (and sometimes an icon as well). That would allow for easier translations...

    the only issue I have had with this approach is if the button is then pinned to something else - then the text lags behind the button a little. So, what I have to do is pin the text to the same object that the button is pinned to. Then everything moves nicely together.

  • html elements like buttons and text boxes will automatically scale themselves like that to try to keep as much on the screen as possible. Another issue with html elements is that they float above the canvas, so nothing can ever pop up above them. Different browsers can render them slightly differently as well. You can also run into focus problems...

    using images as buttons solves all those issues. There are a couple things to watch out for when using images - if you have overlapping image buttons, a click will happen on both if the mouse pointer is over both, so you have to make things work the way your players expect. Plus, things can get a little tricky handling multi-touch properly. All things considered, I much prefer making my own buttons with images.

  • there really are only two options - either set up your layout so the player can never get close enough to the edge to prevent a screen shake (if there is no more layout available to bring on the screen, then it can't shake).

    or turn on unbounded scrolling, but then you have to make sure your character can't leave the area where your graphics are, and that there is enough background beyond the edge so that when it shakes the screen you don't see the white edges with nothing on it.

AllanR's avatar

AllanR

Member since 21 Nov, 2013

Twitter
AllanR has 23 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • 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
  • Email Verified

Progress

20/44
How to earn trophies