Search found 14 matches

by AdventureFan
Thu Aug 08, 2013 8:16 am
Forum: General
Topic: Transparent areas of player image fill with foreground color
Replies: 5
Views: 3756

Re: Transparent areas of player image fill with foreground c

Davidobot wrote:I'm pretty sure it is just that your image background isn't 100% transperant, but more like 10 Alpha or something.
Yeah, you are right. I actually forgot to add tranparency to the player image. Changed that, and it works fine now.

I thought it was the code, but apparently it was the image...
by AdventureFan
Thu Aug 08, 2013 7:00 am
Forum: General
Topic: Transparent areas of player image fill with foreground color
Replies: 5
Views: 3756

Re: Transparent areas of player image fill with foreground c

Here you go. As you can see, there is a square block of "red" around my player. This is the full game code: function love.keypressed(key) if key == " " then -- shoot a bullet (by adding it to the bullets table and passing a .y value) bullets[#bullets+1] = { y = 495, speed = 300, ...
by AdventureFan
Thu Aug 08, 2013 6:37 am
Forum: General
Topic: Transparent areas of player image fill with foreground color
Replies: 5
Views: 3756

Transparent areas of player image fill with foreground color

I'm teaching myself Love2D, currently I'm creating a space invaders clone (followed a tutorial then tried to program it on my own). I created a player by using the following code. - in love.load: player.graphic = love.graphics.newImage('player_small.png') - in love.draw: love.graphics.setBackgroundC...
by AdventureFan
Wed Aug 07, 2013 7:10 pm
Forum: General
Topic: How to make my bullets fire one by one
Replies: 8
Views: 9343

Re: How to make my bullets fire one by one

I just finished adding the enemies, moving them down and then checking for collisions with the enemies. This is my own code, so it probably won't be the most efficient or reusable one. But well, it seems to work all right! :) Next step is to implement the 'slow rate of fire' code, then maybe build s...
by AdventureFan
Wed Aug 07, 2013 7:15 am
Forum: General
Topic: Graphics Editor of Choice?
Replies: 42
Views: 26165

Re: Graphics Editor of Choice?

If you are on Linux, perhaps also worth checking out is Krita: http://krita.org/faq
by AdventureFan
Tue Aug 06, 2013 6:48 pm
Forum: General
Topic: How to make my bullets fire one by one
Replies: 8
Views: 9343

Re: How to make my bullets fire one by one

So more like this? function love.keypressed(key) if key == " " then -- shoot a bullet (by adding it to the bullets table and passing a .y value) bullets[#bullets+1] = { y= 495, speed = 300, width = 10, height = 5, x = (player.x + player.width/2) - 5 } end end function love.load() love.grap...
by AdventureFan
Tue Aug 06, 2013 2:12 pm
Forum: General
Topic: How to make my bullets fire one by one
Replies: 8
Views: 9343

Re: How to make my bullets fire one by one

Thank you for the advice. I improved my code a little: - I put all functions outside of the love.update and love.draw functions (if love.keyboard.isDown can still be in love.update, yes?) - I tried to use variables where I could, instead of fixed values - I made it possible for the player to move le...
by AdventureFan
Tue Aug 06, 2013 11:21 am
Forum: General
Topic: How to make my bullets fire one by one
Replies: 8
Views: 9343

Re: How to make my bullets fire one by one

Thank you. Actually, it looks like your code will send the bullets toward the position of the mouse. My intent was just to move them up. But, with your help and some more experimenting, I succeeded in creating a small program which makes the bullets shoot upward. I know it can still use a lot of wor...
by AdventureFan
Mon Aug 05, 2013 1:41 pm
Forum: General
Topic: How to make my bullets fire one by one
Replies: 8
Views: 9343

How to make my bullets fire one by one

I was following along a tutorial (Invaders must die at http://www.headchant.com/2010/11/27/love2d-tutorial-part-1-invaders-must-die/), right now I am trying to recreate just the part where the bullets are fired. I have some code which fires 5 bullets at the same time (that's actually the code for th...
by AdventureFan
Mon Jul 29, 2013 12:14 pm
Forum: General
Topic: How to put text on a certain path/route?
Replies: 8
Views: 4394

Re: How to put text on a certain path/route?

Other attempt, this time using functions. I'm actually really happy with this one, it does exactly what I want and I think there are much less "wasteful" instructions in there like in the previous code examples. Somehow I could not "import" the "dt" value directly in my...