00:00
00:00
ninjamuffin99
I like Newgrounds stuufff

Cameron muffin99 @ninjamuffin99

Age 24

Money

Middle School Dropout

Toronto, Canada

Joined on 10/2/15

Level:
47
Exp Points:
23,859 / 24,520
Exp Rank:
595
Vote Power:
8.78 votes
Audio Scouts
10+
Art Scouts
10+
Rank:
Pvt. First Class
Global Rank:
2,904
Blams:
586
Saves:
2,467
B/P Bonus:
20%
Whistle:
Silver
Trophies:
85
Medals:
513
Supporter:
8y 7m 3d

HAXEFLIXEL TIPS AND TRICKS #1: COMMAND LINE BASICS

Posted by ninjamuffin99 - March 25th, 2020


Newgrounds is currently hosting a HaxeFlixel game jam! Nearly every single game I have made on NG has been made with HF, so I’ve been around the block with this little framework. HaxeFlixel has been pretty pleasant to work with for me personally, HOWEVER there are definitely quirks and odd things I’ve noticed here and there. To help all the potential newcomers to HaxeFlixel, or even programming in general, I’ll be writing a few tips and tricks posts here on NG.


At the end of each post I'll leave a few potential future subjects, leave a comment on which ones you'd like me to write up next.


Most of these will assume that you’ve been through a barebones tutorial of HaxeFlixel, probably the one on the HaxeFlixel website, but certain ones will be applicable for general programming knowledge.


Since this is on the frontpage I'll also use this as a little index

  1. Command Line Guide (ur already reading it lmao)
  2. Working with Flash art/animation
  3. HTML5 export tips


QUICK COMMAND LINE GUIDE

Here’s something that not too many give thought into for novice programmers. The command line can be a bit daunting for people who just want to dip their toes into frameworks like HaxeFlixel. Here’s basically most of what you need for basic HaxeFlixel navigation, installation, and general use. It’s not as scary as you think.


First off, to open the command line on WINDOWS, type ‘cmd’ into either Windows search, or press Win + R, then type in ‘cmd’.


iu_104165_5520715.png


THE CD COMMAND

cd <directory>

‘cd’ stands for ‘change directory’. At least that’s what it does. Allows you to change directories. Say you’re in your user folder on your computer

c:\Users\ninjamuffin99>

It might look something like that. Let’s hop into our Documents folder

c:\Users\ninjamuffin99>cd Documents
c:\Users\ninjamuffin99\Documents>


Easy as that, you just moved into your Documents folder.


Maybe you want to create your HaxeFlixel projects in a specific folder within your documents, one called ‘HaxeFlixel-Projects’. Easy. type in ‘cd HaxeFlixel-Projects’ (NOTE: for the sake of tutorial, create this folder in Windows File Explorer as you would normally create a folder, and THEN follow this step)


c:\Users\ninjamuffin99\Documents>cd HaxeFlixel-Projects
c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>

Woah look at that you’re in… but how do you get out? Two periods, ‘..’, refers to the relative parent directory when it comes to all this fancy command line stuff. Right now we’re in ‘HaxeFlixel-Projects’, so ‘..’ refers to ‘Documents’. If you use ‘cd ..’ you will move to ‘Documents’


c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>cd ..
c:\Users\ninjamuffin99\Documents>

Wanna use it again? 

c:\Users\ninjamuffin99\Documents>cd ..
c:\Users\ninjamuffin99>


Just like that you’re in your main Windows user directory. While this example uses Windows, the ‘cd’ command is pretty much universal across Windows, Mac, and Linux. Let’s go back to our projects folder. However this time let’s try out a quick little feature of most command lines, tab auto-complete. A few letters into typing the ‘Documents’ part of ‘cd Documents’, press the TAB key on your keyboard. It should autocomplete! It saves a bit of time, and I guess prevents potential typos. Try it with ‘HaxeFlixel-Projects’ as well, since that’s a handful to type out so often.

c:\Users\ninjamuffin99>cd Documents
c:\Users\ninjamuffin99\Documents>cd HaxeFlixel-Projects
c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>

There we go. That’s all nice and handy, but how do we even figure out what folders we can move into? How to we LOOK at what folders are in our current folder?


DIR / LS

dir (Windows)
ls  (Mac and Linux)


These commands work in pretty much the exact same way. They show you the current directory.

C:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>dir
Volume in drive C has no label.
Volume Serial Number is 7CF9-09E9
 
Directory of C:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects
 
03/25/2020  12:04 PM    <DIR>          .
03/25/2020  12:04 PM    <DIR>          ..
03/25/2020  12:04 PM    <DIR>          Cityhoppin2
03/25/2020  12:03 PM    <DIR>          CoolGameHaha
03/25/2020  12:04 PM    <DIR>          Vervian
              0 File(s)              0 bytes
              5 Dir(s)  168,012,500,992 bytes free
 
C:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>

Typing in ‘dir’ will output something like this. This is what it looks like in Windows File Explorer


iu_104167_5520715.png


And that’s it! Simple command, but useful for knowing what is where. Assuming you went through the HaxeFlixel tutorial, let’s use ‘CoolGameHaha’ as our current project. (This should be a template file created by Flixel, don't know what I'm talking about? Go here)

c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects>cd CoolGameHaha
c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects\CoolGameHaha>


CODE

code <directory>

If you have Visual Studio Code installed (which is the recommended code editor), you will also have ‘code’ available as a command. It opens up whatever input directory into a new window of Visual Studio Code. We are going to use it to open up our current project easily.

code .

This command is using ‘.’, a single period, as a directory. The double period ‘..’ refers to the current relative PARENT directory. A single period ‘.’ refers to the CURRENT directory. So run this should pop open Visual Studio Code in the current directory!


c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects\CoolGameHaha>code .

iu_104166_5520715.png


Now you can get working!


OPENING UP THE WINDOWS FILE EXPLORER

Maybe you want to open up the Windows File Explorer. You might want to drag and drop some files, or maybe you just want a nicer visual of your directories or whatever. From the command line this is done VERY easily.

start .

Similar to the ‘code’ command, we are using it in our current directory.

c:\Users\ninjamuffin99\Documents\HaxeFlixel-Projects\CoolGameHaha>start .

Opens up this!


iu_104169_5520715.png


Finally, I’ll show you how to do it in REVERSE. What do I mean by that? I mean using the FILE EXPLORER to open up the command line in the current directory.


In the address bar of the File Explorer, you can type shit in

iu_104168_5520715.png


Click on it, type in ‘cmd’ and press enter


iu_104171_5520715.png


This should open up a command line in your current directory (from File Explorer)


iu_104170_5520715.png


If you’re a bit uncomfortable doing a bunch of command line navigation, this might be a nice in-between.


That’s it for this quick little guide, it’s not HaxeFlixel specific, HOWEVER I believe it’s still very useful for people who are new to HaxeFlixel, as HaxeFlixel often requires you to hop into the command line for one reason or another.


I’ll try to write a guide everyday or so for the next week or so.

Drop a follow lmaooo and happy coding with the game jam!


Tags:

41

Comments

great lil tutorial

didn't know about how to open up cmd in file explorer very based

it def helpful and saved me a lot of typing lmao

what a helpful cam

u kno me luis

what?

dunno dont ask me

This quick guide took about quarter of hour. Not so quick as expected.

does this work with flash

- thanks
snackers

flash is dead, animate with HTML5

@Snackers @ninjamuffin99 Ok.

haven't tried it yet but friday night funkin 2 is now in development >:]

i cant compile the fnf master thing pls halp

i just wanna do a mod

woah nice tricks magic muffin man

Enjoyed it!

I was able to do everything in order to compile FNF, but when I finish downloading and setting up haxeflixel, file explorer breaks and crashes everytime I open folders or right click files, is there any way to fix this, I just wanted to mod the game.

How do I fix this when exporting?

Standard library not found. Please check your `HAXE_STD_PATH` environment variable

I tried everything I could find but none of them worked

yellow discord lol

helped me compile fnf its pog

visual studio code is pissy

thanks now i can make a mod from your game lol

love this

thank you minjiduffin69

More Results