Squeakydave's Forum Posts

  • I doubt that could be your problem but you could try changing it.

    I don't know what else to suggest. Do you get any error messages?

  • [attachment=0:2rmi6hmw][/attachment:2rmi6hmw]

    Any help?

  • On your Projects tab in XDK select build settings.

    Then Android-Crosswalk.

    Then set app version to '11' and crosswalk version to 'beta'

    That worked for me

  • I have just encountered the same issues. My game is a pretty simple version of pong so I'm not sure what is going on. It validated but gave me 10 Warnings. 9 of which were CSP violations.

    I also get a:

    JavaScript Compile-Time Error

    Warning: A compile-time error in the JavaScript halted validation of that file.

    Message: missing ; before statement

    data.js

    Anyone at all have any ideas as this came straight out of C2's open web export.?

    Cheers

    Dave

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It seems a bit odd that Google fonts don't seem to work cross platform. I thought that was the whole point. Anyway. I but the bullet and replaced everything with sprite fonts. Painful but now my game looks the same every where - Hurray!

    I highly recommend this tutorial for Sprite fonts:

    https://www.scirra.com/tutorials/629/sp ... ere/page-1

    If anyone has any thoughts or tips about Google Fonts I'd still like to hear them.

  • I have added Google fonts to my HTML5 project. They work perfectly well on PC in Chrome, IE, Firefox and Opera.

    They do not seem to work at all on our 2 Mac's here using Safari or Firefox. They also don't work on a nexus 7 tablet. The project just seems to load a default font in their place.

    Has anyone had any experience of this or know of any work arounds?

    Is it probably a better Idea to do the whole thing as sprite fonts?

  • It seems that AngleOfMotion only works between 180 degrees and -180 degrees.

    and needs to be changed to a 360 range for the example to work.

    So in the previous post:

    ball.Bullet AngleOfMotion > 270

    changes to

    ball.Bullet(AngleOfMotion+360)%360 >270

    Many thanks to R0J0hound in https://www.scirra.com/forum/viewtopic.php?f=147&t=104112&p=779640&hilit=negative+angle#p779640 for the info.

    If anyone at all would care to explain how (ang + 360)%360 works I would appreciate it.

  • Thanks for the formula. !

  • I think I am missing something here.

    When I use this the sprite 2 only moves to the Bullet sprites Y position if the Bullet sprite is moving downwards as well.

  • Your English is great but I'm an artist so your picture is even better

    Many thanks for taking the time to do this. I'll look at it over the weekend.

  • Thanks for the reply though I'm not sure I fully understand it. I have set angle to random (360) to start off with and I'm not trying to set angle of motion, just trying to find out what it is. My idea is that if it is 0 degrees (+ or - 90) it is traveling to the right etc. I'm pretty much a beginner here and maybe that is not the easiest way of finding the direction of travel of the bullet object?

  • I'm doing a bit of a Pong game and I am trying to get the computer controlled paddle to react a bit more that following the Y co-ordinate of the ball.

    I would like the paddle to move to the middle of the screen when the ball is traveling away from it and move to the balls Y co-ordinate when the ball is moving towards it.

    The ball has a bullet behavior and the paddles bounce the ball in the reverse direction. Its sprite is set to not rotate.

    My problem is that I can't work out how to tell which direction the ball is traveling in. I would have thought the bullets Angle Of Motion (as per the manual) but all I get on the ball are 'Compare distance traveled' and 'Compare speed'.

    Any help at all would be gratefully received.

    Dave

  • Check out the tutorials section. There is a great tutorial for a self adjusting text box using the 9-patch

    https://www.scirra.com/tutorials/775/self-adjusting-block-text

  • [quote:8m9yrmod]Here's what I got going

    My layout is 720 pixels tall. I also wanted movement speed to scale down with the PlayerAnimation size too, so the illusion wouldn't be broken

    System: Every Tick

    -Set scale to (1/2160)*(PlayerAnimations.Y + 1440)

    -Set 8Direction Maximum Speed to (300/2160)*(PlayerAnimations.Y+1440)

    I found out that if I increased the denominator to 3 times the size of my layout, and added the remainder back to the PlayerAnimations.Y, I could keep the Y(720) yielding a 1 scale, while having the Y(0) yield me a .6667 scale.

    Thanks for posting. This is exactly what I am looking for. It gives me a 100% sized sprite at the bottom of the screen and not too tiny at the top.

    The trouble is that I don't quite understand how you worked it out and I would really like to.

    If you or anyone else could explain this in an artist friendly way I would very much appreciate it.

  • Oooh breath is baited <img src="smileys/smiley1.gif" border="0" align="middle" />