Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
egeller committed Nov 2, 2013
0 parents commit f37734c
Show file tree
Hide file tree
Showing 39 changed files with 9,059 additions and 0 deletions.
217 changes: 217 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

obj/

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml
*.pubxml

# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
App_Data/*.mdf
App_Data/*.ldf

#############
## Windows detritus
#############

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac crap
.DS_Store


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg
57 changes: 57 additions & 0 deletions MapTest.hxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<project version="2">
<!-- Output SWF options -->
<output>
<movie outputType="Application" />
<movie input="" />
<movie path="application.xml" />
<movie fps="0" />
<movie width="0" />
<movie height="0" />
<movie version="3" />
<movie minorVersion="0" />
<movie platform="NME" />
<movie background="#FFFFFF" />
<movie preferredSDK=";3;" />
</output>
<!-- Other classes to be compiled into your SWF -->
<classpaths>
<class path="src" />
</classpaths>
<!-- Build options -->
<build>
<option directives="" />
<option flashStrict="False" />
<option mainClass="Main" />
<option enabledebug="True" />
<option additional="" />
</build>
<!-- haxelib libraries -->
<haxelib>
<library name="nme" />
</haxelib>
<!-- Class files to compile (other referenced classes will automatically be included) -->
<compileTargets>
<compile path="src\Main.hx" />
</compileTargets>
<!-- Assets to embed into the output SWF -->
<library>
<!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
</library>
<!-- Paths to exclude from the Project Explorer tree -->
<hiddenPaths>
<!-- example: <hidden path="..." /> -->
</hiddenPaths>
<!-- Executed before build -->
<preBuildCommand />
<!-- Executed after build -->
<postBuildCommand alwaysRun="False" />
<!-- Other project options -->
<options>
<option showHiddenPaths="False" />
<option testMovie="Custom" />
<option testMovieCommand="" />
</options>
<!-- Plugin storage -->
<storage />
</project>
27 changes: 27 additions & 0 deletions application.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<!-- NMML reference: https://gist.github.com/1763850 -->

<!-- metadata, make sure 'package' is at least 3 segments (ie. com.mycompany.myproject) -->
<meta title="MapTest" package="org.geller.Samples.MapTest" version="1.0.0" company="eg" />

<!-- output -->
<app main="Main" file="MapTest" path="bin" />

<window background="#000000" fps="60" />
<window width="800" height="480" unless="mobile" />
<window orientation="landscape" vsync="false" antialiasing="0" if="cpp" />

<!-- classpath, haxe libs -->
<source path="src" />
<haxelib name="openfl" />
<haxelib name="actuate" />

<!-- assets -->
<icon path="assets/openfl.svg" />
<assets path="assets/img" rename="img" />

<!-- optimize output -->
<haxeflag name="-dce std" if="haxe3" />

</project>
17 changes: 17 additions & 0 deletions assets/openfl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions openfl-readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
About OpenFL

OpenFL is the successor of NME, for Haxe 3+.

Building a game or application with OpenFL is almost like writing for a single platform. However,
when you are ready to publish your application, you can choose between targets like iOS, webOS,
Android, Windows, Mac, Linux and Flash Player.

Instead of using the lowest common denominator between platforms with a "universal" runtime,
OpenFL projects are compiled as SWF bytecode or C++ applications, using the Haxe language compiler
and the standard C++ compiler toolchain for each platform.

Read more:
http://openfl.org/

Project configuration, libraries, classpaths

OpenFL configuration is based on a XML file - it allows you very complex
configurations depending on the target platform. There is no GUI for it.

DO NOT modify FlashDevelop project properties as they will automatically be synchronized with the
XML when you modify it.

Development

OpenFL is encouraging to develop using the Flash API (ie. flash.display.Sprite) as in ActionScript 3.

Just code like you would code a Flash application, with the limitation that you can only use
the drawing API, bitmaps (see below) and TextFields.

However test often all the platforms you plan to target!

In OpenFL 3.x, SWFs and videos aren't supported yet.

Assets

Place all your images, sounds, fonts in /assets and access them in your code using the
global Assets class which abstracts assets management for all platforms:

var img = new Bitmap(Assets.getBitmapData("assets/my-image.png"));
addChild(img);

Tutorials:
https://github.com/openfl/openfl/wiki/Get-Started

Debugging

By default your project targets Flash so you'll be able to add breakpoints and debug your app
like any AS3 project.
HTML5 target can be debugged in the browser - some browsers, like Chrome, support "script maps"
which let you interactively debug .hx code directly instead of the generated JS.
There is however no interactive debugger yet for native targets.

Changing target platform

For OpenFL projects, an additional drop-down menu appears in the main toolbar where you can choose
a supported targets on Windows: flash, html5, windows, neko, android, webos, blackberry.
You can also manually enter a custom target not in the list.

Attention, for native targets you'll need to install additional compilers & SDKs. The compiler
will tell you in the Output panel what command to execute for that. More information here:
https://github.com/openfl/openfl/wiki/Get-Started

Tips:
- in C++ expect first compilation to be very long as it first compiles the whole OpenFL API,
- if a change is not taken in account, delete everything in /bin to start a fresh compilation,
- on mobile, Bitmap blitting is NOT performant,
- use spritesheets and Tilesheet.drawTiles for optimal rendering performance.
Loading

0 comments on commit f37734c

Please sign in to comment.