Add basic ring loss (no ring collision with level geometry yet)

This commit is contained in:
Lucas S. Vieira 2024-11-12 03:06:33 -03:00
parent 05114ddfa9
commit 575ebe1712
8 changed files with 168 additions and 21 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="255" height="31" tilewidth="128" tileheight="128" infinite="0" backgroundcolor="#3f007f" nextlayerid="5" nextobjectid="156">
<map version="1.10" tiledversion="1.11.0" orientation="orthogonal" renderorder="right-down" width="255" height="31" tilewidth="128" tileheight="128" infinite="0" backgroundcolor="#3f007f" nextlayerid="5" nextobjectid="184">
<tileset firstgid="1" source="128x128.tsx"/>
<tileset firstgid="49" source="../COMMON/objects_common.tsx"/>
<layer id="1" name="LAYER0" width="255" height="31">
@ -8,12 +8,12 @@
37,17,0,0,0,10,9,9,11,0,0,0,0,10,9,9,9,9,39,12,38,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,23,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
23,0,0,0,0,0,0,0,0,0,0,0,20,20,33,2,2,5,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,12,12,13,19,0,12,0,0,39,12,23,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -78,7 +78,7 @@
<property name="Kind" value="RING"/>
</properties>
</object>
<object id="21" gid="50" x="2066" y="768" width="64" height="64">
<object id="21" gid="50" x="2721" y="768" width="64" height="64">
<properties>
<property name="Kind" value="SUPER"/>
</properties>
@ -159,7 +159,7 @@
<object id="136" gid="53" x="1904" y="576" width="64" height="64"/>
<object id="137" gid="53" x="1264.38" y="896" width="64" height="64"/>
<object id="138" gid="61" x="324" y="384" width="64" height="64"/>
<object id="139" gid="57" x="2304" y="1152" width="64" height="64"/>
<object id="139" gid="57" x="2340" y="1152" width="64" height="64"/>
<object id="142" gid="55" x="448" y="816" width="64" height="64"/>
<object id="143" gid="1073741879" x="448" y="912" width="64" height="64"/>
<object id="144" gid="2147483703" x="384" y="816" width="64" height="64"/>
@ -172,12 +172,36 @@
<object id="151" gid="53" x="6528" y="1680" width="64" height="64" rotation="-90"/>
<object id="152" gid="53" x="6528" y="1840" width="64" height="64" rotation="-90"/>
<object id="153" gid="54" x="6016" y="1810" width="64" height="64" rotation="90"/>
<object id="154" gid="2147483703" x="2119" y="1152" width="64" height="64"/>
<object id="154" gid="2147483703" x="2128" y="1152" width="64" height="64"/>
<object id="155" gid="50" x="289" y="704" width="64" height="64">
<properties>
<property name="Kind" value="1UP"/>
</properties>
</object>
<object id="156" gid="51" x="4848" y="1728" width="64" height="64"/>
<object id="157" gid="53" x="1528" y="832" width="64" height="64"/>
<object id="158" gid="53" x="1568" y="832" width="64" height="64"/>
<object id="159" gid="53" x="1608" y="832" width="64" height="64"/>
<object id="160" gid="1073741877" x="1528" y="640" width="64" height="64"/>
<object id="161" gid="1073741877" x="1568" y="640" width="64" height="64"/>
<object id="162" gid="1073741877" x="1608" y="640" width="64" height="64"/>
<object id="163" gid="59" x="1567" y="697" width="64" height="64"/>
<object id="164" gid="59" x="1546" y="711" width="64" height="64"/>
<object id="165" gid="59" x="1589" y="711" width="64" height="64"/>
<object id="166" gid="49" x="1567" y="746" width="64" height="64"/>
<object id="167" gid="51" x="1520" y="1216" width="64" height="64"/>
<object id="168" gid="51" x="1552" y="1216" width="64" height="64"/>
<object id="169" gid="51" x="1584" y="1216" width="64" height="64"/>
<object id="170" gid="51" x="1614.75" y="1216" width="64" height="64"/>
<object id="171" gid="51" x="4880" y="1728" width="64" height="64"/>
<object id="176" gid="51" x="2288" y="832" width="64" height="64"/>
<object id="177" gid="51" x="2320" y="832" width="64" height="64"/>
<object id="178" gid="51" x="2352" y="832" width="64" height="64"/>
<object id="179" gid="51" x="2383" y="832" width="64" height="64"/>
<object id="180" gid="51" x="2544" y="832" width="64" height="64"/>
<object id="181" gid="51" x="2576" y="832" width="64" height="64"/>
<object id="182" gid="51" x="2608" y="832" width="64" height="64"/>
<object id="183" gid="51" x="2639" y="832" width="64" height="64"/>
</objectgroup>
</group>
</map>

BIN
assets/sfx/RINGLOSS.ogg Normal file

Binary file not shown.

View file

@ -24,6 +24,9 @@ typedef enum {
// Checkpoint-only flags
OBJ_FLAG_CHECKPOINT_ACTIVE = 0x10, // Checkpoint is active
// Rings-only flags
OBJ_FLAG_RING_MOVING = 0x10, // Ring is moving (ring loss)
} ObjectGeneralFlag;
typedef struct {

View file

@ -103,5 +103,6 @@ void player_update(Player *player);
void player_draw(Player *player, VECTOR *screen_pos);
void player_set_hurt(Player *player, int32_t hazard_x);
void player_set_ring_loss(Player *player, int32_t hazard_x, uint8_t num_rings);
#endif

View file

@ -241,6 +241,9 @@
<file name="DEATH.VAG"
type="data"
source="${PROJECT_SOURCE_DIR}/assets/sfx/DEATH.VAG" />
<file name="RINGLOSS.VAG"
type="data"
source="${PROJECT_SOURCE_DIR}/assets/sfx/RINGLOSS.VAG" />
</dir>
<dir name="BGM">

View file

@ -22,12 +22,18 @@ extern SoundEffect sfx_pop;
extern SoundEffect sfx_sprn;
extern SoundEffect sfx_chek;
extern SoundEffect sfx_death;
extern SoundEffect sfx_ringl;
extern int debug_mode;
extern uint8_t level_ring_count;
extern uint32_t level_score_count;
extern uint8_t level_finished;
// Object-specific definitions
#define RING_GRAVITY 0x00000180
// Update functions
static void _ring_update(ObjectState *state, ObjectTableEntry *typedata, VECTOR *pos);
static void _goal_sign_update(ObjectState *state, ObjectTableEntry *typedata, VECTOR *pos);
@ -109,14 +115,45 @@ _ring_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos)
// Calculate actual top left corner of ring AABB
pos->vx -= 8; pos->vy -= (8 + 32);
if(aabb_intersects(player_vx, player_vy, player_width, player_height,
pos->vx, pos->vy, 16, 16))
{
state->anim_state.animation = 1;
state->anim_state.frame = 0;
state->props ^= OBJ_FLAG_ANIM_LOCK; // Unlock from global timer
level_ring_count++;
sound_play_vag(sfx_ring, 0);
// Hey -- if this is a moving ring (ring loss behaviour), only
// allow the player to collect it if its action is not ACTION_HURT
if(!((state->props & OBJ_FLAG_RING_MOVING) && (player.action == ACTION_HURT))) {
// Ring collision
if(aabb_intersects(player_vx, player_vy, player_width, player_height,
pos->vx, pos->vy, 16, 16))
{
state->anim_state.animation = 1;
state->anim_state.frame = 0;
state->props ^= OBJ_FLAG_ANIM_LOCK; // Unlock from global timer
level_ring_count++;
sound_play_vag(sfx_ring, 0);
return;
}
}
// If ring is moving, we will not proceed to move it!
if(state->props & OBJ_FLAG_RING_MOVING) {
state->timer++;
// If the ring is way too far from camera, just destroy it
// By "too far", I mean two screens apart.
// Also, moving rings only live for 256 frames
if((state->freepos->vx < camera.pos.vx - (SCREEN_XRES << 13))
|| (state->freepos->vx > camera.pos.vx + (SCREEN_XRES << 13))
|| (state->freepos->vy < camera.pos.vy - (SCREEN_YRES << 13))
|| (state->freepos->vy > camera.pos.vy + (SCREEN_YRES << 13))
|| (state->timer >= 256)) {
state->props |= OBJ_FLAG_DESTROYED;
return;
}
// Apply gravity
state->freepos->spdy += RING_GRAVITY;
// Transform ring position wrt. speed
state->freepos->vx += state->freepos->spdx;
state->freepos->vy += state->freepos->spdy;
}
} else if(state->anim_state.animation == OBJ_ANIMATION_NO_ANIMATION
&& !(state->props & OBJ_FLAG_DESTROYED))
@ -210,10 +247,10 @@ _monitor_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos)
level_score_count += 10;
sound_play_vag(sfx_pop, 0);
// TODO: This should be the behaviour of our monitor particles
switch(((MonitorExtra *)state->extra)->kind) {
case MONITOR_KIND_RING:
level_ring_count += 10;
sound_play_vag(sfx_ring, 0);
break;
default: break;
}
@ -427,8 +464,14 @@ _spikes_update(ObjectState *state, ObjectTableEntry *, VECTOR *pos)
((player_vx >= solidity_vx - 8) && ((player_vx + 8) <= solidity_vx + 32)))
{
if(player.action != ACTION_HURT && player.iframes == 0) {
player_set_hurt(&player, (solidity_vx + 16) << 12);
sound_play_vag(sfx_death, 0); // TODO: SFX changes depending on situation
if(level_ring_count > 0) {
player_set_ring_loss(&player, (solidity_vx + 16) << 12, level_ring_count);
level_ring_count = 0;
sound_play_vag(sfx_ringl, 0);
} else {
player_set_hurt(&player, (solidity_vx + 16) << 12);
sound_play_vag(sfx_death, 0);
}
return;
}

View file

@ -41,6 +41,7 @@ SoundEffect sfx_pop = { 0 };
SoundEffect sfx_sprn = { 0 };
SoundEffect sfx_chek = { 0 };
SoundEffect sfx_death = { 0 };
SoundEffect sfx_ringl = { 0 };
// TODO: Maybe shouldn't be extern?
extern TileMap16 map16;
@ -90,6 +91,7 @@ load_player(Player *player,
if(sfx_sprn.addr == 0) sfx_sprn = sound_load_vag("\\SFX\\SPRN.VAG;1");
if(sfx_chek.addr == 0) sfx_chek = sound_load_vag("\\SFX\\CHEK.VAG;1");
if(sfx_death.addr == 0) sfx_death = sound_load_vag("\\SFX\\DEATH.VAG;1");
if(sfx_ringl.addr == 0) sfx_ringl = sound_load_vag("\\SFX\\RINGLOSS.VAG;1");
}
void
@ -723,3 +725,49 @@ player_set_hurt(Player *player, int32_t hazard_x)
player->vel.vx = X_HURT_FORCE * ((a == 0) ? 1 : a);
player->ctrllock = 2;
}
// 101.25° = 0.28125 (normalized angle)
#define RING_STARTING_ANGLE 0x00000480
// 22.5° = 0.0625 (normalized angle)
#define RING_ANGLE_STEP 0x00000100
#define RING_START_SPD_DIRECT 4
void
player_set_ring_loss(Player *player, int32_t hazard_x, uint8_t num_rings)
{
player_set_hurt(player, hazard_x);
num_rings = num_rings > 32 ? 32 : num_rings;
uint32_t ring_counter = 0;
int32_t ring_angle = RING_STARTING_ANGLE;
uint8_t ring_flip = 0;
int32_t ring_speed = RING_START_SPD_DIRECT;
while(ring_counter < num_rings) {
// Create ring object
PoolObject *ring = object_pool_create(OBJ_RING);
ring->freepos.vx = player->pos.vx;
ring->freepos.vy = player->pos.vy;
ring->props |= OBJ_FLAG_ANIM_LOCK;
ring->props |= OBJ_FLAG_RING_MOVING;
// Calculate ring speed.
// Notice that the speed is attributed directly to 4 since
// we would have to bit shift the result by 12 bits to the right anyway
ring->freepos.spdx = ring_speed * rcos(ring_angle);
ring->freepos.spdy = ring_speed * -rsin(ring_angle);
if(ring_flip) {
ring->freepos.spdx *= -1;
ring_angle = (ring_angle + RING_ANGLE_STEP) % ONE;
}
ring_flip = !ring_flip;
ring_counter++;
if(ring_counter == 16) {
ring_speed >>= 1; // Halve ring speed
ring_angle = RING_STARTING_ANGLE;
}
}
}

View file

@ -197,6 +197,17 @@ screen_level_update(void *d)
return;
}
if(debug_mode > 0) {
// Create a little falling ring
if(pad_pressed(PAD_TRIANGLE)) {
PoolObject *ring = object_pool_create(OBJ_RING);
ring->freepos.vx = camera.pos.vx;
ring->freepos.vy = camera.pos.vy - (CENTERY << 12) + (20 << 12);
ring->props |= OBJ_FLAG_ANIM_LOCK;
ring->props |= OBJ_FLAG_RING_MOVING;
}
}
/* data->ring.rot.vz += 36; */
/* Rotating cube */
@ -307,6 +318,20 @@ screen_level_draw(void *d)
0);
font_draw_big("SCORE", 10, 10);
font_draw_big("TIME", 10, 24);
// Flash red every 8 frames
if(level_ring_count == 0
&& ((get_elapsed_frames() >> 3) % 2 == 0)) {
font_set_color(
LERPC(level_fade, 0xc8),
0,
0);
} else {
font_set_color(
LERPC(level_fade, 0xc8),
LERPC(level_fade, 0xc8),
0);
}
font_draw_big("RINGS", 10, 38);
font_set_color(
LERPC(level_fade, 0xc8),