Skip to content

Commit 3491d5a

Browse files
Removed bad unused code and updated some files
1 parent 4d5882e commit 3491d5a

File tree

8 files changed

+51
-861
lines changed

8 files changed

+51
-861
lines changed

COMPILING.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# How to Compile Starcore's Source Code
22

33
This guide will provide you every step needed to compile and run Starcore.
4-
__**Please follow and read each step carefully in order for the game to compile and run successfully.**__
4+
__**Please read and follow each step carefully in order for the game to compile and run successfully.**__
55

66
## Global Setup (Every Platform)
77

8+
These are the necessary steps required to compile on the game on __***every***__ platform. If you're on either Windows, macOS, or Linux, then read the applicable sub section in section `Extra Steps (for Running and Configuring the Game on Other Platforms)` below.
9+
810
1. Download the [Haxe programming language](https://haxe.org/downloads/). TODO: test version 4.3.4 for compile version!
911
- When you download the necessary installer, just use the default options and configurations.
1012

@@ -33,6 +35,7 @@ __**Please follow and read each step carefully in order for the game to compile
3335
- This will allow you to compile and run the game on many common platforms, such as every major desktop platform (Windows, macOS, Linux, etc.), both popular mobile systems (Android and iOS), and more.
3436

3537
10. Run `lime test html5 --connect 6000` to compile and run the game on the web.
38+
- You can find the compiled code in the `export/test` folder.
3639

3740
> [!TIP]
3841
> You can replace `html5` with other platforms to compile it accordingly.
@@ -44,7 +47,7 @@ __**Please follow and read each step carefully in order for the game to compile
4447
1. Navigate to the [setup](setup/) folder and run the `msvs-setup.bat` file to install Visual Studio.
4548
- This will install everything needed to compile the game to become a Windows application. **This can take a while, so please be patient.**
4649

47-
2. When it is done installing, you can then run `lime test windows` to compile the game for Windows.
50+
2. When it is done installing, you can then run `lime test windows --connect 6000` to compile the game for Windows.
4851

4952
### macOS
5053

CONTRIBUTING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,16 @@ function getLastpressed():FlxKey
9090
```
9191

9292
> [!TIP]
93-
> You can format a file on VS Code with `SHIFT` + `ALT` + `F` to match the code style standards, although just know that it won't fix typos or correct your grammar, thats all on you!
93+
> You can format a file on VS Code with `SHIFT` + `ALT` + `F` to match the code style standards, although just know that it won't fix typos or correct your grammar, that's all on you!
9494
9595
## Things You CANNOT Do
9696

9797
Excluding *collaborators*, there are some files that contributors simply cannot change or delete.
9898

9999
1. You are not allowed to change these files:
100+
- Any files in the [.github folder](.github/)
100101
- Any files in the [setup folder](setup/).
101-
- Any files in the [unused folder](unused/), that's for the collaborators!
102+
- Any files in the [unused folder](unused/).
102103
- `.gitattributes`
103104
- `.gitignore`
104105
- `.prettier.js`

project.hxp

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Project extends HXProject
153153
info('Git Commit: ' + getGitCommit());
154154
info('Git Modified? ' + getGitModified());
155155
info('Display? ' + isDisplay());
156-
info('-------------------------------------------------------------');
156+
logSeparator();
157157
}
158158

159159
/**
@@ -264,7 +264,7 @@ class Project extends HXProject
264264
error('Unknown target platform type (got ${platformType})');
265265
}
266266

267-
// Print whether we are using HXCPP, HashLink, or something else
267+
// Print whether we are using HXCPP, HashLink, or something else.
268268
if (isWeb())
269269
{
270270
info('Target Language: JavaScript (HTML5)');
@@ -300,7 +300,7 @@ class Project extends HXProject
300300

301301
for (arch in this.architectures)
302302
{
303-
// Display the list of target architectures
303+
// Display the list of target architectures.
304304
switch (arch)
305305
{
306306
case Architecture.X86:
@@ -342,71 +342,71 @@ class Project extends HXProject
342342
function configureFeatureFlags()
343343
{
344344
// Enable Discord rich presence
345-
// (works only for Windows)
345+
// (works only for Windows).
346346
DISCORD_RPC_ALLOWED.apply(this, isWindows());
347347

348348
// Enable dope ass screen filters
349-
// (if the platform is on desktop)
349+
// (if the platform is on desktop).
350350
ADVANCED_SHADERS_ALLOWED.apply(this, isDesktop());
351351

352352
// Enable the editors if the game is in debug mode,
353-
// otherwise, disable them of course
353+
// otherwise, disable them of course.
354354
DEBUG_EDITORS_ALLOWED.apply(this, isDesktop() && isDebug());
355355

356356
// Enables dope ass logging
357-
// (only works on desktop)
357+
// (only works on desktop).
358358
LOGGING_ALLOWED.apply(this, isDesktop());
359359

360360
// Allows the game to programmatically change sounds
361-
// (only works on desktop)
361+
// (only works on desktop).
362362
SOUND_FILTERS_ALLOWED.apply(this, isDesktop());
363363

364-
info('-------------------------------------------------------------');
364+
logSeparator();
365365
}
366366

367367
/**
368368
* Set compilation flags which are not feature flags.
369369
*/
370370
function configureCompileDefines()
371371
{
372-
// Enable OpenFL's error handler
373-
// Required for the crash logger
372+
// Enable OpenFL's error handler.
373+
// Required for the crash logger.
374374
setHaxedef('openfl-enable-handle-error');
375375

376-
// Enable stack trace tracking. Good for debugging but has a (minor) performance impact
376+
// Enable stack trace tracking. Good for debugging but has a (minor) performance impact.
377377
setHaxedef('HXCPP_CHECK_POINTER');
378378
setHaxedef('HXCPP_STACK_LINE');
379379
setHaxedef('HXCPP_STACK_TRACE');
380380
setHaxedef('hscriptPos');
381381

382382
setHaxedef('safeMode');
383383

384-
// Disable the built in pause screen when unfocusing the game
384+
// Disable the built in pause screen when unfocusing the game.
385385
setHaxedef('FLX_NO_FOCUS_LOST_SCREEN');
386386

387387
// Disable the Flixel debugger entirely, since it
388-
// messes with the filters sometimes
388+
// messes with the filters sometimes.
389389
setHaxedef('FLX_NO_DEBUG');
390390

391391
if (isRelease())
392392
{
393-
// Improve performance on Nape
393+
// Improve performance on Nape.
394394
setHaxedef('NAPE_RELEASE_BUILD');
395395
}
396396

397-
// Cleaner looking compiler errors
397+
// Cleaner looking compiler errors.
398398
setHaxedef('message.reporting', 'pretty');
399399
}
400400

401401
function configureOutputDir()
402402
{
403-
// Set the output directory
404-
// Depends on the target platform and build type
403+
// Set the output directory.
404+
// Depends on the target platform and build type.
405405
var buildDir = 'export/${isDebug() ? 'debug' : isRelease() ? 'release' : 'test'}';
406406
buildDir += '/';
407407
info('Output Directory: $buildDir');
408408
app.path = buildDir;
409-
info('-------------------------------------------------------------');
409+
logSeparator();
410410
}
411411

412412
function configureHaxelibs()
@@ -415,15 +415,15 @@ class Project extends HXProject
415415
// FLIXEL
416416
// ==================
417417

418-
// Convert the game to run on other platforms
418+
// Convert the game to run on other platforms.
419419
addHaxelib('lime');
420-
// Many frontend and backend utilities for the game's display
420+
// Many frontend and backend utilities for the game's display.
421421
addHaxelib('openfl');
422-
// Core game library
422+
// Core game library.
423423
addHaxelib('flixel');
424-
// Additional utilities for Flixel
424+
// Additional utilities for Flixel.
425425
addHaxelib('flixel-addons');
426-
// VSCode debug support
426+
// VSCode debug support.
427427
if (isDebug())
428428
{
429429
addHaxelib('hxcpp-debug-server');
@@ -433,13 +433,13 @@ class Project extends HXProject
433433
// CUSTOM
434434
// ===================
435435

436-
// Manipulating sound effects programmatically
436+
// Manipulate sound effects programmatically.
437437
if (SOUND_FILTERS_ALLOWED.isEnabled(this))
438438
{
439439
addHaxelib('flxsoundfilters');
440440
}
441441

442-
// Discord rich presence
442+
// Discord rich presence.
443443
if (DISCORD_RPC_ALLOWED.isEnabled(this))
444444
{
445445
addHaxelib('hxdiscord_rpc');
@@ -448,37 +448,35 @@ class Project extends HXProject
448448

449449
function configureAssets()
450450
{
451-
// Add font assets
451+
// Add font assets.
452452
addAssetPath('assets/fonts', 'assets/fonts', 'default', ['*.ttf'], []);
453453

454-
// Add entity assets
454+
// Add entity assets.
455455
addAssetPath('assets/entities/data', 'assets/entities/data', 'default', ['*.json'], []);
456456
addAssetPath('assets/entities/textures', 'assets/entities/textures', 'default', ['*.png', '*.xml'], []);
457457

458-
// Add tile assets
458+
// Add tile assets.
459459
addAssetPath('assets/tiles/data', 'assets/tiles/data', 'default', ['*.json'], []);
460460
addAssetPath('assets/tiles/textures', 'assets/tiles/textures', 'default', ['*.png'], []);
461461

462-
// Add shared image assets
462+
// Add shared image assets.
463463
addAssetPath('assets/shared/images', 'assets/shared/images', 'default', ['*.png'], []);
464464

465-
// Add shader frag assets
465+
// Add shader frag assets.
466466
addAssetPath('assets/shaders', 'assets/shaders', 'default', ['*.frag'], []);
467467

468468
if (isWeb())
469469
{
470-
// Add shared music and sound assets for web (.mp3)
470+
// Add shared music and sound assets for web (.mp3).
471471
addAssetPath('assets/shared/music', 'assets/shared/music', 'default', ['*.mp3'], ['*.ogg']);
472472
addAssetPath('assets/shared/sounds', 'assets/shared/sounds', 'default', ['*.mp3'], ['*.ogg']);
473473
}
474474
else if (isDesktop())
475475
{
476-
// Add shared music and sound assets for desktop (.ogg)
476+
// Add shared music and sound assets for desktop (.ogg).
477477
addAssetPath('assets/shared/music', 'assets/shared/music', 'default', ['*.ogg'], ['*.mp3']);
478478
addAssetPath('assets/shared/sounds', 'assets/shared/sounds', 'default', ['*.ogg'], ['*.mp3']);
479479
}
480-
481-
info('-------------------------------------------------------------');
482480
}
483481

484482
/**
@@ -488,7 +486,7 @@ class Project extends HXProject
488486

489487
//
490488
// HELPER FUNCTIONS
491-
// (Easy functions to make the code more readable)
489+
// (Easy functions to make the code more readable.)
492490
// ========================================================================
493491

494492
public function isWeb():Bool
@@ -862,6 +860,15 @@ class Project extends HXProject
862860
{
863861
Log.error('${message}');
864862
}
863+
864+
/**
865+
* Display a very long line to separate sections of the game's
866+
* setup, mainly for easy readability.
867+
*/
868+
public function logSeparator():Void
869+
{
870+
info('-------------------------------------------------------------');
871+
}
865872
}
866873

867874
/**

0 commit comments

Comments
 (0)