Joystick 1.1 - Move and Shoot

Grif Robot:
http://www.screencast.com/t/6UOGvePlav

Patrick Robot
http://www.screencast.com/t/4oSXjdnMynI

Several of us have played around with sockets, using UDP, and there can be a lot of lag. I built a demo 3D FPS with a server/client arrangement, and one or other of the iPads would stop updating erratically, making it unplayable.

I know it is usual to include lag protection in games using caching, but if you’re not getting updates for 10 seconds, nothing is going to help.

While the developers have included sockets, it’s not something they are very interested in, so it’s been left to us users to figure out the issues.

Here’s a post I wrote on making a multiplayer game

https://coolcodea.wordpress.com/2015/04/21/211-making-multiplayer-games-part-1/

I started making a 3D multiplayer, here are a few short videos. The last one demonstrates a second player on another iPad

https://www.youtube.com/watch?v=JxLKklavUz8

https://www.youtube.com/watch?v=OrMJMrMwX3E

https://www.youtube.com/watch?v=R40zX44mYbg

Wow, that look pretty cool! Are you still toying with that, or did you run into significant issues with the socket connections? I presume you were transferring a minimum of data through the pipes…

Post deleted - answer discovered :slight_smile:

yes, it was a minimum amount of data, just a short string

Sorry to double post this, but I wanted to keep this information in the main Joystick thread.

Try my latest version of the Joystick code, that now has a top-down rotating character - I’m pretty happy with how it’s working, though it certainly could be improved. My math skills have gotten me this far, but you’ll notice the direction of the character should be shifted by 7.5 degrees counter-clockwise. I’ve also got a Step Timer happening in the Hero class that could maybe be done in a more sophisticated fashion. Any help would be mucho appreciated - as usual!

New Joystick Code:

https://github.com/interactivenyc/CodeaJoystick

Note: there are a bunch of images associated with this project that are in the repository. I’m working on a script that will eventually be able to download these images into the project dynamically. I’ll post again when that part’s finished. You can read about that script in progress here:

https://codea.io/talk/discussion/7443/saving-images-to-project#latest

This project should be ready to run now, downloading all images when you uncomment the indicated line in setup()

https://github.com/interactivenyc/CodeaJoystick/