00:00
00:00
View Profile MigMoog
So handsome it hurts

Gary Manashelnkonson @MigMoog

Hog Farmer (he/him)

Residential Bigman

The brutal jungle

Joined on 6/3/20

Level:
16
Exp Points:
2,835 / 2,840
Exp Rank:
16,794
Vote Power:
5.85 votes
Rank:
Portal Security
Global Rank:
21,736
Blams:
253
Saves:
206
B/P Bonus:
8%
Whistle:
Normal
Trophies:
9
Medals:
383
Supporter:
23d

Latest News

More

If you're new to haxeflixel and you're using Visual Studio Code, then this is one of the most valuable pieces of advice that I can give you:


STOP USING LIME TEST!


When you want to play and test your projects (which you'll most likely be doing in html5), the default command you'll use is "lime test html5". This will build your project and get a server running for it to run on, and it'll open a tab in your browser for you to test your game. The issue with this is 2 things:


  1. The server runs only one build of the game, so if you want to rebuild and test it, it will open a new tab rather than receiving those changes live.
  2. It is unknown to us why, but sometimes the lime gods can be cruel and throw an unknown error at us that will prevent the build from running


But fear not dear Flixian! For there is another path you can take to test your games in html5 in VScode! And it is called Live Server! Live Server is a fantastic extension for vscode, that runs html5 code and refreshes to show any changes that you've made in the IDE. That means no more opening tabs, and no more praying to the lime gods to get that server connection working. The only thing you have to do is make ONE tiny edit to your project's build system.


To get live server going first search for it in the extensions tab and install it:

iu_408043_8036913.png


Then, go into .vscode/tasks.json and make this edit:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "lime",
            "command": "test", // change "test" to "build"
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}

This will make the default command run with Ctrl+Shift+B "lime build", meaning it will build the project but not create a server/tab for it. The final step is actually running Live Server after you've built the project. To do that, click the "Go Live" button in the bottom right of the editor:

iu_408045_8036913.png

Once clicked, a tab will open in your browser with this window with a list of the projects folders. The html file of your project will be located in export/html5/bin, so just click on the according folders.

iu_408044_8036913.png

iu_408046_8036913.png

iu_408047_8036913.png

once you click on bin, live server will run your project and refresh for any changes to the code in the IDE (including each time you build). Sometimes you might get an error and your game won't run, but it's usually nothing a refresh of the tab can't fix.


Or, if you don't wanna go through all those clicks you can go into the settings of the extension, click on this:

iu_408963_8036913.png

and it'll open a json file where all you have to do is:

...
    "vsicons.dontShowNewVersionMessage": true,
    "security.workspace.trust.untrustedFiles": "open",
    "liveServer.settings.multiRootWorkspaceName": "export/html5/bin",
    "liveServer.settings.root": "/" // change this to "/export/html5/bin"
}

(thanks to @BobbyBurt for showing me this)


If you don't want to edit tasks.json every time that you create a new project, I have a flixel template that comes with it preconfigured for you, alongside some other things that I find handy. That's about it, so have fun and happy travels making your games!


6

Recent Game Medals

6,425 Points

Bruckheimer 10 Points

Make a big explosion!

Ant Smoosher 10 Points

If you do see Peter the Ant by chance, smoosh 'em.

Extra Brutal 10 Points

The uh, safety wasn't off there.

Censorsh*t 5 Points

Now everyone knows you like uncensored NG humor.

E-Famous 10 Points

Finish the game

borger 5 Points

yummy yummy yummy yummy yummy

1 5 Points

win first level

Yeti Degree 5 Points

Score 15 points in the "Holy Crap a Yeti" arcade

oops 25 Points

accidentally kill 25 civilians in one sitting

Secret Medal ????? Points

Unlock this medal to learn its secrets!