【實用程式庫與試用程式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推薦

99生活

“ 99 生活”手机用户端是为用户贴身打造的一站式社区生活服务平台,主要内容包括: 1、 物业付费足不出户,投诉报修随时随地; 2、 生活服务周全贴心,周边商户一网打尽。 3、 常用电话一应俱全,社区快递安全便捷。 4、 优选商品产地直供,特价专享划算到家 “ 99 生活”致力于为用户提供更好的物业 …
B8速送

B8速送打造全新购物模式,实现足不出户手机购物15分钟免费送货到家。想吃就吃想买就买,从此无需再等待。 B8在你家门口,15分钟送到手。免費玩B8速送 APP玩免費免費玩B8速送 AppB8速送 APP LOGOB8速送 APP QRCode熱門國家系統支援版本費用APP評分上架日期更新日期中國 C …
猫哈免费WiFi

数据线找不到,抓狂ING~打开猫哈APP,手机无线访问电脑,实现双向文件隔空互传; 出外景刚拍了美照~“摇一摇”快捷备份到电脑,再也不怕丢失了; 电脑太远,不想起身~手机遥控电脑关机、锁屏、调节音量、播放音乐、玩游戏……一键轻松搞定。免費玩猫哈免费WiFi APP玩免費免費玩猫哈免费WiFi App …
妙生活

妙生活果园致力于成为中国消费者首选的水果连锁品牌 本应用为妙生活官方客户端,为您提供便捷的水果信息展示、线上购买、在线支付、订单查看、订单追踪、第一手优惠资讯等功能。 妙生活精选全球时令水果,细心管理,用心服务让客户放心享受水果美味。 妙生活希望与您一起追寻世界鲜果的踪迹。我们专注于品质和服务!坚守 …
微音

微音V1.0.2,完全免费的网络电话软件,打电话、发短信完全不要钱,通话语音清晰、拨号方便,适合中国手机用户使用。 网络电话、短信即时沟通功能不再浪费手机话费! 微音特性 1、Wifi/3G下好友间打电话完全免费; 2、好友间免费发短信、无限制语音对讲; 3、智能IP拨号、快速拨号,快捷方便; 4、 …