Search the Community

Showing results for tags 'haxe'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 30 results

  1. Hello everyone, Recently i finished my first medium-sized HTML5 game - Medieval Defense Z. I came from flash background and developing for HTML5 presented with some new challenges. So i would like to share what worked and what didn't. This is more like review/tutorial type of thing, so hopefully someone will find something useful. • Goals: • 60fps. • Smooth gameplay and animations. • Quality comparable to flash games. • Tools: • Language: Haxe. Strictly typed programming language, similar to ActionScript 3.0. Compiles to all major languages, including javascript. • Editing: HaxeDevelop IDE. Freeware, great code completion and very fast compared to everything i tried. • Debugging: Chrome. Has console, debugger and profiler. • Rendering library: Pixi.js. Uses display list concept like flash. Works well. • Sound library: Howler. Good enough, the id system is a bit weird though. • Bitmap font exporter: Free and web-based. • Sprite Sheet Packer: Freeware and very simple. • Graphics: • Scaling will look ugly if you use many small png files for textures. • If you want nice scaling, fast load times and fast rendering - pack everything to 2048x2048 spritesheets (include bitmap fonts too). • Resolution of assets: 1024x768, background can extend to 1382x768, so it covers most aspect ratios in horizontal orientation. • To get proper native resolution in mobile browsers i scaled up renderer and scaled down canvas by window.devicePixelRatio. • Sounds: • Library: Howler. • Sound formats: ogg for Chrome and Firefox, m4a for Safari and Internet Explorer (note: mp3 has licensing issues with play count). • ffmpeg: because of licensing issues and whatnot can't convert to m4a, unless you recompile ffmpeg with m4a, which is a pain to setup. • I used MediaHuman Audio Converter (freeware) to convert from wav to ogg and m4a (64 bit). • iOS Safari: keep in mind that before any sound could be played, user must first tap on the screen. • Mouse Events: • Used pixi.js API to open links. • iOS Safari: under "touchstart" event won't open links in new tabs, use "tap" event instead. • sprite.on("mousedown", callback) for desktop. • sprite.on("tap", callback) for mobile. • Performance: • Reuse frequently used sprites. • Avoid creating too many objects every frame. • I would recommend looking up data-oriented programming to get more juice out of Javascript. • Record timeline with Chrome profiler to find performance bottlenecks. • Masks are slow. Use trim if you only need a simple cut. • Game Debugging: • Simple CSS + DOM side menu. • Basic field view/edit. • Simple buttons with callbacks. • How to debug html5 game on android (mobile) with desktop chrome (PC): 1. Upload game to your website. 2. Go to (desktop) chrome: chrome://inspect 3. Connect Android device with USB and run your game on android chrome (your android device must be enabled for development). 4. Open Command Prompt and enter: adb devices (must have Android Debug Bridge installed). 5. To quit debugging enter: adb kill-server • Conclusions: • Programming in Haxe instead of pure Javascript probably saved hours and hours of debugging. • Pixi.js is great, but i wouldn't recommend doing very complex scenes. • Would have liked more automated solution for spritesheet and sound stuff. • Poor performance bites sooner or later, so be prepared to do extensive profiling. • Stable 60fps is very hard to achieve, even if you keep your code below 1-2ms per frame. • Overall i am happy with the results, however it took longer than expected to make this game. Any feedback is appreciated. The game is not yet released, but here is gif trailer:
  2. Hi, It is a simple but quite original puzzle game. Game ready for non exlusive licences, youtube video Thx, Sergiy.
  3. Hi, This is a simple puzzle game with original gameplay where the monsters eat candy Ready for sitelocking or other type of licensing. Game is also available on flash, android , etc gameplay on youtube link on game Thx, Sergiy.
  4. In a personal effort to return to making games for fun I made a classic Bubble Shooter styled with ... Candies! The name of the game is POP-POP CANDIES and it is designed to run on mobile and desktop browsers (touch and mouse controls): Gameplay: Enjoy a sweet puzzle as you pop-pop all the candies using strategy and fast reflexes! Featuring 100+ challenging puzzles and marathon endurance levels this colorful Match-3 Puzzle Shooter game will entertain for hours. Technical: Made with Haxe + awe6 + CreateJS and designed to run on any device at ~30fps. Many of the assets originated from royalty free sources. The level designs mostly came from an open source project called Frozen Bubble, so big thanks to contributors there. The levels (and star ratings) were sorted based on completion time of a few thousand sample plays. A level designer might be added later. This game is available to license from our website:
  5. I had the chance this month to revisit a client project and reskin it as something different. The result was GRAND PRIX HERO, a "retro inspired pseudo 3D racer" similar to the Sega classics I used to play in the arcades. Designed to run in browser on either mobile or desktop the controls use tilt, touch or keys - gameplay is crippled optimized with auto-accelerate accordingly ... Gameplay: Compete across 4 races in the Grand Prix Series. Dodge traffic, boost, collect coins and upgrade your car for the next race. Are you the Grand Prix Hero? Technical: Made with Haxe + awe6 + CreateJS, the underlying engine is heavily inspired by this popular tutorial: Everything is Canvas based, just LOTS of drawImages, no WebGL - so older devices may struggle (there are many auto degrading detail settings built into the game, but they can only do so much). The majority of graphical and audio assets came from my stockpile of never-quite-finished racing games, so I'm pleased to finally publish some of them (even if it is on a much simpler game than they were originally intended for). Next steps: Sega style voice over? Suggestions welcomed.
  6. Hello everyone ! I'm a student in Gamedesign & Programming in Paris and I make games. Video games. HTML5 video games. Using Haxe. So I think I'm in the right place ! It's my first post here, one of my teachers recommended me to share our HTML5 game here ! So here it is, "Fall", made in 4 days within the GameWeek of my school. We were 9 in a team composed with 4 graphists, 4 Gameplay Programmers and 1 Producer. A team entirely made with first and second years ! Check it out here : Fall won the "Most polished game Prize" and will soon arrive on your smartphones ! Have fun guys !
  7. Hi everyone! Here is Decay, the game we made during a 4-day gamejam in our school.It's about an alien trapped in a lab who's trying to escape by taking control of scientists. Decay won the "Best Graphics and Animations Prize" and you can test it here: We had no time to finish the touch input... so the game doesnt quite work on mobile We intend to start again the developping this summer and publish it on mobile stores. So feel free to give us your feedback
  8. Hi, for whatever reason all BabylonHx topics were moved to Haxe JS forum. Anyway, BabylonHx 2.0 is on github and its a fresh (from scratch) port of Babylon.js 2.0.0. You can read original post about new version here, on the bottom of the page:
  9. Hello everyone, this is my very first post ! I am a french game developper student, and i like phaser and pixi it's very easy to develop with them. I try to use the ColorMatrixFilter of Pixi with Phaser to use the hueRotate on phaser's Groups. (I develop in Haxe with FlashDev by the way). I saw this thread : wich should answer my problem. But it's no use, here is what i have : at the beginning of the code (haxe is typed language wich export in javascript or other languages, but if you could help me in JS that should be enough) import phaser.core.Filter; private var hueFilter : Filter; //no problem for the moment ^^'' in the preload : game.load.script('ColorMatrixFilter', 'lib/pixi/filters/color/ColorMatrixFilter.js'); //--this give me an error : require is not defined in the create : hueFilter = untyped new PIXI.ColorMatrixFilter(); //--> this won't build flashDev tells me : Class not found PIXI and when i do this : untyped console.log(PIXI); //--> PIXI do exist! but there is no ColorMatrixFilter in it ! untyped console.log(PIXI.ColorMatrixFilter); //--> return undefined For the "require problem" i tried to use RequireJS in the index.html : <script src="lib/requireJS.js"></script> but it throws new error : Uncaught Error: Module name "../../core" has not been loaded yet for context: _. Use require([]) I believe i don't have to modify the ColorMatrixFilter.js to make it work so i don't know what to try next. I even try to use another filter (HueRotate.js) that i have found here : //build with no error ! but completly erase my images and fill all the canvas with the same color... to sum up i can't make it work... It's very frustrating because when my project only used pixi it was very easy : filter = new ColorMatrixFilter(); container.filters = [filter]; filter.hue( value , false); Can someone please help me, it has been one week since i have this problem. what do i miss ? Thanks
  10. Hello, I've got a problem that is starting to impact the performance of my game and I found through profiling that the MouseMove & ProcessMouseMove, are binded to the window "mousemove" event. They do fire correctly, but I simply need them to fire once per frame. ( They fire 5 - 10 times per frame which is normal ) Is there a way to do this in pixi with interactionFrequency, or do I need to do some hack ? Thanks in advance
  11. Hi All, Are there any cool/interesting JavaScript libraries out there that don't have any externs for Haxe? I already have hammer.js and in my to do list. Also if anyone is interested in contributing by creating/maintaining externs, please let me know so that we can collaborate instead of duplicating the effort. I also want to prepare a list of all the existing externs that are up to date and share with the community.
  12. Externs of Pixi.js for Haxe - 2D webGL renderer with canvas fallback. GitHub Repo You can find a lot of samples ported from Pixi.js there. Installation: haxelib install pixijsPost any haxe pixi.js samples, demos, tutorials, etc here.
  13. Released a new library for haxe code analysis which can easily be integrated with Hudson/Bamboo, etc. Any comments/suggestions, please let me know.
  14. Hello Everyone, First time post on this forum, and first Phaser project. I researched for this, and have had results but not complete results so I decided to post a topic. I'm not at all looking for a solution with code as I'm not looking to waste anyone's time here, but guidance will be much appreciated given my 'noob' status with phaser. My background might be helpful : I'm coming from actionscript/starling here, where 1. stage can be scaled 2. textures can have scales as well so that a texture of scale 1 that reports a size of 100x100, would also report a size of 100x100 when at scale .5, it's just that the original image would be twice smaller, starling would handle upscaling the texture. With that, placing objects dynamically is easy as I would not have to change the code used to place objects on stage because width/height of objects would not change, and the stage being scaled would also allow me to place things in absolute values and still get a proportionally similar result on different 'screens' at least when the ratio of the stage is the same. What I want is "best fitting" the base dimensions of my game to the current "container" dimensions (as well as centering it). The topic is mostly about two things : fitting the game in those "3 different target containers" and also handling multi-resolution. So I'm creating a game for 3 "target containers". By that I mean : 1. a variable width/height div, in a desktop browser (inside a website that I won't be in control of so the dimensions are not fixed) 2. in a mobile browser, this time full window (nothing but the div containing phaser will be on this page) 3. in cocoonJs As I would've done with a flash project, I've prepared a set of different sized assets. I'm detecting whether I'm in cocoonjs with the following //initisCocoon = Reflect.hasField(Browser.navigator,'isCocoonJS');The game is designed (at scale 1x) for a base 'screen' of size base = new Rectangle(0, 0, 2048, 1536);this is a Rectangle I can access everytime. So all my assets of scale 1x are prepared for this base screen size (for cocoonJs actually). and I have other sets of downscaled assets, here is the list of scales I have : scales = [0.25,0.375,0.5,0.75,1];also an array that I can access anywhere in case that matters. Now for cocoonJs and a full browser version of the game on desktop, I have the following setup , and it works fine : function init() { isCocoon = Reflect.hasField(Browser.navigator,'isCocoonJS') ? true : false; game.scale.scaleMode = isCocoon ? ScaleManager.USER_SCALE : ScaleManager.RESIZE; game.scale.canExpandParent = true; game.scale.setResizeCallback(onResize, this); if (isCocoon) { trace("[Main] is CocoonJS"); }else trace("[Main] is not CocoonJS"); game.scale.setScreenSize(); }function onResize() { if (isCocoon) { var w = Browser.window.innerWidth; var h = Browser.window.innerHeight; game.renderer.resize(w, h); game.scale.setScreenSize(); } }This works fine. Also in init and onResize, I also calculate the "scale factor" of my game realScaleFactor = game.width / base.width; //that's assuming the game is always in landscape and it is.and look for the closest Float to that Float in my "scales" array , in order to find the right scale assets for my "screen"... if my game.width is 1024, i'll be at a scale of 0.5 compared to my original dimensions for my game, and since I have such a downscaled version for my assets, i'll preload stuff from my assets/0.5x/ folder instead of the assets/1.0x/ I guess that all makes sense (unless there's a more obvious way to do this). Now the problem with my multi-resolution paragdim that I'm trying to "port" from starling . The basic idea again is to be able to use absolute values whenever possible, and relative values when placing ui stuff (because obviously some screens are larger than the ratio of the "base" rectangle). I would scale down the stage, and starling would scale up images with the scale property. that means I can download smaller textures, still have stuff appear at the right scale and an image would always be the right size when I read the width/height values. I just tried placing every Sprite I need in a container (group), scaling that container down. it's like a Show_All I guess. yet the images are 2x too small when I'm at a .5x scale so it's probably useless to go this way. Could I make those 3 targets work , and load different sized assets, using the SHOW_ALL technique and how can I tell the scale manager the "base dimensions" or ratio of my game it should respect in order to SHOW_ALL. - and does that work with cocoonjs. How are you guys handling multi-resolution , without having to manually scale images, or hardcoding screen values. And how can I setup the ScaleManager for the three "targets" I have... The problem being the div with the fixed width/height the game could run in and I don't know in advance its dimensions. --- I'm very confused and very sorry if the solution is obvious. My problem is being convinced that something needs to be done a certain way and not having the necessary knowledge to do it the Phaser Way so in that regard I thank you in advance for any links and suggestions to help me for both the "3 target" and the "applying multiresolution" problems I currently have.
  15. I've just released OpenFL-bitfive, an alternative backend for OpenFL' HTML5 target. Similar to its older colleague, OpenFL-bitfive allows one to target HTML5 platform while utilizing the comfortable Flash-like API of OpenFL. A difference is that bitfive is written specifically to pursue performance and compatibility in it's target sphere, being Canvas-driven games. This permits pleasant performance for games running on the backend, as well as mobile device compatibility. Installation and usage are pretty straight-forward - get haxelib, add one line into XML of project you want to compile with backend. Add another line or two and OGG files for cross-browser audio. Backend is compatible with HaxePunk and a number of smaller frameworks of this kind. "Plain" OpenFL projects should also work, depending on their configuration. I believe that technologies of this kind (having Flash and HTML5 targets at once) can be pretty useful in terms of both compatibility and monetization. And what do you think?
  16. Hi everybody! This is my very first post here on html5 gamedev! I have just released a demo of my upcoming game here: It's been made with haxe + pixi and it's my very first big html5 project. It's quite easy to play although at the moment it lacks a proper tutorial. I'll let you find how it works and update this post with new information as I make my way to the release. Targets planned: - desktop (mac, linux, windows) with node-webkit - tablets: Android and iOS. Please feel free to leave your comments. I will be glad to get some feedbacks! Thanks! François
  17. Hello and welcome to the Haxe JS forum. Thanks to @photonstorm for creating this dedicated forum for all Haxe developers targeting HTML5/JavaScript. For anyone who is new to Haxe, It is simple, lightweight, easy to learn, yet a very powerful strictly typed language with lightning fast compiler. Visit and start exploring. A few links to get started with Haxe JS. Use this forum to share your thoughts, questions and experience with Haxe when targeting HTML5/JavaScript.
  18. Haxe Phaser externs by @sgmacpherson can be found here. You can also find some samples here. Installation: haxelib install phaserPost any haxe phaser samples, demos, tutorials, etc here.
  19. Externs of Buzz for Haxe - A Javascript HTML5 Audio library. GitHub Repo Demo Installation: haxelib install buzzPost any haxe buzz samples, demos, tutorials, etc here.
  20. Externs of Howler.js for Haxe - Modern Web Audio Javascript Library. GitHub Repo Demo Installation: haxelib install howlerjsPost any howler.js samples, demos, tutorials, etc here.
  21. Hi, my 1st post here ! hello all ! I recently made the move from actionscript (AS3) over to Haxe and OpenFL, so i can develop games that compile to flash, html5 and native for mobile in future! - Berts Brain is my first creation, and the prototype version gained 3rd place in one of the 24 hour FGL game jams earlier in the year! (before i took most of the year off doing other things) - it took alot of time to get to the stage where a single source works in flash + html5 and mobile, but now i'm there,all my future games will be hybrid ones too ! Edit : Berts Brain Playable Link here's a link to some screenys on my portfolio site I'm hoping to sell some non-exclusive licenses for either flash or html5 versions, and am also looking to release a primary flash version (currently in bidding over on FGL with a few days to run) - i'm wondering if there are many other revenue avenues for html5 that i could explore too ?? screenshot below :
  22. Hi, All! Here is our new HTML5 game. Just simple space-shooter. Features: None significant Screenshots: Link: Alien Encroachers Looking for sponsorship, feel free to PM.
  23. Hi folks, i put a free State-Machine on github. It is written in Haxe for the OpenFL framework, but can be easily adapted for other frameworks like Flambe. Have fun!
  24. I finished my second Ludum Dare game, Dungeon Break! Link: Story: A deranged wizard has trapped you in his magical dungeon deep beneath the ground! To escape you need exploit the dungeon itself. Reach the stairs to get to the next level and finally -- to the surface and to freedom! Controls: Mouse/touch only. Click adjacent tiles to move left/right/up/down. Click and drag (e.g. swipe) tiles to push rows horizontally and columns vertically. NOTE: Rows/columns containing "X"-blocks cannot be pushed. Development tools:Coded in Haxe using the Flambe game engine. Graphics are doing using Pixelmator. Music is made using Autotracker + Audacity. Sound effects are made using Sfxr (procedurally).
  25. Hi, I'm about to start creating a little game and I'm considering using createJS. I see that there are Haxe externs files and Typescript definitions files for these libraries. What would be the advantages of choosing one above the other? Both Haxe and Typescriot are easier languages to work with than Javascript. What would you choose? Pure javascript, haxe or typescript? Are there other things to be concerned about? I currently use Phaser, Construct 2 and PandaJS for my client work but I'm trying to use createjs for little projects.