Log In  

Cart [#spacewiz-3#] | Code | 2019-10-14 | No License | Embed
1

For my first ever game, I wanted to do galaga with a simple spin on it. I have a lot of ideas on how to expand on it, but for now. each time you progress you can choose one of 3 different options(each is exclusive). I know it's super early to upload this, but i really want to be able to EASILY find/play it on my new retroflag gpi.

Update 10/14/19:
used the advice on the shot timer, and putting ashort pause between the level-up screen and the end of the level. also, looks like there WAS a double move going on, so i fixed that.

Thanks everybody!

P#68181 2019-09-27 06:09 ( Edited 2019-10-14 20:14)

:: dw817

Sometimes the shots go right through your opponents. Also suggest you use BTN() instead of BTNP() for firing.

P#68203 2019-09-27 22:38

Fantastic work! I love the parallax background and the sounds are great (perhaps lower the volume of the "enemy shooting" sfx a bit).

Really great work - especially for a first ever game!

P#68285 2019-09-30 15:51

Nice, but would like if the player ship went a little faster because at it's current state, the game is really difficult. Btw I love the titles you get for your score.

P#68288 2019-09-30 16:00

The game has some fun elements, the different spells and the gameover screens particularly. It's getting there but it needs a little tightening up and a little more polish.

A few observations on the code follow.


Am I misreading this or do the enemies move twice, once in update_enemies, once in draw_game?

function update_enemies()

--SNIP

 -- move/kill/shoot enemies
 for enemy in all(enmys) do
  --hit player?
  if ( flr(player.x/8) == flr(enemy.x/8) and flr(player.y/8) == flr(enemy.y/8) ) then
   die()
  end
  enemy.y += enemy.current.spd
function draw_game()
 cls()
 map()
 draw_stars()
 if #enmys != 0 then
  for enemy in all(enmys) do
   enemy.y += enemy.current.spd
  end
 end

I tried to check this was a real double move: I set one to -=, and they didn't appear onscreen. Then their bullets appeared, so I tried to shoot back and it turned out they could shoot from off screen, but I couldn't hit them with my return fire ... not really a bug I guess, as you don't want projectiles to exist once they get past the end of the screen (or perhaps the lowest enemy y).

In the end it didn't really prove it was a double move, because one of those two statements could be for a special circumstance for all I know - I didn't follow the code through line by line to find out - and the one I changed to a -= could be the main one and could have caused them to be moving away from me, unseen off the screen. (There are plenty of ways to prove it - I've mentioned what I did because I found it funny getting shot while I couldn't shoot the enemy because of my own tweak - but you probably already know whether it is a double move or not.)

But if it is a real double move ...

Having them move twice is probably sometimes causing misrecognition of collisions.


I found the bullets of the enemy to be coming down with too great a frequency. 30 frames is one second (in pico-8's normal _update function) theoretically; it's not a lot of reaction time, but perhaps more importantly here, the btnp for player shooting seems to mean the player stops shooting for a moment when they start to move (or is this deliberate). This means that to move underneath an enemy you have to time it in between shots that are a second apart, and as you do you stop shooting.

I had this moment quite a lot: "I've moved under the enemy and I'm not shooting and their next bullet is on the way already!"

The suggestion by @dw817 to use BTN() would be good to alleviate this, but perhaps as well as that it needs a timer similar to what you use for the enemy.shoot_timer, but with a lot lower interval, so there isn't just a stream of player projectiles and they can still shoot faster than the enemy. I think that would work and not have the stopped-shooting moments.


The enemy.shoot_timer being hardcoded to 30 is rough for the first level. I would suggest making it more variable, perhaps with max(30,(45-level)) - that way it gets harder as the player progresses.

function shoot(enemy)
 if enemy.shoot_timer > 30 then 
  local tempbullet = {
   x = enemy.x,
   y = enemy.y+4,

I found it a jolt going from shooting the enemy to the upgrade screen. Perhaps it needs a moment or two of nothing but the player and the background before it transfers to this screen, perhaps with an intermediary congratulatory message.

Of the upgrades I perhaps like the don't go alone option best. =)

Overall a good start to a first game.

P#68369 2019-10-02 14:15 ( Edited 2019-10-03 06:57)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-11-17 23:14 | 0.022s | 4194k | Q:30