added sine fw movement, smaller player, rf incs by 5, and a to-do list
This commit is contained in:
parent
9b2eff2b58
commit
1fcbdf6d0a
6 changed files with 34 additions and 15 deletions
|
@ -1,10 +1,6 @@
|
|||
# Avoid
|
||||
A dumb raylib test which you can play [here](https://canneddonuts.itch.io/avoid-the-game)
|
||||
|
||||
## To-do
|
||||
- a build guide
|
||||
- a tutorial
|
||||
|
||||
## Preview
|
||||
![Alt Text](./doc-assets/preview.png)
|
||||
![Alt Text](./doc-assets/preview1.png)
|
||||
|
|
17
TO_DO.md
Normal file
17
TO_DO.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# TO-DO
|
||||
|
||||
## Building
|
||||
- build guide
|
||||
|
||||
## Gameplay
|
||||
- cleaner hitboxes
|
||||
- better patterns
|
||||
- more levels
|
||||
- more feather powers
|
||||
- animations
|
||||
|
||||
## Art
|
||||
- better art duh
|
||||
|
||||
## Music
|
||||
- better gameplay music
|
|
@ -1 +1 @@
|
|||
{"modelVersion":2,"piskel":{"name":"birbis4","description":"","fps":1,"height":55,"width":70,"layers":["{\"name\":\"Layer 1\",\"opacity\":1,\"frameCount\":3,\"chunks\":[{\"layout\":[[0],[1],[2]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANIAAAA3CAYAAAB5EBRzAAADb0lEQVR4nO2YUY7bMAxE9dnb9Hq9UA/Tr56nQAH3I9jCcSRbokjNSJoBCCx2s6HJmRfFTkmSJAmtI6WDvh70GiN9/SyF6Ph+zFbFwBx/3stjPWhIKiqdQBFIKBGAIZB8QEoZmK5/89iJmwiylK2lhhFI3SDlfu+xExeNAeJVAkkgVVX+5OkG6cfx93gq21IHZeW8A4EkkFpButbllKrW9CBZYaIfSiCFgVSC6WNHaCEy0wLTVIMJpBCQ7r7SUYCEzE0tTFMO5wxSRGjgkHSeSOkTNIwIcpPbx+sDWCAJpAqQ0vtrxos8K/0QgYcUSH4gpTw0eJBIs/J+GyCQBNINSOffW3bi8tSONCsfIHWLAIyo+nWkbDWtBw1JJUgRHy7dIBFkQCAJpJDqD0zt4vD+34F0ljUblAMLpIVAIvDeCpIdJoJhBdJCIBH47pGTLQYXSPby+fRdJ0uljLTvhmAYgYQDyRUmAs89QWrbDcEwYeWRDYLwR4NUCkzTEzu01wEQtcFEMJBAwoOUC0w1SGifg0Gqg4lgIIHEAZLpax7aY4EkkBCVUkpuIKH9dciHQBJIZpDuAlS/GAJ/nbKheySBZAapFKD6xRD465gNgSSQzCDlArRNZgrS42+BZAKpfSEEvgbnQiAJpFiQ0H4S5WLd5QgkgSSQPuvn72//SyCRgJQSXV5MGRmttzBv1PssdPDpQKrUKO8YMvIogSSQLBrlHUtGHiWQBJJFOo0uEkhrgHTe5UqnBEM+qrQ7SAzX4KErSJHzjIZoCm8EEv4aPJQDKTdT75w6jQoSSPhr8FINTD1zjt7VVL4IJPw1eOoOpt45R+9pKl92BmnkDfpolYCyzok6jabxZVeQRt6co+QFEmJH03nCEmZk76kMa5A3SBHXyNSzSyxhRvWdzrBG9c6KPI2m8mVlkEpPrXaB6EseIEVdG0vPbu0A0vWp1U4QndUyM2pP0/qzC0he9wuzqmVmxJ6m92dXkCL6Mapl9tzrRuwM1ddVO4IU0YtVtfPfvSZqd0/XNY1nyKCN7LsrSJbTqOa9ENdF6xv63mFk7x1PpYiZPd7Lck3Unu0EUqlfRB8WRc3rBZLlfyg9e/ouPDrQiN4RPVi02qx0c9QsONKEu/eNPjVWC9eddpkTpp1BeuovSdWqDRICpOjekiRJUrD+ATYPv+scnnHKAAAAAElFTkSuQmCC\"}]}"],"hiddenFrames":[]}}
|
||||
{"modelVersion":2,"piskel":{"name":"pikidx","description":"","fps":12,"height":50,"width":50,"layers":["{\"name\":\"Layer 1\",\"opacity\":1,\"frameCount\":3,\"chunks\":[{\"layout\":[[0],[1],[2]],\"base64PNG\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAyCAYAAAC+jCIaAAADcUlEQVR4nO2bzW3kMAyFCSQLzCV9TD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TyXyPuJtLu9BZ4chGq6SEEULYVqVNi+BhHpuhILA69XPJaWQACDa5bYvuC7BdMF1CaIzZq4/4TCkGKzr68AAAAAASUVORK5CYII=\"}]}"],"hiddenFrames":[""]}}
|
Binary file not shown.
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 939 B |
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#include "../include/raylib.h"
|
||||
#include <math.h>
|
||||
|
||||
#include "Screens.h"
|
||||
#include "Controls.h"
|
||||
|
@ -56,6 +57,7 @@ void InitGameplayScreen(void)
|
|||
globalTimer = 0;
|
||||
|
||||
if (player.hp < 1) player.hp = 1;
|
||||
if (ammo < 5) ammo = 5;
|
||||
|
||||
player.currentframe = 0;
|
||||
player.speed = 300.0f;
|
||||
|
@ -70,8 +72,8 @@ void InitGameplayScreen(void)
|
|||
player.hitbox = (Rectangle) {
|
||||
0,
|
||||
100,
|
||||
(float) player_sprite.width/3,
|
||||
(float) player_sprite.height/2 +5
|
||||
(float) player_sprite.width/3 - 20,
|
||||
(float) player_sprite.height - 20
|
||||
};
|
||||
player.iframetimer = 0;
|
||||
player.in = false;
|
||||
|
@ -116,11 +118,12 @@ void InitGameplayScreen(void)
|
|||
(float) firework_sprite.height
|
||||
};
|
||||
fireworks[i].hitbox.y = GetRandomValue(0, GetScreenHeight() - firework_sprite.height);
|
||||
switch (level) {
|
||||
/* switch (level) {
|
||||
case LEVEL1: fireworks[i].speed.x = GetRandomValue(100, 300); break;
|
||||
case LEVEL2: fireworks[i].speed.x = GetRandomValue(400, 600); break;
|
||||
case LEVEL3: fireworks[i].speed.x = GetRandomValue(800, 1000); break;
|
||||
}
|
||||
} */
|
||||
fireworks[i].speed.x = GetRandomValue(100, 300);
|
||||
fireworks[i].color = RAYWHITE;
|
||||
}
|
||||
|
||||
|
@ -289,7 +292,7 @@ void UpdateGameplayScreen(void)
|
|||
if (CheckCollisionRecs(player.hitbox, feather.hitbox)) {
|
||||
switch (feather.power) {
|
||||
case 0: player.hp++; break;
|
||||
case 1: ammo++; break;
|
||||
case 1: ammo += 5; break;
|
||||
}
|
||||
if (!mute) PlaySoundMulti(fxfeather);
|
||||
ResetFeather();
|
||||
|
@ -337,14 +340,16 @@ void UpdateGameplayScreen(void)
|
|||
|
||||
if (fireworkAmount > 0) { fireworkAmount--; fireworks[i].active = 1; }
|
||||
fireworks[i].hitbox.y = GetRandomValue(0, GetScreenHeight() - firework_sprite.height);
|
||||
switch (level) {
|
||||
case LEVEL1: fireworks[i].speed.x = GetRandomValue(100, 300); break;
|
||||
/* switch (level) {
|
||||
case LEVEL1: fireworks[i].speed.x = GetFrameTime() break;
|
||||
case LEVEL2: fireworks[i].speed.x = GetRandomValue(400, 600); break;
|
||||
case LEVEL3: fireworks[i].speed.x = GetRandomValue(800, 1000); break;
|
||||
}
|
||||
} */
|
||||
break;
|
||||
case 1:
|
||||
fireworks[i].hitbox.x += GetFrameTime() * -fireworks[i].speed.x;
|
||||
trigMov = sin(2*PI/100*fireworks[i].hitbox.x) * 200;
|
||||
fireworks[i].hitbox.x -= fireworks[i].speed.x * GetFrameTime();
|
||||
fireworks[i].hitbox.y += trigMov*GetFrameTime();
|
||||
// Firework wall collision
|
||||
if (((fireworks[i].hitbox.x + -firework_sprite.width) > GetScreenWidth()
|
||||
|| (fireworks[i].hitbox.x <= -firework_sprite.width))) fireworks[i].active = 0;
|
||||
|
|
|
@ -49,8 +49,9 @@ struct Item feather = { 0 };
|
|||
Sound fxfeather = { 0 };
|
||||
bool pause;
|
||||
bool DebugMode;
|
||||
int ammo = 0;
|
||||
int ammo = 5;
|
||||
int fireworkAmount = 0;
|
||||
int GI_callcount = 0;
|
||||
int trigMov;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue