AllanR's Forum Posts

  • Yes, you have the 3 enemies on the layout (at the top), and then in your code at the start of the layout you create one of each, so you end up with doubles.

    Normally, at the start of layout I Destroy objects like your food and enemies, and then create them as needed...

    since you have code that recreates the enemies when they get destroyed, if you have your game destroy them at the start of layout they will automatically re-spawn.

    so, either have the start of layout code destroy them, or just set their positions to a random location. But either way, take out the lines where you create new ones at the start.

  • phartron

    ok, I played with your file - the problem is that you are asking for fullscreen Centered.

    Your layout is 1920 x 1080, but your screen isn't that resolution. So, it is giving you the layout you are asking for and then centering it in what is available.

    I have two monitors in front of me - one is 1920 x 1080 (and that works the way you want), the other is 1280 x 1024 (and it looks very similar to what you are getting).

    So, you need to choose one of the stretch settings if you want your game to fit any screen. If you need the full 1920x1080 then choose Stretch letterbox scale - but you will get black bars if the screen is a different resolution that can't be evenly stretched to fit. If you want to use the whole screen without black bars then you should choose Stretch scale outer - BUT you wont get 1920x1080 if the game is running on a monitor with a different resolution, which means it is up to you to make sure everything adjusts to use the space available!

  • phartron

    what may be happening is that the top left corner of the screen is no longer 0,0

    So, you can try Pin, but I usually have an event:

    On Browser Resize -> Wait 0.2

    -> Sprite - set position to ViewportLeft(0), ViewportTop(0)

    since the origin of your sprite is the middle instead of top left corner, you would have to do:

    Sprite - set position to ViewportLeft(0)+sprite.width/2, ViewportTop(0)+sprite.height/2

  • Ninjadoodle

    just played a few more times - got 27 twice, and then had a great run of 104.

    another thing that would be nice is if it told you what your score was at the end because it is easy to not pay attention, but then wonder how close you were to beating your score...

    I don't think you have to make it harder. Eventually you will make a mistake, or the teleports will disappear at the wrong time, or the flame will get you. A run of over 100 is still only a minute or two.

  • Ninjadoodle

    really good job with all your games so far! I like the simple designs/concepts. I just got 25 on cursed jewels...

    one bug is that sounds still play if you turn them off in settings.

  • heyguy

    you can use:

    choose("option1","option2","option3")

    and it will randomly pick one from the list... and assign it to a text variable or use it in a condition in an event, etc.

  • Hypozonic

    well, I played around with your game quite a bit, and made lots of changes... and there are still a lot of things I would do differently, but I have other things I should be working on :)

    to make the enemies not target food outside the layout, you have to make sure it is out of range, or better yet, destroy all food at the beginning of the game (Start of Layout) - before new food starts to randomly generate.

    I made the mouse wheel zoom in and out of the layout so that I could check up on all the enemies...

    I made the enemies bump apart if they run into each other, and look for new food.

    I also tried a alternative method to find food for the dark enemies (using a "detector" sprite instead of line of sight. That lets you select whatever food is near the enemy and then choose the closest.

    For some reason the path finding sometimes just fails to find a path, so in the dark enemy section I have it just randomly put the enemy somewhere else and try again...

    Now, the only time I have seen an enemy get stuck is if it is trying to get to a food near the edge of the screen but can't quite get there. (You can click on an enemy and the food it is going for will flash).

    I made the dark enemies grow much faster than you had them, just to speed up debugging...

    you can download my version of your game here:

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hypozonic

    I think the problem is that you have the background image set as solid, so the line-of-sight never sees any food, because the entire layout is one giant obstacle. When I turn off solid on the background it seems to work fine...

    other bugs: you are destroying food when the enemy arrives at the target position, but it doesn't remember the specific food that was targeted, so it destroys ALL food. You want to destroy the food when the enemy collides with a food - then only that one will be picked and you can destroy it.

    also, sometimes the enemies set a path that wants to take them off screen, but they can never get there so they get stuck at the edge of the screen...

    oh, the reason they were going straight down was that you have the initial food object below the layout, and the enemies were targeting that...

  • jtraskelin

    Here is how I set up the screen for scale-outer... I don't see any problems on my iPad or iPhone. pixels don't look distorted to me.

    One of the tricks to arranging things is to remember that the top left corner of the screen is probably not 0,0... it is surprising how subtle that assumption can be.

    anyway, try this and see how it works: https://www.rieperts.com/games/forum/screen_test.c3p

  • I don't have a C3 subscription (yet), so there is limited testing I can do with your game since it far exceeds the free limits. But the main problem I see is that you are checking for collisions between the explosion and Enemies family - and each enemy is made up of two parts, a blank sprite and an animation sprite. Both of those are part of the family and collide with the explosion, so the score gets incremented twice for what is supposed to be one kill...

    with the brains, you are only checking for collisions with each of the empty sprites, so that is working the way you expect.

  • the easiest way would be to add an action for the clock hand to:

    "Set Angle Towards Position" and use Touch.X and Touch.Y as the position.

    as long as the origin of the hand is the base of the hand, and the hand points to the right (zero degrees) initially, it will work...

    however, if you want the hand to ONLY point exactly to a number, then make each of the numbers a separate sprite, and put them all in a family. Then when you touch any family member, set the angle of the hand to the number's position.

  • crucibus

    you wont have any trouble with images that size. I have a project with 7 large picture (1920x1200) and it loads fast, and had no trouble on my ipad or iphone...

  • R0J0hound

    I have only played with the trifill test (so far) and that curve through 3 points is AWESOME!!

    fantastic work!

  • andreluizgollo

    I have been working on a tetris clone for a while too... I have been trying to copy the way the old iphone Tris game worked (before EA killed it long ago) - it was by far my favorite tetris game. I had it on my phone up until not too long ago when it finally was no longer compatible with iOS. I really liked how smoothly the pieces moved...

    you can drag a piece left or right, up or down, a swiping motion down will drop the piece. a tap rotates the piece.

    it has been difficult to duplicate the feel, but I think I am getting close. What I do is track how far a touch has moved from the initial point, and how many ticks it has been in touch. when the touch ends, if it has moved less than a minimum threshold, and for less than a set number of ticks, it considers that a tap and tries to rotate. If the touch moved more than a certain threshold down, but not horizontally, and for less than 15 ticks, then it considers that a swipe down and drops the piece to the bottom.

    that way there is no delay in moving the piece... you start moving the piece right away, and decide later if it was a tap or swipe.

    you can try my version here: (although it is still really buggy). https://www.rieperts.com/games/tetris/

    one of the problems is that I don't have the piece drift to be aligned to a column when you stop dragging yet. if it can't move it snaps into place before it locks the piece down... I had it rounding off to the nearest column, but if it was less than half way to a column it would snap back and that didn't look right so that is turned off in this version.

    if you drag too long the movement gets weird, and right now, it doesn't limit how long you can drag it upwards, and this version never speeds up...

    I was also testing particles - other interface things that only partially work so it isn't ready for anything other than proof of concept, lol :)

    oh, if you are playing with keyboard and mouse, the pause and restart buttons don't do anything (they do with touch). But you can press "P" to pause, or press space bar to restart...

  • NAF

    I played again today - and made it to level 13 again...

    the speed they move at is working really well - the only serious problem is when you have a bunch of them corralled into a confined area and want to squeeze them in to completely trap them. If you can pick them off one by one it works fine, but that isn't really possible at higher levels since there are so many of them. The one closest to you gets "stuck" because it almost never has room to move, so the square he is on almost never is free to push a box in. And as you move around the outside of your "trap" they follow you inside, so you can't easily push the walls in to finish them off...

    so, either their AI has to change if they are confined, or if they can't move because of other bad guys, they need to be push-able... otherwise, game-play suffers.

    anyway - like I said earlier, you have a great start and it is a lot of fun already! :)