Skip to content

Commit

Permalink
uhhhh... i forgor...
Browse files Browse the repository at this point in the history
* Added transition on PlayState
* Expanded Player class and added some utility flags
* Fixed players `facing` flag assignment (might redo later)
* Placeholder UI (press X to get player card and C for actual UI)
* Wave effect shader (based on this demo https://haxeflixel.com/demos/BlendModeShaders)
* Expanded Util classes.
* Oner more placeholder track ig
* You can make a flash build of this and it will work lmao (backdrop may bug out tho)
  • Loading branch information
richTrash21 committed Jan 21, 2024
1 parent bc54241 commit 4d852d5
Show file tree
Hide file tree
Showing 19 changed files with 683 additions and 77 deletions.
38 changes: 32 additions & 6 deletions Project.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://lime.software/project/1.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

<!-- Default project properties (https://github.com/HaxeFlixel/game-jam-template) -->
<!--
<project
xmlns="http://lime.software/project/1.0.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://lime.software/project/1.0.2 http://lime.software/xsd/project-1.0.2.xsd">
-->

<!-- Project properties from Lime docs (https://lime.openfl.org/docs/project-files/xml-format/) -->
<project
xmlns="http://lime.openfl.org/project/1.0.4"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://lime.openfl.org/project/1.0.4 http://lime.openfl.org/xsd/project-1.0.4.xsd">

<!-- _________________________ Application Settings _________________________ -->

Expand Down Expand Up @@ -29,9 +41,12 @@

<!-- _____________________________ Path Settings ____________________________ -->

<set name="BUILD_DIR" value="export" />
<set name="BUILD_DIR" value="export/debug" if="debug" />
<set name="BUILD_DIR" value="export/release" unless="debug" />
<set name="BUILD_DIR" value="export/final" if="final" />
<!--<set name="BUILD_DIR" value="export/32bit" if="32bits" />-->
<source path="source" />
<assets path="assets" />
<assets path="assets" embed="true"/>

<!-- _______________________________ Libraries ______________________________ -->

Expand All @@ -46,6 +61,9 @@
<!--In case you want to use nape with flixel-->
<!--<haxelib name="nape-haxe4" />-->

<!--Debug server for VSCode debuging duhh-->
<haxelib name="hxcpp-debug-server" if="debug" />

<!-- ______________________________ Haxedefines _____________________________ -->

<!--Enable the Flixel core recording system-->
Expand All @@ -58,9 +76,9 @@
<!--<haxedef name="FLX_NO_NATIVE_CURSOR" />-->

<!--Optimise inputs, be careful you will get null errors if you don't use conditionals in your game-->
<haxedef name="FLX_NO_MOUSE" if="mobile" />
<haxedef name="FLX_NO_MOUSE" unless="debug" />
<haxedef name="FLX_NO_KEYBOARD" if="mobile" />
<haxedef name="FLX_NO_TOUCH" if="desktop" />
<haxedef name="FLX_NO_TOUCH" />
<!--<haxedef name="FLX_NO_GAMEPAD" />-->

<!--Disable the Flixel core sound tray-->
Expand All @@ -70,14 +88,22 @@
<!--<haxedef name="FLX_NO_SOUND_SYSTEM" />-->

<!--Disable the Flixel core focus lost screen-->
<!--<haxedef name="FLX_NO_FOCUS_LOST_SCREEN" />-->
<haxedef name="FLX_NO_FOCUS_LOST_SCREEN" />

<!--Disable the Flixel core debugger. Automatically gets set whenever you compile in release mode!-->
<haxedef name="FLX_NO_DEBUG" unless="debug" />

<!--Enable this for Nape release builds for a serious peformance improvement-->
<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />

<!--Default haxe defines [https://haxe.org/manual/compiler-usage-flags.html]-->
<!-- <haxedef name="absolute-path" if="debug" /> -->
<!-- <haxedef name="no-debug" unless="debug" /> -->
<haxedef name="no-traces" if="final" />

<haxedef name='no-deprecation-warnings' />
<haxedef name="analyzer-optimize" />

<!-- _________________________________ Custom _______________________________ -->

<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
Expand Down
Binary file added art/enemy_concepts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified art/test.fla
Binary file not shown.
Binary file added assets/images/menu_arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/menu_icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/money.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/player_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/music/battle/makotos_stage_spunky.ogg
Binary file not shown.
File renamed without changes.
20 changes: 20 additions & 0 deletions source/Init.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package;

import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.transition.TransitionData;
import flixel.math.FlxPoint;

class Init extends flixel.FlxState
{
override function create()
{
FlxG.autoPause = false;
// FlxG.scaleMode = new flixel.system.scaleModes.FillScaleMode();

FlxTransitionableState.defaultTransIn = new TransitionData(TILES, FlxColor.BLACK, 0.4, FlxPoint.get(-1, -1));
FlxTransitionableState.defaultTransOut = new TransitionData(TILES, FlxColor.BLACK, 0.4, FlxPoint.get(-1, -1));

FlxG.switchState(new PlayState());
// trace(haxe.macro.Context.getDefines());
}
}
15 changes: 12 additions & 3 deletions source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ class Main extends openfl.display.Sprite
public function new()
{
super();
addChild(new flixel.FlxGame(0, 0, PlayState, 60, 60, true));
addChild(new debug.FPS(10, 10, 0xFFFFFF));
addChild(new Game(#if flash 640, 480, #end Init, 60, 60, true));
addChild(new debug.FPS(#if flash 10, 10, #end 0xFFFFFF));
// Lib.current.stage.align = "tl";
// Lib.current.stage.scaleMode = StageScaleMode.NO_SCALE;
FlxG.autoPause = false;
}
}

class Game extends flixel.FlxGame
{
override function create(_)
{
// TODO: custom sound tray
// _customSoundTray =
super.create(_);
}
}
21 changes: 14 additions & 7 deletions source/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ import flixel.tweens.FlxTween;

class PauseSubState extends flixel.FlxSubState
{
var text:FlxText;
@:noCompletion var _zoomIn:Bool = true;
@:noCompletion var text:FlxText;
@:noCompletion var _zoomIn = true;
@:noCompletion var _textTween:FlxTween;

public function new()
{
super();

text = new FlxText(0, 80, 0, "PAUSED", 36);
text.scrollFactor.set();
// text.scrollFactor.set();
add(text.screenCenter(X));

final helpText = new FlxText(3, "Press ESC to unpause.", 12);
helpText.scrollFactor.set();
final helpText = new FlxText(3, #if flash 0, 0, #end "Press ESC to unpause.", 12);
// helpText.scrollFactor.set();
helpText.y = FlxG.height - helpText.height - 1;
add(helpText);

_textTween = flixel.tweens.FlxTween.angle(text, -5, 5, 0.8, {ease: flixel.tweens.FlxEase.quadInOut, type: PINGPONG});
_textTween = FlxTween.angle(text, -5, 5, 0.8, {ease: flixel.tweens.FlxEase.quadInOut, type: PINGPONG});

cameras = [FlxG.cameras.list[FlxG.cameras.list.length-1]];
if (FlxG.renderTile)
_bgSprite.cameras = cameras;
}

override function update(elapsed:Float)
Expand All @@ -41,10 +45,13 @@ class PauseSubState extends flixel.FlxSubState
_zoomIn = true;

if (bgColor != 0x88000000)
bgColor = FlxColor.interpolate(bgColor, 0x88000000, 0.2);
bgColor = FlxColor.interpolate(bgColor, 0x88000000, elapsed * 12);

if (FlxG.keys.justPressed.ESCAPE)
{
close();
FlxG.camera.followLerp = PlayState._cameraLerp;
}
}

override function destroy()
Expand Down
Loading

0 comments on commit 4d852d5

Please sign in to comment.