Hi everyone,
After a chaotic start, I think I begin to get how Löve works. And I begin to become really addict.
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.
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 , even if it is an extremely simple game.
Thanks in advance.
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.
Need feedback on my first experiment...
- Cucurbitacée
- Prole
- Posts: 47
- Joined: Fri Dec 14, 2012 10:22 am
- Location: Frankfurt am Main
Need feedback on my first experiment...
- Attachments
-
- Shooter Experiment.love
- Ultra basic shooter experiment
- (316.88 KiB) Downloaded 377 times
Re: Need feedback on my first experiment...
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:
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):
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.
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 )
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)
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 395 times
Re: Need feedback on my first experiment...
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.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
- Cucurbitacée
- Prole
- Posts: 47
- Joined: Fri Dec 14, 2012 10:22 am
- Location: Frankfurt am Main
Re: Need feedback on my first experiment...
Thanks!Kingdaro wrote:Welcome to LÖVE!
I played this, and it's actually really good for a first!
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 )
- 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.
- The lives system is almost there, at the moment the player only has 1 life...
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: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.
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...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):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.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)
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.
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.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.
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.
- 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.
- 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.
- Attachments
-
- Star Shooter v2.love
- (5.93 MiB) Downloaded 240 times
- 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...
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.
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!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
Re: Need feedback on my first experiment...
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
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
experimental art since 13.75 gigayears
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
https://github.com/humansarepuppies
http://stardiaries-lab.blogspot.com/
Re: Need feedback on my first experiment...
do i suck or is this game really hard?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.
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.
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 , even if it is an extremely simple game.
Thanks in advance.
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.
- 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...
It is kinda hard because there are so many enemies x3 But you could maybe get an autofire for the space bar or someting
Also look at my LÖVE-Tutorial-Youtube-Channel (German )
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
GitHub Repo: Click Me!
Website: No, Me!
IndieDB: Or Maybe Me?
ÖBEY!
Re: Need feedback on my first experiment...
It ran waaaaaaay to slow for me to even play But it looked nice
- Cucurbitacée
- Prole
- Posts: 47
- Joined: Fri Dec 14, 2012 10:22 am
- Location: Frankfurt am Main
Re: Need feedback on my first experiment...
I guess I would need to lower the lowest random y position, thanks for the tip.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.
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.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
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...jjmafiae wrote:do i suck or is this game really hard?
I'm working on it, at the moment.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
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.Jimanzium wrote:It ran waaaaaaay to slow for me to even play But it looked nice
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...
Who is online
Users browsing this forum: No registered users and 2 guests