Monday, June 15, 2015
Moved to word press:
New blog here:
https://makegameshappen.wordpress.com
Just got sick of google trying to control all my stuff with one global account.
Leaves me spending half my day logging into and out of accounts. Very annoying.
Using word press will be less disruptive to my work flow.
-John Mark
Moving to WordPress
Here:
https://makegameshappen.wordpress.com/
I've finally had it with google disrupting my workflow.
I log into Youtube, get logged out of the Gmail account I was using.
I log into Blogspot, have to log out of Gmail and then into a different Gmail.
Then end up having to re-type blogspot.com to get back where I was.
I am not a fan of this unification of accounts that Google is up to.
It is a pain and severely disrupts my workflow.
If there is a decent non-google option that doesn't make my life a pain, I will go for it.
I've been dealing with this problem for at least a year.
And I've probably lost a lot of productivity.
-John Mark
TileLayer Haxe Install
I used HaxeLib Install TileLayer... And it installed. But FlashDevelop cannot find the library when I includein my application.xml file. I need to focus on making a game rather than pipeline issues... So I think I am going to go ahead and ignore learning openGL, drawTiles, or whatever TileLayer is and just work on making a game targeting HTML5 and ActionScript. If the game is good enough, then I will worry about porting to mobile. For now, I am just going to design for mobile but release to web. I don't see myself being productive if I am pulled in so many directions at once. -John Mark
aze.display
If you see aze.display in a haxe project. The aze namespace belongs to this library:
http://lib.haxe.org/p/tilelayer
Sunday, June 14, 2015
OpenGL Haxe Reading List:
http://www.joshuagranick.com/2011/10/31/opengl-triangle-c-and-haxe-side-by-side/
http://old.haxe.org/doc/java/lwjgl
http://www.lwjgl.org/
setting up lwjgl with eclipse:
http://wiki.lwjgl.org/wiki/Setting_Up_LWJGL_with_Eclipse
OpenGL ES Tutorial:
http://www.raywenderlich.com/3664/opengl-tutorial-for-ios-opengl-es-2-0
Guessing aze.display.* import in the openGL for Haxe project
I am looking at is referencing this:
http://lib.haxe.org/p/tilelayer
Lightweight wrapper over OpenFL's powerful
but lowlevel 'drawTiles', with bitmap-based
fallback for Flash. Includes a Sparrow
spritesheets parser supporting animations
and trimming.
The openGL haxe project I am looking at:
https://github.com/bmfs/glslTest_openfl
ARGH!
Looks like I need to understand OPENGL before I can figure out haxe's implimentation of
openGL. Doesn't appear to be enough documentation to figure it out otherwise.
-John Mark
//http://stackoverflow.com/questions/16559095/opengl-with-haxe-c
@MichaelIV, actually NME's implementation targets OpenGL ES 2.0, which means that it supports shader pipelines (see github.com/haxenme/NME/blob/master/native/gl/GL.hx#L538). Can you edit your answer? – Waneck May 15 '13 at 13:32
Hardware Pixel Blending Haxe
Apparently this shader code: https://github.com/bmfs/glslTest_openfl from this thread:http://www.openfl.org/archive/community/feature-requests/custom-glsl-shaders-drawtiles/ Is the answer to my problems. graphics.drawTiles() http://www.openfl.org/archive/ community/programming-haxe/blending-modes/ pixel bender: http://www.flashmagazine.com/tutorials/detail/using_pixel_bender_to_calculate_information/ http://www.openfl.org/archive/community/ feature-requests /custom-glsl-shaders-drawtiles/ OpenGLSimpleView or HerokuShader i want to write my version of drawTiles() using openfl-stage3d, so it would be possible to use custom shade heardtheword: In looking at how NME is structured it seems plausible that there could be a GPUProg object stored in GraphicsJob and then passed to HardwareContext. This would give the ability to use shaders on points, lines, and fill objects as well as Tilesheet. I think this would be abstract enough to use for HLSL as well. Here is my concept of how it could work in Haxe. There should probably be some type of caching for duplicate shaders although Haxe will only see the final linked program. // static function, returns a GPUProg object? var program = Graphics.compileShader(vertexShader, pixelShader); // in rendering code graphics.attachShader(program); tilesheet.drawTiles... // is this needed or could it be automatically detached at endFill? graphics.detachShader(); I'm willing to take a shot at this but would love feedback if you feel this isn't heading in the right direction. EDIT: Any reason OGLProg::createShader adds the precision information for OpenGL ES2? You can do that directly in the shader using the #ifdef directive. #ifdef GL_ES precision highp float; #endif EDIT2: Okay, I created a branch in GitHub and edited sample 20-Tile with custom shaders. It works as expected as long as you use the attribute/uniform variables defined in OGLProg. Might be fun to allow custom variables in the future. http://github.com/MattTuttle/NME/tree/glsl... 1 year later: Updates: https://github.com/bmfs/glslTest_openfl
FPS , Haxe, and Movies
This explains why I thought a Hollywood movie was a cheap straight to tv drama: http://www.tested.com/art/movies/452387-48-fps-and-beyond-how-high-frame-rates-affect-perception/ I thought it was the bad cinematography or lighting or cuts.. But it may have been the frame rate. How to do a simple frame rate and memory profile in haxe: http://haxecoder.com/post.php?id=24 Expanded upon with colors and stuff: https://github.com/yupswing/plik/tree/master/com/akifox/plik/debug
BitmapData.dumpBits
http://www.openfl.org/archive/community/bugs/wasting-memory-makes-nme-unusable-non-pet-projects-does-anyo/
TexturePacker
Ah. This is what HaxeFlixel is referring to in it's texture packer data class:
https://www.codeandweb.com/texturepacker
Saturday, June 13, 2015
Faster than CopyPixels in Haxe
You need to use tilesheets which abstract the sprite.graphics.beginBitmapfill() command if trying to render on android. This is what I have found from my research into why the awesome rendering system I made sucks when I try it out on my phone. More info on tile sheets here: http://haxecoder.com/post.php?id=21 From looking at source code, haxe-flixel uses tile sheets. Reading into haxe-flixel source code: #if FLX_RENDER_BLIT is using COPYPIXELS() FLX_RENDER_TILE is using TileSheets. So: FLX_RENDER_BLIT is used for non-hardware targets like flash and HMTL5. And FLX_RENDER_TILE is used for hardware targets like android and neko. This is my understanding. Will look more into this later.
Haxe Android FrameRate Drop
Doing some reasearch on this:
http://www.openfl.org/archive/community/programming-haxe/android-fps-drops/
You might consider what rendering you are using. If you are still using copyPixels or draw, which perform well in Flash's software renderer, its about the slowest you can go on hardware. The display list is faster, or drawTiles/drawTriangles
If you are using one of these fps drop is inevitable, because these are using cpu and expensive processes.
- Masking
- Bitmap drawing or creating bitmap
- Gradient line drawing
- Filters
- Color transform
You should also check that you aren't using debug mode also. This may lead fps drop also.
I apologize for dropping into an older thread, but I wanted to mention I just created a logical error in our stage rendering code.
It was rendering on "lastRender + framePeriod", which, if the application was allowed to sleep, could result in a drop of several frames per second if the "lastRender" was not exactly at the desired time, but later due to an idle wakeup. The system was not under stress, it just wouldn't try to do enough frames. This is the cause of the behavior where more stress on the device would result in better frame rates, much to the confusion of most people.
This logic fix will go out in the next version of openfl-native. Have a great day!
Bunny Mark
SO... Either I have a really slow phone... Or my "optimized" tilemap rendering code is not that optimized... Going to download http://haxeflixel.com/demos/FlxBunnymark/ And run it to see how it works... Tried using downloadSVN to download the demo from the Git Repo. No luck. Instead used: haxelib install flixel-demos on the command line. UPDATE#1: Looks like bunny benchmark is dependant on bitFive... Hmm... Better look into what bitFive is doing. As I know it had something to do with drawing optimizations. On command line: haxelib install openfl-bitfive UPDATE#2: Running the demo from the flixel project failed. Did not recognized bitFive was installed. Actually, the entire libraries folder was EMPTY... Like the project XML wasn't valid or anything.. SO now: On command line: haxelib install flixel-tools Trying to build a fresh bunnyMark example using flixel-tools. If this doesn't work... I don't know.. I feel kind of stupid having to try this hard just to get something running that I should be able to easily download. UPDATE#3: Error: /////////////////////// Error: Could not find haxelib "openfl-bitfive", does it need to be installed? Build halted with errors (haxelib.exe)." ////////////////////////////// Using the command line, it installed openfl-bitfive version 3.0. My guess is I need to take out the version requirements somewhere in a config file. Because: When I do "haxelib install openfl-bitfive" on command line, it tells me: "You already have openfl-bitfive version 3.0.0 installed. UPDATE#4: Went to "C:\DEV\Programs\Haxe\haxe\lib\openfl-bitfive\3,0,0" And stripped the version number out of haxelib.json in that folder. I kept the version variable, but it is now set to an empty string. Hmm... The "" Within my Project.xml is still causing my "References" folder in my FlashDevelop project to become blank. I know this happens whenever you put a library path that cannot be found. When I comment out from my Project.xml, the "References" folder directories show up again in the project explorer... So I guess stripping the version number out did not work... Maybe the library is identified differently? I am typing something wrong? UPDATE#5: Read some read-me files:: Trying this in Project.xml (Which read me refers to application.xml) //Commented this out. //replaced with this. I can now see my library references in the project explorer, but don't know if anything will actually run. UPDATE#6: No luck... I really want to run this demo to see if I am doing something wrong with my optimized rendering... Or if Flixel is using better rendering methods than me.... GRRR. I am pretty sure my phone is just ancient and super slow... That is what I am hoping for because my flash code runs super awesomely fast. UPDATE#7: Not cool... I wonder if I can find bunnyMark on the app store and just download it? I don't want to use flixel. I just want a bench mark to see how it runs on my phone. Fruitless search terms: openfl-bitfive not found openfl library not found in solution explorer openfl-bitfive not compiling
Monday, June 8, 2015
Tile sheets. Render in Haxe
http://haxecoder.com/post.php?id=21
Oh my.. I better look into this before I continue my work.
Just in case I am screwing up royally.
UPDATE:
http://seanodowd.me/getting-started-with-haxe-2014/
RoxLib is where it is at for gestures in Haxe
This person did a good job documenting the features in this post:
http://fugocode.blogspot.com/2013/07/openfl-gestures-using-roxlib-gesture.html
Haxe Touch Events
nme.events.TouchEvent.TOUCH_BEGIN
nme.events.TouchEvent.TOUCH_MOVE
nme.events.TouchEvent.TOUCH_END
Looks like what I need.
Interesting that I coincidentally coded some events in my engine using:
START, CONTINUE, and END
Very similar to this format.
Hopefully that means coding this up will be easy.
http://www.openfl.org/archive/community/programming-haxe/nmeeventstouchevent-are-not-sensitive/
UDPATE:
//here: http://stackoverflow.com/questions/9229419/as3-pinch-zoom-and-single-finger-drag-detection
Has something called "TransformGestureEvents"
UPDATE:
//Mentions standards of some sort including MSPointers that might be good to research.
Knowing how to think about this stuff is important.
http://www.sitepoint.com/unifying-touch-and-mouse-with-pointer-events/
Signing into blogger signs me out of GMail.
I don't enjoy how google likes to sign me out of my gmail when I sign into blogger.
When google decided to link Youtube, Blogspot, and who knows what else all together...
It became a real pain for me. And my productivity has suffered.
Usually my solution is just to... Don't check email that much.
And don't update blog as much as I should.
Here are some other solutions:
http://equalsdrummond.name/2010/01/24/fixing-the-google-account-problem/
I think a better solution might just be...
Only using google for gmail.
And finding alternative services for blogs that don't kill my productivity.
Been reading a book on systems theory called "The 5th Discipline" and context
switching is a big deal.
-----------------------------------
In games news: Working on some basic Haxe Engine code for a game I want to make for the phone.
Writing engines is a dangerous thing to do for someone trying to make a game. I've been down
that road before. But I know exactly what I want and I have the experience to pull this off.
And it will save me some problems down the road because I wont have to hack-up
flixel like I did with my AS3 code base.
You try to respect encapsulation, but it only goes so far when you need to make big changes.
-John Mark
UPDATE:
Speaking of the inefficiencies I was talking about with google accounts.
This was the original reason I logged in:
https://github.com/rockswang/roxlib
I am doing research into multi-touch so I can program a pinch/pull gesture for zoom control.
Tuesday, June 2, 2015
APK Push and Stuff
Casting:
Use Std.int( someFloat);
NOT: cast( someFloat, int);
Latter will work for Flash target only.
Debug APK in relase mode?
http://www.openfl.org/archive/community/programming-haxe/android-why-apk-marked-debug/
Installing .apk on phone:
adb push c:\TEST2.apk /sdcard/test2.apk
adb shell pm install /sdcard/test2.apk
alternatively:
adb install c:\TEST2.apk
or maybe it was...
adb install c:\TEST2.apk /sdcard/test2.apk
Whatever. One of these works.
Subscribe to:
Posts (Atom)