Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Squid Blaster  (Read 5256 times)

0 Members and 3 Guests are viewing this topic.

C++Geek

  • Newbie
  • *
  • Posts: 11
    • View Profile
Squid Blaster
« on: March 17, 2016, 02:48:23 am »
So, this is a game that I have been working on for a while, and now that it's to version 2.0, I figured it was worthy to be posted on this forum.  ;)

I used SFML for just about everything, the rendering, the bounding boxes, etc. I just created my own classes to represent the game world.

The point of the game is to destroy the army of oncoming squid. You control a turtle that can belch out fireballs. The goal is to get as many points as possible, and survive as long as possible. There are bosses, giant fireballs, and fish, so enjoy!  ;D
This game has a pixel art graphics style. There are two main strategies you can go for: the best time and the high score. To go for the best time, you target the weak spots in the waves of squids, and basically survive as long as possible. To go for the high score, you destroy as many squids as you can, so you can rack up as many points as possible.

P.S. It only runs on Windows. I tested with Windows 7/10

The start of the game.
(click to show/hide)

A scary boss!
(click to show/hide)

View my code here: https://github.com/TheArduinist/Squid-Blaster.git
Download the executable here: https://www.dropbox.com/sh/voy1fxerr3nj56n/AADczvOvXBfwGbYfdgawS_wba?dl=1

Any suggestions are welcome! I'm a young programmer, so I'd be happy to hear an expert's opinion!
« Last Edit: March 18, 2016, 05:13:27 pm by C++Geek »

bitano

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Squid Blaster
« Reply #1 on: March 17, 2016, 09:01:27 am »
I had a new best time!!!!!! :D lol

i think it's a simple, but fun game. Well done!

First time i played it wrong (didn't read the ReadMe file lol) and thought i had to kill all the squids. Second time i felt it made more sense to save my ammo and look for the weak spots. Then i read the ReadMe file which actually mentioned doing just that (doh). So it felt more like "Squid survival" than "Squid blaster", which is totally fine of course. :D

---
Notes
I kinda missed not being able to move diagonally.
Sometimes it felt like i was hit by a squid eventhough it didn't look like it was hitting me. Maybe a minor hitbox bug? Most of the time it seemed fine.

Nice-to-haves
If it were me, i'd improve the graphics some and add some effect animations (eye candy)
« Last Edit: March 17, 2016, 09:19:44 am by bitano »

C++Geek

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Squid Blaster
« Reply #2 on: March 18, 2016, 02:45:34 am »
Thank you for your comments. Those are some good ideas!

Could you explain the hitbox error a little more? Did the squid bump into you, or did you bump into the squid? Can you reproduce the problem? Thank you for your time.

As for moving diagonally, how would you suggest implementing it? There are four arrow keys, so what would your recommendation be?

As for graphics, I forgot to explain this, but I had intended for it to be a little more like retro pixel art. At first the game was a Space Invaders clone (hence "Squid Blaster"), but it evolved rather quickly away from that. However, I always resort to pixel art style games because I make my graphics with Paint, and I have no idea how to make smooth graphics like in most games. If you could link me to a tutorial or program to make good art, that would be much appreciated.  ;D

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Squid Blaster
« Reply #3 on: March 18, 2016, 04:10:11 am »
As for moving diagonally, how would you suggest implementing it? There are four arrow keys, so what would your recommendation be?
The usual way would be:
Up Arrow- move up
Up Arrow + Right Arrow- move up and right
Right Arrow- move right
Down Arrow + Right Arrow- move down and right
Down Arrow- move down
Down Arrow + Left Arrow- move down and left
Left Arrow- move left
Up Arrow + Left Arrow- move up and left

The combinations, therefore, would be:
↑ + → = ↗
↑ + ← = ↖
↓ + → = ↘
↓ + ← = ↙


(click to show/hide)
« Last Edit: March 18, 2016, 05:23:41 pm by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

C++Geek

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Squid Blaster
« Reply #4 on: March 18, 2016, 05:10:10 pm »
Ah, I should have figured that one out myself, now I feel dumb. Thanks!  :P

bitano

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Squid Blaster
« Reply #5 on: March 18, 2016, 07:09:50 pm »
Could you explain the hitbox error a little more? Did the squid bump into you, or did you bump into the squid? Can you reproduce the problem? Thank you for your time.
I could be wrong, but the following might explain what i experienced. Take a look at the following image:

The purple area is part of the sprite. When I played your game, it felt like you're checking against the sprite's image boundaries. If so, then there's a pretty big border around the visual turtle, that actually counts as a hit eventhough it LOOKS like the turtle doesn't hit a squid.

As for graphics, I forgot to explain this, but I had intended for it to be a little more like retro pixel art. However, I always resort to pixel art style games because I make my graphics with Paint
I can totally appreciate the retro pixel art look. And Paint is perfectly fine to do pixel art with (although i'm sure there are better alternatives with regards to sprite animation). However, since the game is windowed you might want to consider doubling the pixels (pretend a block of 4 pixels is in fact 1 pixel). Following picture shows what i mean. It's more pixelized, yet still has detail - making it retroooooo:


If i didn't double the pixels, but kept to the original, smoother version it would look like this:



Note: I increased the size of the turtle to better fit the available space in the image (75x75 pixel sprites).

and I have no idea how to make smooth graphics like in most games. If you could link me to a tutorial or program to make good art, that would be much appreciated.  ;D
For the example turtles i actually used an old version of Flash and Paint. I can't think of a good tutorial but if you stick to pixelart i'm sure there are some good tutorials on this.

bitano

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Squid Blaster
« Reply #6 on: March 18, 2016, 08:02:28 pm »
2 more things:

1. The game became quite a bit easier as soon as i realized i could also teleport from top to bottom of the screen. Was that intended?

2. According to the ReadMe file i have to hover over the big fish for a couple of seconds, but i don't see a cursor in the game window :-D

C++Geek

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: Squid Blaster
« Reply #7 on: March 21, 2016, 11:26:18 pm »
Ah, you found the bottom to top thing. That does make the game a lot easier, I'm working on a way to fix it, but I need to keep it for now because every minute, one squid is added to the wave's "weak spot", so after ten minutes the game would become impossible without bottom to top teleportation.

Whoops, I guess I wasn't clear on the hovering bit. I mean the turtle has to touch the fish for a few seconds. I'll update the readme. Thank you for bringing this to my attention!

And thanks for the example graphics. I'll see what I can do.

Huh. I wasn't using the image boundaries for the turtle's bounding box, so it must be something else. Here's my code:

switch (this->direction)
        {
        case UP:
                this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 31, 40, 52);
                break;
        case DOWN:
                this->bounds = FloatRect(this->sprite.getPosition().x - 19, this->sprite.getPosition().y - 21, 40, 52);
                break;
        case LEFT:
                this->bounds = FloatRect(this->sprite.getPosition().x - 31, this->sprite.getPosition().y - 19, 52, 40);
                break;
        case RIGHT:
                this->bounds = FloatRect(this->sprite.getPosition().x - 21, this->sprite.getPosition().y - 21, 52, 40);
                break;
        };
« Last Edit: March 21, 2016, 11:31:12 pm by C++Geek »

 

anything