That's awesome! Great to see HaxeFlixel getting some love!

Vasco
@Vasco
Independent game developer, created the popular Flash (and now mobile) games G-Switch and Freeway Fury.
Posts made by Vasco
-
RE: Newgrounds HaxeFlixel Gamejam
-
RE: Is Flixel devscene healthy?
I would like to know this too. I am thinking of working on a big project with HaxeFlixel, but I worry if it will bring problems in the future if it becomes outdated...
-
RE: Window closes when using FlxShapeCircle
Is that all the code? You also need an update function (besides create()), otherwise the program just ends. You will also need to add the circle to the state. Using your example:
package; import flixel.addons.display.shapes.FlxShapeCircle; import flixel.FlxState; class PlayState extends FlxState { var circle:FlxShapeCircle; override public function create():Void { super.create(); circle=new FlxShapeCircle(100,100, 100, null,0xFF8899); add(circle); // add circle to the state so it's displayed } override public function update(elapsed:Float):Void { super.update(elapsed); } }
-
RE: Splash screen and logo
In Main.hx, FlxGame has an argument for skipping the splash screen. For example:
addChild(new FlxGame(800, 600, PlayState, 1, 60, 60, true));
For changing the cursor image, you can use the FlxG.mouse.load() function. For example:
FlxG.mouse.load("assets/images/my_cursor_image.png");
-
Flashing sprite effect in html5
In other targets, I would use a sprite's blend mode to achieve a white flash effect on a sprite, such as:
highlight = new FlxSprite(0, 0, "assets/images/sprite.png"); highlight.blend = BlendMode.ADD;
But this doesn't seem to work in html5. The closest thing I've found is this demo with GLSL shaders, but I've not been able to get the desired effect from it; I'm not even sure if it's possible since the demo seems to apply the blend modes to the camera.
Using flixel 4.4.2 and openfl 8.3.0. Any help is much appreciated, thanks.
-
Best way to make game with vectors / shapes
My next game will be using "vector graphics", so basically I will just use lines/shapes instead of bitmap graphics.
I realize that HaxeFlixel is probably not the most well-suited framework for this, but since I have been using flixel for years now, I would prefer to not have to learn a whole other engine, if possible.
So I've been testing the shape functions in HaxeFlixel, and here are the problems I've encountered:
- Since the shapes are drawn to a bitmap, I can't zoom in as much as I want without making the shapes pixelized. This is problematic since I would like to zoom the game in/out by a factor of about 4x.
- When I zoom out, since the shapes are actually bitmaps, the anti-aliasing is not great. It might be acceptable, but it's noticeably worse than when viewing at 100%.
- It would also be a nice feature to be able to maintain the thickness of the lines independently of the zoom.
I've noticed that when using shapes directly from OpenFL, I can scale the shapes and they are always smooth. But then I lose all the nice HaxeFlixel features such as camera zoom, and the performance is probably worse (although I still need to test this).
This is a desktop game with cpp target, so hardware rendering is preferred.
Is there a better way to do this that I'm missing? Any suggestions are much appreciated, thanks.
-
Is there a faster way to draw shapes?
My next game is going to make heavy use of shapes (especially polygons), and I would like for some of those shapes to change in real-time (mostly by moving the vertices). I've noticed that calling
drawPolygon(vertices, fillColor, lineStyle, drawStyle)
every frame is a bit expensive, so I was wondering if there is by any chance a more efficient way of doing this? I'm only concerned with desktop targets. -
RE: Sprites blurring colors between frames
@duskypixel Perhaps adding a row of transparent pixels above and below each button frame would solve this?
-
RE: Taps not detected near edges of screen on iOS device.
I just wanted to add that this happens even in a minimal haxeflixel template project.
If anyone could confirm this it would be great help.
-
Taps not detected near edges of screen on iOS device.
At first I thought this was a hardware issue, but then I noticed that only my most recent game wasn't detecting touches near the top and bottom of the screen reliably (in landscape position). Other apps (including older games I made with HaxeFlixel) work fine. I am using HaxeFlixel 4.3.0, and have been testing on an iPhone 5s. This problem does not occur in the simulator, nor on Android devices.
Detailed characteristics of the problem:
- Taps near the longer edges of the screen are not detected by FlxG.mouse.pressed and FlxG.touches.list remains without entries.
- While no entry is created in FlxG.touches.list at the moment I tap near an edge, an entry is created when I release the tap, with FlxG.touches.list[0].pressed as false.
- The tap is detected near edges after I hold it for about 1 second.
- The taps near the edges are also detected (immediately) if I am holding another finger on the screen elsewhere (even near an edge).
Also, the game runs smoothly at 60 fps, so it is not a performance issue.
Any ideas of what could be causing this? Thanks in advance.