Need feedback on my first experiment...

Show off your games, demos and other (playable) creations.
User avatar
Cucurbitacée
Prole
Posts: 47
Joined: Fri Dec 14, 2012 10:22 am
Location: Frankfurt am Main

Need feedback on my first experiment...

Post by Cucurbitacée »

Hi everyone,
After a chaotic start, I think I begin to get how Löve works. And I begin to become really addict. :awesome:
After a few days (yes, I will never be an efficient coder, or even a real coder at all) I managed to make a small shoot'em up. :megagrin:
It started as an experiment to generate a random star field an went on a mini game. It has an (ugly) menu screen, a gameplay phase and a (ridiculous) game over screen.
If someone is curious enough, I'd love to get a feedback on the code. At the moment there are some nasty slowdowns :x, even if it is an extremely simple game.

Thanks in advance. :ultraglee:

BTW, I'm still working on the artwork and the enemy is stollen from Nemesis, I hope it's not a problem. I'll replace it with one of my own soon.
Attachments
Shooter Experiment.love
Ultra basic shooter experiment
(316.88 KiB) Downloaded 377 times
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Need feedback on my first experiment...

Post by Kingdaro »

Welcome to LÖVE!

I played this, and it's actually really good for a first! A couple of comments I personally have with the actual game:
  • The ship movement is a little sluggish, and isn't very arcade-like (I suppose that would be the right word for it...)
  • I would prefer to use keys like Z or X to shoot, as they aren't as clunky as using the spacebar. This is purely my preference, and I do recognize the spacebar as a common standard.
  • A lives system would be nice, as it's rather easy to die. (Or maybe I just suck :rofl: )
Looking through the code, the way you coded this is actually very readable, consistent, and easy to understand. Though, on the game over screen, the script calls love.load(), which shouldn't be done explicitly. Instead, you should probably put game loading into a separate function and use that if you want to reset/reload the game.

Also a tip, you can greatly increase the size of your window, while keeping the same image sizes and pixelation, making the game much easier to see and play. The use of this is mainly centered around the use of love.graphics.scale(). It's tricky though, because the graphics drawing scale and the window size are completely independent of one another. Here's what I did:

main.lua (under love.load):

Code: Select all

	scale = 2
	screen_width = love.graphics.getWidth()
	screen_height = love.graphics.getHeight()
	love.graphics.setDefaultImageFilter('linear', 'nearest')
	love.graphics.setMode(screen_width * scale, screen_height * scale)
I set the scale variable to 2, meaning everything should be twice as big. Then I set two screen height and width reference variables to use instead of love.graphics.getWidth()/love.graphics.getHeight(). These contain the "actual size" of the screen to be used by love.graphics.

The fourth line is a function that makes all of the images non-blurry when scaling up by changing the way image scaling works. More info on the wiki.

The fifth line scales the window's size according to our scale variable, so we can see everything onscreen.

Here's a .love of my changes.
Attachments
Shooter Experiment.love
(317.03 KiB) Downloaded 394 times
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Need feedback on my first experiment...

Post by T-Bone »

Since you never have anything to lose by constantly shooting, it would've been better if you could just hold down the fire button, allowing you to concentrate on navigating.
User avatar
Cucurbitacée
Prole
Posts: 47
Joined: Fri Dec 14, 2012 10:22 am
Location: Frankfurt am Main

Re: Need feedback on my first experiment...

Post by Cucurbitacée »

Kingdaro wrote:Welcome to LÖVE!

I played this, and it's actually really good for a first!
Thanks! :awesome:
Kingdaro wrote:A couple of comments I personally have with the actual game:
  • The ship movement is a little sluggish, and isn't very arcade-like (I suppose that would be the right word for it...)
  • I would prefer to use keys like Z or X to shoot, as they aren't as clunky as using the spacebar. This is purely my preference, and I do recognize the spacebar as a common standard.
  • A lives system would be nice, as it's rather easy to die. (Or maybe I just suck :rofl: )
  • My inspiration is really R-Type, so at the moment the ship is slow because I intend to add a speed-up system.
  • I've added an options menu to allow different key mapping, that should do the trick. :cool:
  • The lives system is almost there, at the moment the player only has 1 life...
All of this to say that at the moment the "game" is nothing more than a sandbox for me to learn Löve, but I'm glad you're considering it as a proper game. :neko:
Kingdaro wrote:Looking through the code, the way you coded this is actually very readable, consistent, and easy to understand. Though, on the game over screen, the script calls love.load(), which shouldn't be done explicitly. Instead, you should probably put game loading into a separate function and use that if you want to reset/reload the game.
Thanks, that's good to know. I think I've seen a tutorial doing so... then I did the same. By the way my code is a mix of a lot of tutorial and posts I've been looking; that's why it may be inconstant.
Kingdaro wrote:Also a tip, you can greatly increase the size of your window, while keeping the same image sizes and pixelation, making the game much easier to see and play. The use of this is mainly centered around the use of love.graphics.scale(). It's tricky though, because the graphics drawing scale and the window size are completely independent of one another. Here's what I did:

main.lua (under love.load):

Code: Select all

	scale = 2
	screen_width = love.graphics.getWidth()
	screen_height = love.graphics.getHeight()
	love.graphics.setDefaultImageFilter('linear', 'nearest')
	love.graphics.setMode(screen_width * scale, screen_height * scale)
I set the scale variable to 2, meaning everything should be twice as big. Then I set two screen height and width reference variables to use instead of love.graphics.getWidth()/love.graphics.getHeight(). These contain the "actual size" of the screen to be used by love.graphics.

The fourth line is a function that makes all of the images non-blurry when scaling up by changing the way image scaling works. More info on the wiki.

The fifth line scales the window's size according to our scale variable, so we can see everything onscreen.

Here's a .love of my changes.
That's a great idea, I didn't thought of that. And I've added your code to my options menu. But it seems I can't change the filter settings on the fly... :?
T-Bone wrote:Since you never have anything to lose by constantly shooting, it would've been better if you could just hold down the fire button, allowing you to concentrate on navigating.
This is another part of the sandbox, I want to add a function to focus beam when the shoot key his being hold (R-Type style, once again). I see it as an opportunity to play with the particles for a nice visual effect. :awesome:

Anyway, I went on and add some stuff:
  • A new menu with an options menu and the possibility to quit.
  • A fading option when the game starts, still needs to be polished, though.
  • Sounds effect! For menu navigation, player shot, enemies explosions and player explosion. :megagrin:
  • Music (stolen from Jamendo, if I try to do it myself it would take ages for shitty result! That's why the .love is so big now. :joker:
And now the thing I want to do:
  • Make real levels, at the moment the enemies are randomly spawn on screen. That means a lot of artwork.
  • Implement chain scoring system.
  • Save settings and scores to a file.
Thanks for your feedback. :nyu:
Attachments
Star Shooter v2.love
(5.93 MiB) Downloaded 240 times
User avatar
YGOFreak1997
Party member
Posts: 103
Joined: Sun Jan 22, 2012 4:29 pm
Location: Germany, Baden-Württemberg
Contact:

Re: Need feedback on my first experiment...

Post by YGOFreak1997 »

I'm sorry for such a short reply, but I actually found a small bug ^^

If you just stay at the lower left corner, you aren't being hit by the enemies' bullets and can survive like forever xD

greetings, Bastian.
Also look at my LÖVE-Tutorial-Youtube-Channel (German ^^)
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?

ÖBEY!
User avatar
vitaminx
Citizen
Posts: 95
Joined: Fri Oct 19, 2012 7:16 am
Location: international
Contact:

Re: Need feedback on my first experiment...

Post by vitaminx »

Hey, there's an issue with the enemies:
They suddenly disappear when they touch the left side of the window.
I didn't look at your code but seems you remove them when their x position is less than zero, right?
You should instead remove them when they are less than -enemy_width
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: Need feedback on my first experiment...

Post by jjmafiae »

Cucurbitacée wrote:Hi everyone,
After a chaotic start, I think I begin to get how Löve works. And I begin to become really addict. :awesome:
After a few days (yes, I will never be an efficient coder, or even a real coder at all) I managed to make a small shoot'em up. :megagrin:
It started as an experiment to generate a random star field an went on a mini game. It has an (ugly) menu screen, a gameplay phase and a (ridiculous) game over screen.
If someone is curious enough, I'd love to get a feedback on the code. At the moment there are some nasty slowdowns :x, even if it is an extremely simple game.

Thanks in advance. :ultraglee:

BTW, I'm still working on the artwork and the enemy is stollen from Nemesis, I hope it's not a problem. I'll replace it with one of my own soon.
do i suck or is this game really hard? :D
User avatar
YGOFreak1997
Party member
Posts: 103
Joined: Sun Jan 22, 2012 4:29 pm
Location: Germany, Baden-Württemberg
Contact:

Re: Need feedback on my first experiment...

Post by YGOFreak1997 »

It is kinda hard because there are so many enemies x3 But you could maybe get an autofire for the space bar or someting :3
Also look at my LÖVE-Tutorial-Youtube-Channel (German ^^)
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?

ÖBEY!
User avatar
Jimanzium
Party member
Posts: 103
Joined: Sun Jun 03, 2012 2:39 pm
Contact:

Re: Need feedback on my first experiment...

Post by Jimanzium »

It ran waaaaaaay to slow for me to even play :| But it looked nice :)
User avatar
Cucurbitacée
Prole
Posts: 47
Joined: Fri Dec 14, 2012 10:22 am
Location: Frankfurt am Main

Re: Need feedback on my first experiment...

Post by Cucurbitacée »

YGOFreak1997 wrote:I'm sorry for such a short reply, but I actually found a small bug ^^

If you just stay at the lower left corner, you aren't being hit by the enemies' bullets and can survive like forever xD

greetings, Bastian.
I guess I would need to lower the lowest random y position, thanks for the tip.
vitaminx wrote:Hey, there's an issue with the enemies:
They suddenly disappear when they touch the left side of the window.
I didn't look at your code but seems you remove them when their x position is less than zero, right?
You should instead remove them when they are less than -enemy_width
You're right, they are removed when their x coordinate is less than 0, thanks for the tip to add the enemy width, I will add it. :3
jjmafiae wrote:do i suck or is this game really hard? :D
It's not easy, for sure. But the randomness effect has to be taken in account too. Sometimes a game will be easier than another one...
YGOFreak1997 wrote:It is kinda hard because there are so many enemies x3 But you could maybe get an autofire for the space bar or someting :3
I'm working on it, at the moment. :awesome:
Jimanzium wrote:It ran waaaaaaay to slow for me to even play :| But it looked nice :)
That's what really troubles me. On my home computer (Core2Duo 2.33 ghz, 3 Gb RAM, GeForce 6600, Snow Leopard) the game is really smooth but on my work computer (Bi-Xeon 3 ghz, 8 Gb RAM, GeForce Quadro, Windows 7) it's really choppy, the game freeze for quarter of a second every time an enemy explodes.
I'm having a hard time figuring why the performance is so much worse on a way more powerful computer. Unless it's an OS issue... :halloween:
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests