【實用程式庫與試用程式app】Scheme REPL with Cocos2Dx|最夯免費app

【實用程式庫與試用程式app】Scheme REPL with Cocos2Dx|最夯免費app

分享好友

【免費程式庫與試用程式App】Scheme REPL with Cocos2Dx-APP點子

This is a demo for developers. Please don't give low ratings based on playability - it's not meant to be a complete game! It may still be entertaining though, you can drive a truck up hills and fall back down.

=== What this is about ===

We have wanted to try REPL-based game development for a long time, and this is our attempt.

A REPL is like a command-line interface to the inside of your running program. It's like having a debugger running constantly, but perhaps less troublesome.

REPL-based development should allow us to develop games and apps much faster. Your new code takes effect immediately, and can be executed on your target hardware.

Bret Victor has a very nice talk about immediate feedback in his "Inventing on Principle" talk: http://vimeo.com/36579366

This project is an attempt to accomplish this, and so far it seems to have worked fairly well!

=== How we are doing this ===

The demo combines three third-party libraries:

- Chicken Scheme for the REPL

- Cocos2Dx for graphics

- Chipmunk for physics

Cocos2Dx is a C++ library with 2D-games in mind. It lets you manage things like sprites, their animations and touch events. It is fast and portable (Android, iOS and others). Chipmunk is a physics engine writtten in C. It's fast with a very nice API. Chicken Scheme is a Scheme-to-C compiler and interpreter.

All should also run on iOS, but I don't have a Mac.

=== Bindings ===

The Cocos2Dx bindings are in an early-stage. Basic functions to manipulate sprites are available:

- (CCSprite::create "CloseNormal.png")

- (setPosition *sprite* x y)

- (getLocatino touch-event)

The Chipmunk API is more mature. You can read about the `chickmunk` project on https://github.com/kristianlm/chickmunk.

=== Try it yourself ===

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 netcat [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 bindings

(use 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)

【免費程式庫與試用程式App】Scheme REPL with Cocos2Dx-APP點子

;; 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*

【免費程式庫與試用程式App】Scheme REPL with Cocos2Dx-APP點子

;; 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!

This is just a small example of what can be done. As a matter of fact, almost everything in the demo itself was developed this way: the REPL, Emacs and Inferior Scheme.

=== Source code ===

The source-code for the demo can be found on github: https://github.com/Adellica/cocoscheme.

Please give feedback, let us know if you like this! And please let us know of any similar efforts. Thanks!

免費玩Scheme REPL with Cocos2Dx APP玩免費

免費玩Scheme REPL with Cocos2Dx App

Scheme REPL with Cocos2Dx APP LOGO

Scheme REPL with Cocos2Dx LOGO-APP點子

Scheme REPL with Cocos2Dx APP QRCode

Scheme REPL with Cocos2Dx QRCode-APP點子
熱門國家系統支援版本費用APP評分上架日期更新日期
未知Android
Google Play
1.0
App下載
免費
1970-01-012015-04-23
分享app
上一個APP
下一個APP

高評價程式庫與試用程式App推薦

硬件令牌

令牌一打开你的智能手机变成一个多因素身份验证。您可以取代您当前的硬件令牌与一个方便的应用程序。帮助保护自己免受钓鱼,网址嫁接和击键记录程序。免費玩硬件令牌 APP玩免費免費玩硬件令牌 App硬件令牌 APP LOGO硬件令牌 APP QRCode熱門國家系統支援版本費用APP評分上架日期更新日期中國 …
声波锁定手机

声音锁屏应用得到最好的解锁屏幕应用程序为您的android设备保驾护航。声音锁定屏幕允许您使用声音密码锁定与解锁你的Android手机识别。即使其他人知道密码内容也无法复制你的声线。真正实现只有本人操作才可打开手机。免費玩声波锁定手机 APP玩免費免費玩声波锁定手机 App声波锁定手机 APP LO …
旋转锁

屏幕方向可以固定为一个特定的方向,它是免费的。11种不同类型的旋转,它可以改变的力量。甚至不支持应用程序在一个方向,它可能只是被迫开关。免費玩旋转锁 APP玩免費免費玩旋转锁 App旋转锁 APP LOGO旋转锁 APP QRCode熱門國家系統支援版本費用APP評分上架日期更新日期中國 China …
iPhone5主题天气锁屏

明天,你好。iPhone5主题九宫格天气锁屏。设置锁屏方法:预先体验→一键设为锁屏→右上角可以设置密码九宫格,还可以微博空间微信分享→左上角为锁屏网络资源,天天都有锁屏更新哦。超便捷哦。锁屏不在于多复杂,而是能打动你的心。用心做好每一款锁屏。免費玩iPhone5主题天气锁屏 APP玩免費免費玩iPh …
碎花菇凉cici主题锁屏

喜欢可爱或者碎花的必须收了!碎花菇凉壁纸加一键锁屏特有的便捷魅力,让你跟原版枯燥死板的锁屏说byebye,用此款锁屏来装饰你的手机吧!设置方法:预览→设为锁屏即可。右上角为设置功能,有密码和九宫格功能。当然空间微博分享肯定是必不可少的。右上角为网络资源,丰富的样式让你每天都有不停的feelings. …
丢丢呆呆主题九宫格锁屏

丢丢呆呆关于爱情的那些事儿。设置九宫格方法:开启锁屏,预先体验,一键锁屏,右上角保存九宫格解锁图案,再开启九宫格(一定要开启才能使用哦),选再退出即可。可以设置密码,还可以打开音乐播放器哦。左上角为网络资源。一款应用,两种可爱体验。用心做好每一款锁屏。免費玩丢丢呆呆主题九宫格锁屏 APP玩免費免費玩 …