helena's Recent Forum Activity

  • ZeroBelow I have that project, it was one of the first tutorials I followed. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    R0J0hound I tried as you suggested, push out of solid action, and I thought it would be a good solution. But the ball will just pass through if I choose "opposite direction". When choosing "near" it will go "around" the block in funny way, so at least that one is working.

    If you could figure out the formula I would be very happy.

    To everyone, here I have made another project, but not in CAPX because of your not wanting to download plugin. Tekniko

    http://www.funnybunny.se/files/ballexamples/

    Four examples of different types.

    Look at how the classic bullet would go off in strange angles when sped up or after a while.

    and the classic config of solid walls and bullet would escape at max speed (on my computer at least) but this problem won't happen with the Boundary plugin.

    I hope you will understand what I mean with keeping proper angles AND minimizing risk of escapey ball.

    I know thicker walls = better chance to keep in the ball.

  • Tekniko

    it is ok, you do not have to help me.

    Which movement did you use, if you remember? Bullet?

    Many projects with breakout style games made with C2, including the ones in tutorials and examples (and my own older projects on break out style games), have this problem with bouncing off in unpredicted way once in a while if they use bullet behavior plus collision with solids - Bounce off Object. (for example going into 45 degrees and then suddenly bounce off in like 23 degrees and not -45)

    Boundary plugin is a nice way to keep the ball within the play area without writing too much events.

    But I am open to debate of course, I want to perfect the ricochet process.

    This is just experiment with goal to see if it can be polished into max.

  • I wanted to make a more reliable breakout style game or just ball/ricochet that would bounce off in proper angles and not fly off randomly. (all in the style of 70-early 80s era game) Also not escaping the play field.

    For the not escaping play field I used rexrainbow plugin Boundary which works nicely.

    For the better, more predictable moving of the ball/bullets I used custom movements instead for bullet. It is so much better!! (the "Reverse custom movement" for example to switch the angle)

    The goal is indeed to have a good code even for high speed or low spec computers.

    Here's a capx just be aware you have to have Boundary plugin.

    Use shift to add ball, you can add more balls. The paddle's top will change the ball's angle.

    Left/right arrow to move the paddle.

    Spacebar to pause game, enter to unpause.

    Try add 10+ balls in this game and study how the balls starts to go through the blocks.

    (wait with the first ball until you got the screen filled with at least 100+ blocks)

  • With big offset it looks like the ball is bouncing mid air. So I l lowered to 2 px offsets only. It works in slow but when on low spec or high speed it would be less exact. hmm.

  • Hello.

    On collision with a sprite, how do I figure out which side of the sprite another sprite (ball) is colliding with?

    For example if the ball is hitting the bottom edge of a sprite. Or its left..

    Should work with sprites that are generated dynamically and not slow down with hundreds of sprites on layout.

    I am open to plugins if it shorten down the coding.

    Something like rexrainbow 's Boundary but externally and not clamping/wrapping.

  • Nevermind, it is not sound coding once I added more varied angles from a paddle... the blocks bounce off code is NOT good at all, lol. >_<; I wish I had more talent for math!!

  • Ah, I see. Good luck with your project!

    I grew up with C64 so that's why I caught it. I wanted Amiga but my parents thought it was too expensive!

  • I love that you are doing C64 pallette. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I do not know if you are just going for the colors only, but if you are going to make a game look like a C64 game you have to make the graphic actually look like C64, the multicolor graphic on that machine always have 2pixels wide "pixels". (the resolution is half on the width than the height so one pixel compares to 2 pixels wide for us)

    Better to see example, see that everything is 2 pixel wide!

    https://peukalo.files.wordpress.com/201 ... bruce1.png

    Of course with some genius programming people could make "high resolution" sprites for the main player by adding 2 sprites over each other, bottom "low res" with colors, and top "high red" with the black outlines.

    (on C64 you can have low res and high res at same time, high res = one color only)

    Like this one:

    http://grumbel.blogspot.se/2011/04/c64- ... prite.html

    But only for one sprite because of the very low sprite limit!

    But maybe you were only aiming at using the limited color palette, then ignore my post. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • This little experiment is for the old school breakout style games and similar games where the ball or bullet would ricochet around in proper angles and not stray off at strange angles.

    Plus not leaving the boundary.

    I discovered that Custom Movements is much better than the Bullet behavior for the keeping the angles proper.

    Also, rexrainbow Boundary is great to keep the sprite inside the area and not have problem with escaping balls/bullets!

    What do you think?

    Requires plugin Boundary.

    The ball do go beyond the boundary in high speed/low spec computer but at least it will still be inside the box and not escape or go off in strange angles.

    Feel free to use this example in your works. But please use your own graphic for blocks.

  • Galaga!

    And Astroblaster or Dizasterblaster (same game different names) on C64.

  • Katala, thanks, I will look at it how it compares to sim city!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Global variables is the way to go! Webstorage is overkill.

    Unless you have highscore table you want to save. Or if you want to add save game, then webstorage is good, but for just basic game it is enough with global variables.

helena's avatar

helena

Member since 1 Jan, 2014

None one is following helena yet!

Trophy Case

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

Progress

16/44
How to earn trophies