lennaert's Forum Posts

  • I applied a similar concept here for movement:

    Check my capx near the bottom.

    the lookx and looky variables continuously gets synched.

    when the peer presses and holds the button, it uses the lookx looky as data for the targetx targety.

    This exact same concept can be used to do your aiming.

    while getbit x = 1

    -place the target cursor at the self.targetx,self.targety

    -distance/angle(self.X,self.Y,self.targetx,self.targety) for the width and angle of your line from player to target

    -set boolean armed = true

    getbit x = 0

    boolean armed = true

    -fire

    -set boolean armed to false

  • update `table` set counter = counter + 1 where id = 1

    Thats a bit of sql right there, assuming you have a table called "table" and that it has at least 2 columns, id and counter, and a record with id of 1.

  • When a peer is holding down a mouse button or is in touch, you set the corresponding inputs variable its bit to 1.

    When you let go, the peer sets the state back to 0.

    This effectively leaves the host with a 1 or 0 for the mousebutton input from the peer.

    So on the host side of things, when you want to recognize a peer holding the mouse, you test if the inputs corresponding to the mouse/touch, is 1. If it is, the peer is pressing the button. If it is not, the peer let go.

  • Slick

  • Here I solved it for you, only required some smart tweaking of event 72.

    The idea behind it:

    all peers synch their lookx looky, when a peer is holding down the mouse it will update its targetx, targety, used for movement. When you let go it takes it current self.x self.y and sets that as targetx targety, making the player stop.

    The host determines the actual movement while the peer is trying to force its own, these combined leave you with a somewhat smoother mechanic.

    https://dl.dropboxusercontent.com/u/713 ... ement.capx

  • There are not many tutorials around relating to multiplayer.

    The problem lays in its diverse application in relation to needed mechanics.

    So many roads to Rome ...

  • I dont know. I never used such large values but I used it for a long text and Scrolling down on a long layout. I could try it on a WinPhone and it worked fine. :/

    Yeah then it sounds like the same limitation of image sizes apply to the text.

    Know iOS Resource Limits

    Your webpage performing well on the desktop is no guarantee that it will perform well on iOS. Keep in mind that iOS uses EDGE (lower bandwidth, higher latency), 3G (higher bandwidth, higher latency), and Wi-Fi (higher bandwidth, lower latency) to connect to the Internet. Therefore, you need to minimize the size of your webpage. Including unused or unnecessary images, CSS, and JavaScript in your webpages adversely affects your site’s performance on iOS.

    Because of the memory available on iOS, there are limits on the number of resources it can process:

    The maximum size for decoded GIF, PNG, and TIFF images is 3 megapixels for devices with less than 256 MB RAM and 5 megapixels for devices with greater or equal than 256 MB RAM.

    That is, ensure that width * height = 3 * 1024 * 1024 for devices with less than 256 MB RAM. Note that the decoded size is far larger than the encoded size of an image.

    The maximum decoded image size for JPEG is 32 megapixels using subsampling.

    JPEG images can be up to 32 megapixels due to subsampling, which allows JPEG images to decode to a size that has one sixteenth the number of pixels. JPEG images larger than 2 megapixels are subsampled—that is, decoded to a reduced size. JPEG subsampling allows the user to view images from the latest digital cameras.

    The maximum size for a canvas element is 3 megapixels for devices with less than 256 MB RAM and 5 megapixels for devices with greater or equal than 256 MB RAM.

    The height and width of a canvas object is 150 x 300 pixels if not specified.

    JavaScript execution time is limited to 10 seconds for each top-level entry point.

    If your script executes for more than 10 seconds, Safari on iOS stops executing the script at a random place in your code, so unintended consequences may result.

    This limit is imposed because JavaScript execution may cause the main thread to block, so when scripts are running, the user is not able to interact with the webpage.

    See the Safari Web Inspector Guide for how to debug JavaScript on iOS.

    The maximum number of documents that can be open at once is eight on iPhone and nine on iPad.

    iOS Note: In iOS 1.1.4 and earlier, the JavaScript execution time was limited to 5 seconds and the size of allocations to 10 MB. Also, the limit on the size of canvas elements was the same as Safari on the desktop.

    In iOS 2.2.1 and earlier, the sum of all of the frames needs to be less than 2 megapixels—that is, width * height * number of frames = 2 * 1024 * 1024. In iOS 3.0 and later, the limit only applies to one frame at a time.

    You also need to size images appropriately. Don’t rely on browser scaling. For example, don’t put a 100 x 100 image in a 10 x 10 <img> element. Tile small backgrounds images; don’t use large background images.

    source

  • You could have a login layout, teacher requiring a password.

    Or have a teacher app and a student app.

    You will need to store the questions and answers somewhere, out of reach for the students likely .

    All definitely possible.

  • Teacher is/has host.

    Has list of all connected peers.

    Sents out 1 question to all peers.

    Peer only sees question and answer box.

    Peers answer.

    Teacher sees on screen all given answers, if any given.

    If these are just open question, you cold almost treat it like a chat. Only the peers/students only see question/answer box, and host/teacher sees all the peers with the answers given.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Isnt this a default limitation of IOS ? just as with images, you are limited to a certain max size?

  • Hmm, I do not see the capx posted on the game though.

    It looks like when you start the game and get the layout with the 1 and 2 ... it looks like its waiting till something is finished.

    But without a capx, I cant tell though.

  • I think it's just the space in the http ; urls get removed from posts for new users

    repost :

    http://gyazo.com/378b054bd46624296b809542878c8c48

    http://gyazo.com/b87ef8cf7e62cb17a83d7c52a0f3ce95

    Thanks didn't notice the space haha.

    ElChuchis, without a capx its very hard to tell what is going wrong.

  • There is a moment of layout transition on 2 parties, happening at different moments. (host side/peer side)

    You could have solved the issued performing a check if the object you are about to create already exists.

    pick all peer

    pick peer by evaluate peerid = peeridat(loopindex)

    else

    create peer

  • links not working

  • Also, you posted in the bugs section , ... you should follow the guidelines for posting a bug, .. but something tells me this is not a bug though haha.

    Anyways, that is an image of your project properties .. what did you expect us to do with that

    Perhaps link your capx file.