BadMario's Recent Forum Activity

  • well. itsort of is in that code.

    set each wall either as a variable ( leftwall = 0 for example ) or if using the actual object it would be leftwall = leftwallobject.X+leftwallobject.Width/2

    if ball.X < than leftwall ball.X= leftwall+ball.Width/2 and also multiply x speed by -1 to reverse it.

    Do same for each side, obviously for the right side it will be if ball.X > than rightside

  • Isn't a bounce basically a negative value of x speed and y speed ( - drag/friction if necessary ), so if something is moving at yspeed of 10 and hits the bottom, y speed becomes 10*-1 ( or *-0.9 to simulate slowdown due to friction ) x speed stays the same. Hitting sides you multiply xpeed by -1 and y speed remains the same.

    At least this is the basic way to do it, no angles are necessary.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:3591pwod]sorry, i have a simillar problem

    when a game run on a iframe run in touch device(mobile o desktop simulation touch)

    onTouchedObject event on a Sprite ("touch start")

    this event is called twice(on "start" and "end" touch interactions)

    is call twice .

    this problem occurs when the game runs on an iframe (I think).

    I had the same problem that was ruining the game.

    Solution: disable touch - use mouse input in touch properties.

    Then have separate Touch and Mouse control groups which you enable or disable depending on how a player starts the game ( touched or clicked first )

    The problem was that in iFrame a single touch would count as touch and mouse click.

    In most games this doesn't really matter, but in some it does.

  • I think using a button object on top of whatever you want to touch to request full screen ( set button opacity to 0 via CSS style ) is more reliable.

    Then on touch/click button request full screen

  • [quote:qgolp2ei]But why use a text object at all? You could use a variable or arrays to store the text that should be displayed. Your way seems like a very unlogical way of doing it. Sounds like you should just use spritefonts instead which is exactly what you need without the unnecessary events. It works just like the text object but a lot more optimized. Just set the text with one event and you're good to go.

    When I started using Construct that ( using text ) seemed the quickest way to do it. I'm sure there are other ways, but if it works why bother. I was already using it to display scores and debug stuff, so it was simple to just grab info from there instead of creating arrays and other stuff. Now that I have already done it, just copy paste into another game.

    No, sprite fonts may not work with this. Using effects like glow, bevel and whatever else on text in Photoshop just looks better.

  • You can disable physics for objects, then turn it back on when needed. That is what I usually do. For example if absolute y speed is less than 1 disable it and it should sit on another object as expected. I do it all the time, almost every game.

    When to turn it back on depends on what it is you're trying to do. As soon as you touch it to drag it, when another object is close enough and about to hit it, and so on

    If the problem is only not sitting on top of another box, just increasing Physics world stepping, velocity and position, to something like 15 and 10 may fix it.

  • I take care of textfields this way; hide them on a bottom layer and drag outside of layout. Then I use a sprite with number graphics from 0 - 9 ( 10 frames ) to display whatever is in Text1,2,3,4, whatever ( usually timer, score, health pct. ).

    You could do the same with letters, but I find that most text that needs updating uses numbers anyway. I started doing it this way because it looked better, I could use any font and effects I wanted to without making each number anything more than a frame in a simple sprite.

    Seems that also works better as far as optimization goes too.

    The only game I have on the arcade here has a timer done like that: https://www.scirra.com/arcade/sports-ga ... 18939?cp=2

    Not sure about iPhone, but on a 5 year old laptop CPU usage is around 2-3% when playing that game

  • I don't think he's asking about that. Sounds more like websites like Kongregate, Softgames, Gamepix, Spill, Y8, etc....., not actual console/PC games publishers.

  • Does it work with regular HTML 5 export? let's say pre-game ad then between levels? I guess it would have to use adsense because admob is mobile only. ( By the way is admob mobile only as in .apk and ios wrapped, or does it work on mobile with html 5 games ).

    I have a dozen games ready to go soon, and really need to look into this and figure out the best solution.

  • Well, time is NOW!! for ads, Holiday season starts soon, and if it's not ready to go in October huge wasted opportunity. Ad revenue can be 3-5 times better from mid/end of October to Xmas.

  • Well, then just stick another sprite ( hide it under solids/walls layer ) which is not solid and check if your see that. That way you have solid walls and you can see them ( may have to have the visible sprite stick out a few pixels )

  • Because there is no such thing as frame rate independence. DT is like taking a pill for your headache, alleviates the symptom, but doesn't cure the actual problem.

BadMario's avatar

BadMario

Member since 3 Sep, 2015

Twitter
BadMario has 2 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies