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

龙讯互动

广西龙讯互动信息咨询有限公司( Longsunhd )是一家 互动信息技术研究、开发与应用、互联网新应用技术研发与推广、移动通信终端产品开发及增值服务为主营发展方向的高科技企业 。 公司秉承一流的技术,良好信誉,为党政机关和企事业单位提供信息化、网络化解决方案。公司客户涵盖了政府部门、军事机构、新闻 …
畜牧兽医

中国兽药饲料综合服务平台为大家提供海量实用的兽药饲料信息,致力于打造包括 产品,资讯,供求信息、企业等全方位实用信息的APP。为行业内企业在瞬息万变的商海中搭建了全新的、快捷的、稳定的沟通和搜集信息平台。同时,也帮助企业在移动互联网上树立形象,拓展经营渠道,扩大对外交流。免費玩畜牧兽医 APP玩免費 …
泠泠堂

“泠泠堂”是由扬州天韵琴筝有限公司泠泠堂古琴分公司开发的免费的古琴学习、交流的手机客户端平台。论坛内部设有“泠泠要闻”、“教学视频”、“产品图片”、“琴曲欣赏”四个板块,为古琴爱好者提供一个相互交流、学习的平台。并定期更新古琴相关信息,普及古琴常识,以及提供免费的网络古琴学习视频。免費玩泠泠堂 AP …
卡谷网-cargoon

卡谷网是华运国际物流集团旗下针对海外代理商推出新一代在线物流平台。海外代理商可以在卡谷网上面即时查询运价与船期,在线下单,实时跟踪订单状态,跟踪货物,享受一对一的专业服务。 Cargoon is a new generation of overseas agents for online logis …
中国农业

中国农业平台为大家提供海量实用的农业信息,致力于打造包括农业产品,资讯,供求信息、企业等全方位实用信息的综合服务平台。为行业内企业在瞬息万变的商海中搭建了全新的、快捷的、稳定的沟通和搜集信息平台。同时,也帮助企业在移动互联网上树立了形象,拓展了经营渠道,扩大了对外交流。免費玩中国农业 APP玩免費免 …
节能建材

中国节能建材综合服务平台为大家提供海量实用的五金信息,致力于打造包括节能建材综合服务产品,资讯,供求信息、企业等全方位实用信息的综合服务平台。为行业内企业在瞬息万变的商海中搭建了全新的、快捷的、稳定的沟通和搜集信息平台。同时,也帮助企业在移动互联网上树立了形象,拓展了经营渠道,扩大了对外交流。免費玩 …