Skip to content

Commit 90cf6e7

Browse files
Merge pull request #17 from silver984/changes
new stuff
2 parents ba0b18a + 44b29ea commit 90cf6e7

6 files changed

Lines changed: 563 additions & 553 deletions

File tree

docs/BUILDING.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
# Building TechNotDrip Engine
2+
3+
## Windows:
4+
1. Install [Haxe](https://haxe.org/download/)
5+
2. Create a folder with ***no spaces*** somewhere in your computer, dedicated for haxe libraries
6+
3. Run `haxelib setup` and set the path to the folder you just made
7+
4. Run the following:
8+
```
9+
haxelib install hxpkg
10+
haxelib run hxpkg install --update
11+
```
12+
5. Compile the game with `haxelib run lime build windows`
13+
5. Test the game with `haxelib run lime test windows`
14+
6. Compiled game will be found in `TechNotDrip-Engine\export\release\windows\bin`
15+
216
## Android:
3-
1. Install Android Studio from [developer.android.com](https://developer.android.com/studio)
4-
2. Install Java 17 from [oracle.com](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
17+
1. Install [Android Studio](https://developer.android.com/studio)
18+
2. Install [Java 17](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
519
- NOTE: Write down the install location, we will need it later.
620
3. Open Android Studio.
721
4. Click on Projects.

src/Main.hx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,31 @@ class Main extends Sprite
2020
*/
2121
public static var performanceStats:PerformanceStats;
2222

23-
final flxGameData:FlxGameInit = {
24-
width: 1280,
25-
height: 720,
26-
initState: TitleState.new,
27-
framerate: 60,
28-
showSplash: false,
29-
startFullscreen: false
30-
};
31-
3223
public function new()
3324
{
3425
super();
3526

36-
initGame();
37-
}
27+
final gameData:GameData = {
28+
screenWidth: 1280,
29+
screenHeight: 720,
30+
initState: TitleState.new,
31+
framerate: 60,
32+
isSkipSplash: true,
33+
isStartFullscreen: false
34+
};
3835

39-
function initGame():Void
40-
{
41-
var flxGame:FlxGame = new FlxGame(flxGameData.width, flxGameData.height, flxGameData.initState, flxGameData.framerate, flxGameData.framerate,
42-
!flxGameData.showSplash, flxGameData.startFullscreen);
36+
var flxGame:FlxGame = new FlxGame(
37+
gameData.screenWidth,
38+
gameData.screenHeight,
39+
gameData.initState,
40+
gameData.framerate,
41+
gameData.framerate,
42+
gameData.isSkipSplash,
43+
gameData.isStartFullscreen
44+
);
4345
addChild(flxGame);
4446

45-
performanceStats = new PerformanceStats(5, 5);
47+
performanceStats = new PerformanceStats();
4648
addChild(performanceStats);
4749

4850
Assets.cache.enabled = false;
@@ -66,12 +68,12 @@ class Main extends Sprite
6668
}
6769
}
6870

69-
typedef FlxGameInit =
71+
typedef GameData =
7072
{
71-
var width:Int;
72-
var height:Int;
73+
var screenWidth:Int;
74+
var screenHeight:Int;
7375
var initState:InitialState;
7476
var framerate:Int;
75-
var showSplash:Bool;
76-
var startFullscreen:Bool;
77+
var isSkipSplash:Bool;
78+
var isStartFullscreen:Bool;
7779
}

src/funkin/data/StrumlineData.hx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package funkin.data;
33
import flixel.util.FlxSort;
44
import funkin.objects.gameplay.strumline.NoteSprite;
55
import funkin.objects.gameplay.strumline.Strumline;
6+
import funkin.states.gameplay.PlayState;
67
import funkin.util.FunkinControls;
78
import funkin.util.InputUtil;
89
import haxe.Json;
@@ -149,9 +150,20 @@ class StrumlineData
149150
var rating:String = InputUtil.judgeNote(noteDiff);
150151
var score:Int = InputUtil.scoreNote(noteDiff);
151152

153+
PlayState.totalScore += score;
154+
PlayState.totalHittableNotes++;
155+
152156
strumline.noteHit(noteHit, rating == 'sick');
153157
trace(rating);
154158
trace(score);
159+
160+
if (PlayState.scoreTxt.scale.x < 1.2)
161+
{
162+
var quotient = score / InputUtil.MAX_SCORE;
163+
var scaleIncrement = 0.025 * quotient;
164+
PlayState.scoreTxt.scale.x += scaleIncrement;
165+
PlayState.scoreTxt.scale.y += scaleIncrement;
166+
}
155167
}
156168
else
157169
strumline.getStrumNoteForDirection(input.direction).playAnimation('press', true);

0 commit comments

Comments
 (0)