Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for single Canvas rendering (OpenGL Canvas accelerators) #77

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

tonistiigi
Copy link
Member

Original discussion in the mailing list: https://groups.google.com/forum/#!msg/limejs/7URDfYUhX1w/t682EkGPgcgJ

First target is to support Ejecta https://github.com/phoboslab/Ejecta , but it should be mostly compatible with others as well. Pull requests are welcome to support other platforms.

Work in progress. Report issues you have with your own games or if this breaks current behavior in any way.

Testing:

git fetch origin
git checkout no-dom

In the browser:

See and tweak:

  • lime/demos/tests/run_canvasonly.htm
  • lime/demos/roundball/rb2.html
  • lime/demos/zlizer/zlizer2.html

Ejecta

You need a Mac/Xcode for this. To test on a real device you have to be registered iOS developer.

Clone Ejecta from https://github.com/phoboslab/Ejecta

cd path/to/lime
EJECTA_ROUNDBALL=path/to/ejecta make ejecta-roundball
EJECTA_ZLIZER=path/to/ejecta make ejecta-zlizer

To build both games you currently need two clones of Ejecta on different paths. This command will build it for simulator. To run on a device open the Ejecta project after simulator build, select your device and hit run.

@bulkan
Copy link
Contributor

bulkan commented May 12, 2013

I tried testing this with CocoonJS Launcher.

I created a new project changed the html file to this then built this project.

Using the Launcher on my iPhone I loaded the html which I just served up from python -m SimpleHTTPServer

This is the error I got

EDIT: wow the previous screenshot was huge

photo 12-05-13 20 18 08

@bulkan
Copy link
Contributor

bulkan commented May 12, 2013

BTW I have no preference over CocoonJS or Ejecta. At the moment I don't have Mac to be able test with Ejecta.

@tonistiigi
Copy link
Member Author

The Canvas environment detection was quite Ejecta specific. I added a hack that listens for a global variable. 9f99727#L0R5

The demo games seemed to work in CocoonJS launcher. I currently hard coded the canvas size to iPhone5. This can be changed here 9f99727#L1R9.

Building demo games:

COCOON_ROUNDBALL=target-dir/roundball.zip make cocoon-roundball
COCOON_ZLIZER=target-dir/zlizer.zip make cocoon-zlizer

This will give you a zip file that can be loaded in the CocoonJS launcher. On Windows this will likely not work(maybe works in Git bash if you have cli zip installed). You can then just look at the contents of the Makefile and make this zip manually.

Only tested with iOS. Will check on Android devices on Monday.

@yushli
Copy link

yushli commented Jun 3, 2013

lime/demos/roundball/rb2.html
lime/demos/zlizer/zlizer2.html

are not in the no-dom branch.

@superquadratic
Copy link

I just tried this branch and successfully ran our LimeJS-based game with Ejecta. Good work! :)

@bmilakovic
Copy link

Hi, advanced compilation give's the warning: C:\lime\lime\src\helper\dom.js:12: WARNING - incomplete alias created for namespace goog.dom, but "JavaScript compilation succeeded" anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants