Questions tagged [haxe]

Haxe can build cross-platform applications targeting JavaScript, C++, C#, Java, JVM, Python, Lua, PHP, Flash, and allows access to each platform's native capabilities. Haxe has its own VMs (HashLink and NekoVM) but can also run in interpreted mode. Code written in Haxe can be compiled to any target Haxe supports.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Using Haxe, how can I generate python code with type hints?

I want to write a cross-platform library with Haxe. But when I compile Haxe to Python, there is no type hint in Python code. How to let Haxe generate type hints to Python code? This helps users use my ...
Nhan Nguyen's user avatar
0 votes
1 answer
21 views

Opening and using DLL created with HXCPP

I successfully (hopefully) have created a DLL using HXCPP, however I am having a hard time trying to open and use it with an HXCPP application. I tried using this, and it works for the DLL (Lib/), but ...
îndigoUán's user avatar
0 votes
1 answer
47 views

Counter that shows only at the end in HaxeFlixel

I'm doing a simple counter ( that counts from 1 to 10 seconds ) and is working but not on the screen. It does the counting (1, 2,..., 10) in seconds but only 10 appears on screen when it reaches 10! ...
jinn8's user avatar
  • 1
0 votes
1 answer
17 views

FlxG.overlap doesen't work correctly when changing angle of an object

FlxG.overlap won't work correctly when I change the angle of an object. The object's hitbox is still where it would have been if it wasn't angled. I don't know how to fix that. I tried updating the ...
Zbyszeq's user avatar
1 vote
0 answers
43 views

Running libraries with Haxelib leads to `Module not found`, printing out a path containing ^'s [duplicate]

Calling haxelib run <LIBRARY> <ARGS> leads to Uncaught exception - load.c(181) : Module not found : ^C:\HaxeToolkit\haxe\lib\<LIBRARY>/<VERSION_NUM>/run.n^ with carets (^) ...
incognitoknose's user avatar
2 votes
0 answers
21 views

How do I remove FLX trail or change it's parent object or image?

I'm trying to change an object whilst using an Flx trails, but it doesn't update when the object changes. This causes the entire trail to continue till the last frame of the animation where it stays ...
Marxiplier's user avatar
1 vote
1 answer
29 views

sys.io.File.saveContent and sys.FileSystem.deleteFile failing for unknown reasons

i have encountered some strange issues when it comes to deleting or overwriting files in all haxe/haxeflxiel projects, it used to work fine then suddenly stopped working a while ago, all of them are ...
WeegeeDatBagel's user avatar
2 votes
1 answer
54 views

Haxe: get path to the `std` library

I need to get path to the std folder of Haxe. On Linux system it can be /usr/share/haxe/std, on Windows -- C:\HaxeToolkit\haxe\std\. There are haxelib config, haxelib path and haxelib libpath commands,...
XorNut's user avatar
  • 23
1 vote
0 answers
33 views

Haxe convert fnt to bfnt?

can you guide me to convert fnt font to bfnt? i just want to create 1 bfnt font to make game mod. Hope everybody help please. enter image description here I tried installing haxe and creating projects ...
Nguyễn My's user avatar
0 votes
1 answer
73 views

How change the icon on the game?

I need help with adding an icon to my application using the "Haxe" engine. Can someone guide me on how to achieve this using XML or code? Also, I am attaching an image of my VSC code and ...
Scarlet Eye's user avatar
0 votes
0 answers
19 views

Generate function by its arguments and internal call arguments on a HAXE

Trying to generate the functions to fill lthe class with api methods. not sure how to determine function argument parameters from strings and internal call valuable arguments var todo:...
Продавец Кошмаров's user avatar
2 votes
1 answer
42 views

What causes Haxe error "Invalid build parameters"

When I try to compile my project, Haxe gives a single line of output: > haxe build.hxml MyClass.hx:3: character 1 : Invalid build parameters The line number points to a class in my code that looks ...
Jeff Ward's user avatar
  • 16.8k
0 votes
1 answer
47 views

Haxe 4..x support for inlining delegate calls

In the recent HaxeUp talk somebody mentioned inline delegates support in Haxe 4.x and I am looking for an example of how this works. I would expect something like this (this does not compile): ...
bh213's user avatar
  • 6,403
0 votes
1 answer
45 views

Haxe server socket stops and does not recive messages from client after connecting?

I have my server written in haxe using sys.net.Socket, and clients connect to server succesfully, however after starting a thread for client, it stops at the line where it should recive the message, ...
feweks's user avatar
  • 1
2 votes
1 answer
58 views

Flatten class fields like module-level fields?

I'm trying to use Haxe to generate a Javascript file in which each static function/variable is named like a module-level field (package_ClassName_fieldName rather than package_ClassName.fieldName). I'...
Random Person's user avatar
2 votes
1 answer
64 views

Is it possible to debug (step-through) expanded Haxe macro code?

This one is for build macros but would appreciate answer for other macro types as well. I'd like to step-through the generated code by @:autoBuild(hxparse.ParserBuilderImpl.build()), eval debugger ...
bh213's user avatar
  • 6,403
0 votes
0 answers
79 views

How would I use the FlxTrailArea to move an FlxTrail's x and y to be relevant with an FNF character's position similar to the Ronald Mcdonald mod?

FlxTrailArea official explanation <- FlxTrailArea FlxTrail official explanation <- FlxTrail YouTube gameplay footage <- The video footage of the described trail movement (red afterimage) This ...
The Drew's user avatar
0 votes
1 answer
46 views

What does the seek method in the FileInput class?

That (https://api.haxe.org/sys/io/FileInput.html) class has the seek(int, enum) method. What it does?
EnDelta's user avatar
  • 13
0 votes
0 answers
76 views

Haxeflxiel error loading asset on startup on html5, wont make it past preloader

Compiling to html5 most of the time reports haxe_ValueExeption errors when loading and wont make it past the preloader and start running the actual game Whenever i compile to html5 it compiles just ...
WeegeeDatBagel's user avatar
0 votes
0 answers
105 views

How to use clang compiler with a haxe toolkit?

I want to build my haxe project with a clang compiler. I create the following "build.hxml" file: -lib hxcpp -cpp-compiler /usr/bin/clang++ -D linux -D STATICLIBPREFIX= -D HXCPP_CLANG -D ...
nen777w's user avatar
  • 87
1 vote
1 answer
71 views

In haxe macro, how can I get a type by using a Type name

In the haxe expression macro I have the following code: var t = haxe.macro.Context.getType("h2d.Object"); I'd like to get the type without using a string. Something like this: var t = callX(...
bh213's user avatar
  • 6,403
1 vote
0 answers
59 views

I'm trying to debug a haxe program in visual studio code but Type:Error Cannot read properties of null (reading 'toString')

debug error you can find the code here under canaanreborn2020prealpha/game-master I was trying to haxe compile.hxml but Field drawContent overrides parent class with different or incomplete type so I ...
F. Andrés's user avatar
1 vote
1 answer
64 views

How to parse LuaDoc param comments using Haxe's hxparse

I'm trying to parse some specific lines of LuaDoc using hxparse. Those lines looks like this: ---@param name type description where the type can also be a sum type so in reality it can be string|...
Danielo515's user avatar
  • 6,240
1 vote
1 answer
68 views

Return anonymous structure from expression macro

Given a map Map<String, Int> how can I create anonymous structure from expression macro? This is what I am trying to achieve: var res = myMacroFunc(["var1"=>12, "var2"=>...
bh213's user avatar
  • 6,403
0 votes
2 answers
135 views

Can I do a color swap like Among Us in OpenFL?

Can I do a color swap like Among Us in a game I am creating with Haxe, OpenFL and HaxeFlixel? I found a sprite from Among Us that looks like this Among Us Idle Sprite Can I use shaders or code to make ...
Tombuntu's user avatar
-1 votes
1 answer
53 views

CreditsState.hx:85 : characters 6 - 11 : Expected , or ]

So im trying to code some credits to a game, and when i try to compile it, errors like "Expected , near ]" appears. Heres the code if you need (https://i.stack.imgur.com/DDFW9.png) I ...
Skid Gaming's user avatar
1 vote
1 answer
98 views

How to set initial size of OpenFL window on native targets, while allowing the html5 target fill the entire browser window?

In my OpenFL project.xml file, I set the initial dimensions of the window: <window width="960" height="640"/> This works great on native targets (windows, mac, linux, hl, ...
Josh Tynjala's user avatar
  • 5,235
2 votes
0 answers
97 views

HAXE - Standard library not found. check "HAXE_STD_PATH" enviroment variable

whenever i try to compile using "lime test windows" (im trying to compile friday night funkin) it gives me this error: "Standard library not found. Please check your HAXE_STD_PATH ...
Arm4GeDon's user avatar
1 vote
1 answer
352 views

Creating a second game window in HaxeFlixel

I wanted to add a second window and I even succeeded, but it is empty and I don’t know how to add anything there, I also couldn’t find a normal description of what is responsible for what. I can’t ...
Pyr0Guy's user avatar
  • 21
1 vote
0 answers
86 views

How do I put a camera on a separate window without lag?

The current way I'm doing it works, but is really heavy on performance, and I'd like to reduce the lag as much as possible. Basically I'm copying the pixels of said FlxCamera onto an FlxSprite, and ...
KutikiPlayz's user avatar
0 votes
1 answer
66 views

Ignore transparent pixels on sprite

So I need the sprite to get bigger when I hover over the sprite with the mouse. But the problem is that the sprite has an unusual shape, which leaves a lot of transparent space. And the mouse reacts ...
Pyr0Guy's user avatar
  • 21
0 votes
1 answer
97 views

How do I solve this error: "source/MainMenuState.hx:25: characters 7-21 : Unexpected selectedOption"

I'm fairly new to HaxeFlixel and I wanted to see selectedOption change to see if there were any mistakes. But I was met with this error: This is the file that had the error (MainMenuState.hx): ...
Tethrarxitet's user avatar
0 votes
0 answers
123 views

SetLayeredWindowAttributes not working under certain conditions

I'm making this app in Haxe which compiles to C++ code. I'm using the SetLayeredWindowAttributes() function to set the background of the window to be fully transparent. The problem is that this works ...
Koharu Xenon's user avatar
0 votes
1 answer
158 views

Unable to install Haxelib Flixel

I am trying to download source code for a project, and it requires a list of installations for "HaxeFlixel". However, when I attempt to install Filxel in the command prompt. It states the ...
Radimus Valdes's user avatar
0 votes
1 answer
107 views

type safe create Lua tables in Haxe without runtime overhead and without boilerplate

I am trying to write some externs to some Lua libraries that require to pass dictionary tables and I want to make them type safe. So far, I have been declaring abstract classes with public inline ...
Danielo515's user avatar
  • 6,240
1 vote
0 answers
34 views

FlxButtonPlus not responding to anything inside of game's pause menu

I am using the haxeflixel game framework to create a game and I was making a pause menu. I tried using the default FlxButton but the collision with the mouse never lined up properly. So I tried using ...
ObviousAlexC.'s user avatar
0 votes
1 answer
42 views

how do i fix expected error on a case when compiling

Where did I go wrong with this code? I've done lots of changes but it just seems to give the same error all over and over again :/ function changeDifficulty(change:Int = 0):Void ...
HollowFans's user avatar
1 vote
0 answers
137 views

How to change FlxG width and height, ResizeGame doesn't work

how do i change FlxG width and height in runtime as resizeGame doesn't do anything i have the project by default set to 1600 x 900 and i have a state for settings where i can change the resolution and ...
WeegeeDatBagel's user avatar
1 vote
1 answer
93 views

Haxe doesn’t have the Literal types?

TypeScript and Python (3.8.x and newer) supports Literal types but looks like Haxe doesn’t (for now). I need to pass a string to the function without typos like in following code. TypeScript: type ...
EnDelta's user avatar
  • 13
0 votes
2 answers
112 views

How I can throw a ray between camera (my eyes) and the mouse cursor on a VR Simulation?

I'm trying to click on VR simulation mode in the browser (Will also be used on mobile), and show a yellow ray from the camera (my eyes/center of window) to the mouse cursor, but I can't get the right ...
Fox Fairlane's user avatar
1 vote
1 answer
125 views

Haxe implicit casts in an abstract based on haxe.ds.Either with Class as a type

I want to use the method described in this article: https://code.haxe.org/category/other/passing-different-types-to-a-function-parameter.html It works fine as long as I provide "concrete" ...
vrumie's user avatar
  • 11
0 votes
1 answer
265 views

How do I create an animation using an xml file with haxeflixel?

So I'm trying to add an animation in haxeflixel and i cant get it to work. So I want to use the .xml file that came with it so I can get width, height, and name of the animation. Here is my sheet and ...
FunFox's user avatar
  • 37
0 votes
1 answer
146 views

How can I play Sound more than once in Haxe/Heaps?

I'm using Heaps.io Game Engine for Haxe and currently trying to play sound WAV file from my resources every time a specific event happens. But it always plays only first time, then nothing. Code ...
Nick's user avatar
  • 1
-1 votes
2 answers
645 views

I cant compile psych engine because of this error

C:/HaxeToolkit/haxe/lib/lime/8,0,0/src/lime/media/AudioSource.hx:119: characters 20-28 : lime.media._AudioSource.AudioSourceBackend has no field setPitch C:/HaxeToolkit/haxe/lib/lime/8,0,0/src/lime/...
Qdegon's user avatar
  • 1
0 votes
1 answer
77 views

HEX query automation

I have a control bord installed on a remote digital signage totem. The card is connected via RS232 to an IP adapter which I can connect remotely. I need to send it HEX commands every hour, get the ...
Elad's user avatar
  • 1
0 votes
0 answers
114 views

How do I iterate in a dynamic list?

I'm trying to iterate through a list of objects that I added to a list, but I'm getting an error. source/PlayState.hx:71: characters 16-21 : Unknown identifier : notes It says in VS Code that it's ...
wideey's user avatar
  • 13
0 votes
1 answer
176 views

How can I rezise an image in Haxeflixel?

I'm trying to set up a background in my game, and I want it to support multiple resolutions. I've tried using the scale trigger, but I'm pretty sure it multiplies the dimensions by the value. I need ...
wideey's user avatar
  • 13
0 votes
1 answer
90 views

How can I choose my own build file in vs code?

It`s my first steps in Haxe) I need to build task with my own build task in VS code. I know that I can choose build task to run by using Shift+Ctrl+B, but no drop down list opens... And when I did ...
Vere_spiritum's user avatar
0 votes
1 answer
119 views

Cant make multiple sprite using 'for' loop in Haxeflixel

I want to make the same sprite be created as many times as there are values ​​in "iteraktList". Let's say iteraktList is equal to two sprites. But the sprite is created only once and in the ...
Pyr0Guy's user avatar
  • 21
1 vote
1 answer
152 views

Haxe: How do I repeat a string n times

I want to repeat a character or string, such as "Z", a specific number of times (let's say 5 times). I could easily do it in a loop, of course, like this: var combined = ""; for(i ...
Josh Tynjala's user avatar
  • 5,235

1
2 3 4 5
33