Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/04/2012 02:31 PM, Kristian Lein-Mathisen wrote: Thanks a bunch for the encouraging feedback! I wonder where this project might end up. Jean keeps asking to play with it. We've figured out that, with some careful jumping, you can get the truck over to the left and up a hill and back onto the slope that leads down to the start point! When I get a chance, I want to hook up the REPL and add more stuff to the world for her :-) ABS - -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlCXyiIACgkQRgz/WHNxCGoLGgCfe1McQAedoAjwRA9g0ZpACd/S WKcAmgIoO0yYrvuK0kfSdWMc700NK7vP =og+C -END PGP SIGNATURE- ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
Thanks a bunch for the encouraging feedback! I wonder where this project might end up. Shawn: The bottom-left numbers read (from top to bottom): number of drawn primitives, seconds per frame, frames per second. For example, if you evaluate ;; Add a gentle but slippery slope (space-add space `(body ((static 1)) (segment (friction 0.1) (endpoints ((250 500) (800 550)) You should see the primitives go up from 48 to 49. K. On Sat, Nov 3, 2012 at 10:18 PM, Shawn Rutledge shawn.t.rutle...@gmail.comwrote: That's cool! I tried it on my Galaxy Note (1st gen) and FPS is jumping around a lot, even when nothing is moving, usually between 50 and 60fps, and sometimes hitting peaks of more than 60 and sometimes really low values. What is the top of those 3 numbers in the lower-left? Mine says 48 and stays the same. On 2 November 2012 15:20, Kristian Lein-Mathisen kristianl...@gmail.comwrote: Dear Chickeners, I have been playing around with Chicken, Chipmunk and Cocos2Dx for a while, and I've finally got a demo up and running on Android. I've published it on Google Play in the Libraries and Demos category so you guys can test it! Check it out: Scheme REPL with Cocos2Dxhttps://play.google.com/store/apps/details?id=com.adellica.cocoscheme The demo features a truck which you can drive back and forth, clumb up hills and fall down. Not very exciting, but I do actually catch myself playing it when I don't know what I should be coding on! The cool part is that there's a Chicken REPL behind the scenes. You can connect to the REPL directly from your laptop if your phone is on the same WiFi, or use USB. Try Settings-Wireless Networks-Wifi Settings- [Menu]-Advanced when looking for you phone's IP. With netcat (or Emacs, with nc [ip] [port] as your Scheme interpreter), you could try: $ nc [phone ip] [port] Alternatively, you could use USB with adb and forward: $ adb forward tcp:1234 tcp:1234 $ nc localhost 1234 Once you see the REPL prompt @, you can play around: ;; 'import' chipmunk https://github.com/kristianlm/chickmunk bindings (use chickmunk https://github.com/kristianlm/chickmunk) ;; where is the player? (body-get-pos truck) ;; redefine game-loop to pause game unless you're touching the screen (define (*update*) (if *touch-down* (space-step space (/ 1 120 ;; now let's give the truck a gentle push (body-set-ang-vel wf -20) ;; now touch the screen to watch it drift off ;; restart the app to revert your changes (exit) ;; You can also manipulate the physics-world: ;; Drop a ball from the sky (space-add space `(body ((pos (320 700))) (circle (density 0.001) (friction 1) (radius 10 ;; Add a gentle but slippery slope (space-add space `(body ((static 1)) (segment (friction 0.1) (endpoints ((250 500) (800 550)) ;; type this to see the touch-down state: *touch-down* ;; it should be #f when your finger is off the screen, and touch-coordinates otherwise. evaluate it while holding the screen to try it out! If you have an Android phone, it'd appreciate if you took the time to check it out. I am particularly interested if the app won't start at all, and perhaps what framerate you're getting (very bottom-left). I know there is a memory leak somewhere (thanks Alaric!), but otherwise I hope things should be running fairly smoothly. Cheers! Kris ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
That's cool! I tried it on my Galaxy Note (1st gen) and FPS is jumping around a lot, even when nothing is moving, usually between 50 and 60fps, and sometimes hitting peaks of more than 60 and sometimes really low values. What is the top of those 3 numbers in the lower-left? Mine says 48 and stays the same. On 2 November 2012 15:20, Kristian Lein-Mathisen kristianl...@gmail.comwrote: Dear Chickeners, I have been playing around with Chicken, Chipmunk and Cocos2Dx for a while, and I've finally got a demo up and running on Android. I've published it on Google Play in the Libraries and Demos category so you guys can test it! Check it out: Scheme REPL with Cocos2Dxhttps://play.google.com/store/apps/details?id=com.adellica.cocoscheme The demo features a truck which you can drive back and forth, clumb up hills and fall down. Not very exciting, but I do actually catch myself playing it when I don't know what I should be coding on! The cool part is that there's a Chicken REPL behind the scenes. You can connect to the REPL directly from your laptop if your phone is on the same WiFi, or use USB. Try Settings-Wireless Networks-Wifi Settings- [Menu]-Advanced when looking for you phone's IP. With netcat (or Emacs, with nc [ip] [port] as your Scheme interpreter), you could try: $ nc [phone ip] [port] Alternatively, you could use USB with adb and forward: $ adb forward tcp:1234 tcp:1234 $ nc localhost 1234 Once you see the REPL prompt @, you can play around: ;; 'import' chipmunk https://github.com/kristianlm/chickmunk bindings (use chickmunk https://github.com/kristianlm/chickmunk) ;; where is the player? (body-get-pos truck) ;; redefine game-loop to pause game unless you're touching the screen (define (*update*) (if *touch-down* (space-step space (/ 1 120 ;; now let's give the truck a gentle push (body-set-ang-vel wf -20) ;; now touch the screen to watch it drift off ;; restart the app to revert your changes (exit) ;; You can also manipulate the physics-world: ;; Drop a ball from the sky (space-add space `(body ((pos (320 700))) (circle (density 0.001) (friction 1) (radius 10 ;; Add a gentle but slippery slope (space-add space `(body ((static 1)) (segment (friction 0.1) (endpoints ((250 500) (800 550)) ;; type this to see the touch-down state: *touch-down* ;; it should be #f when your finger is off the screen, and touch-coordinates otherwise. evaluate it while holding the screen to try it out! If you have an Android phone, it'd appreciate if you took the time to check it out. I am particularly interested if the app won't start at all, and perhaps what framerate you're getting (very bottom-left). I know there is a memory leak somewhere (thanks Alaric!), but otherwise I hope things should be running fairly smoothly. Cheers! Kris ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
If you have an Android phone, it'd appreciate if you took the time to check it out. I am particularly interested if the app won't start at all, and perhaps what framerate you're getting (very bottom-left). I know there is a memory leak somewhere (thanks Alaric!), but otherwise I hope things should be running fairly smoothly. Hi Kris, I ran your app on my android devices, and it ran fine on all of them. Here are the frame rates: HTC EVO 3D - 48 fps Kindle Fire (1st gen) - 52 fps Motorola Droid (1st gen) - 25 fps I just started looking at cocos2d-x for cross platform development, and would be very interested to see the code for this application (messy or not). Also, I have a macbook, and a couple of old ipod touches, so I could possibly see how/if it runs on them. Thanks, Jason ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users
Re: [Chicken-users] Chicken and Cocos2Dx on Google Play!
Hi Jason, and thanks for testing this. I'm really glad it seems to be working! I'm happy to see others trying to go in a similar direction. Developing with a REPL on the real hardware is so incredebly rewarding! I've put out the code out on here https://github.com/Adellica/cocoscheme for you guys to look at. But like mentioned before, it's a complete mess. I would probably need a day to get it to build from scratch myself! Note that it depends on chicken-bind from my github account, the official version 1.0 won't work. If you don't want to mess around with actually building it, you can peek at the Scheme source-code. You can edit parts of that and send it to the REPL. In particular, the *update* global may be of interest there. Cheers and have a good weekend all! K. On Fri, Nov 2, 2012 at 6:26 PM, Jason Ripley ripley.ja...@gmail.com wrote: If you have an Android phone, it'd appreciate if you took the time to check it out. I am particularly interested if the app won't start at all, and perhaps what framerate you're getting (very bottom-left). I know there is a memory leak somewhere (thanks Alaric!), but otherwise I hope things should be running fairly smoothly. Hi Kris, I ran your app on my android devices, and it ran fine on all of them. Here are the frame rates: HTC EVO 3D - 48 fps Kindle Fire (1st gen) - 52 fps Motorola Droid (1st gen) - 25 fps I just started looking at cocos2d-x for cross platform development, and would be very interested to see the code for this application (messy or not). Also, I have a macbook, and a couple of old ipod touches, so I could possibly see how/if it runs on them. Thanks, Jason ___ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users