BadMario's Forum Posts

  • Yeah, it's different if you are used to normal coding, but you can still apply your coding knowledge to what you see in Construct, but you need to sort of wrap your head around it and start thinking Construct 2 way. I was actually surprised how easy it was. I only did that basic tutorial and read a few things from the manual, then just look up the rest as needed..

    Found only one case where it can't do what I want it to do without making things complicated compared to what I used to do in Flash.

  • [quote:30v9rvtt]Web is easy, it just reloads the new version.

    Apps are easy - push an update to the app store.

    In a perfect world yes. A lot of the time does not work at all.

    I guess this depends on browsers and whether you add some code manually to your index.page, but a lot of the time it goes like this:

    Upload a new version of construct 2 html5 export to your site and keep hitting refresh until your hand falls off, you will still see only the cached version until you delete your browser cache.

  • Probably keeps setting sleep animaton every tick. Make sure it runs only once, once player falls down, otherwise it will be stuck at frame 1 because it keeps repeating ( play sleep animation ).

    Also when using physics, probably better to use a dummy object with physics behavior, then pin actual animation sprite to that ( no physics on this one ) , so frame changes don't interfere with physics. Hide dummy object on a bottom layer under backgrounds once it all works the way it's supposed to.

  • 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.

  • [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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.