Search found 267 matches

by Larsii30
Mon Sep 26, 2011 1:11 pm
Forum: Support and Development
Topic: How to Compare Table Key with number?
Replies: 18
Views: 983

Re: How to Compare Table Key with number?

yes thanks miko thats what I want. :) I don't use it now for the images but its great to know it. I've got one more question. Look at this : variable1 = variable 1 + 1 In C++ i could do this : variable1 += 1; instead of write the name of variable1 again. Is something like this possible in lua ?
by Larsii30
Mon Sep 26, 2011 4:13 am
Forum: Games and Creations
Topic: AlienInvaders - my first game
Replies: 12
Views: 3280

Re: AlienInvaders - my first game

They should move every "0.6" Second fist and after a short time they will begin to move faster. If there were problems, then because of the different computer speeds maybe. I realized the movement with timer, so maybe thats the problem? Thanks for your corrections! There are some unused things becau...
by Larsii30
Sun Sep 25, 2011 8:42 pm
Forum: Games and Creations
Topic: AlienInvaders - my first game
Replies: 12
Views: 3280

Re: AlienInvaders - my first game

Now I stopped to program this mini-game because with this game I learned a lot about how to write code and figure things out, but I started very bad to program and its now totally ugly code and it whould be to much work to rewrite it anyway. The game IS playable but it isn't very difficult to win. I...
by Larsii30
Sun Sep 25, 2011 2:22 pm
Forum: Support and Development
Topic: How to Compare Table Key with number?
Replies: 18
Views: 983

Re: How to Compare Table Key with number?

okay. What I do : -- I load my images this way img.alien = { lg.newQuad(32, 16, 16,16,img.Size,img.Size), lg.newQuad(0, 16, 16,16,img.Size,img.Size), lg.newQuad(16, 16, 16,16,img.Size,img.Size), lg.newQuad(32, 32, 16,16,img.Size,img.Size), lg.newQuad(0, 32, 16,16,img.Size,img.Size), lg.newQuad(16, 3...
by Larsii30
Sun Sep 25, 2011 1:33 pm
Forum: Support and Development
Topic: How to Compare Table Key with number?
Replies: 18
Views: 983

How to Compare Table Key with number?

Hi, just a short question. How could I compare the Table KEY with a number ? Example of what I want to do : img = { enemyBlue, enemyGreen } if img == 1 then explodeBlue () end if img == 2 then explodeGreen() end now the code try to compare the data of img (enemy1 / enemy2 / enemy3) with the numbers....
by Larsii30
Tue Sep 20, 2011 3:25 pm
Forum: Games and Creations
Topic: AlienInvaders - my first game
Replies: 12
Views: 3280

Re: AlienInvaders - my first game

woah . First, thank you guys. :) You don't need the .lua extension in require,... Thanks. Hi! I quite like the graphics, the aliens are really funny. The first thing that i saw in your code is abusive new line and no indentation: (it's not a technical problem but it's for readability of your code) Y...
by Larsii30
Mon Sep 19, 2011 9:23 pm
Forum: Games and Creations
Topic: AlienInvaders - my first game
Replies: 12
Views: 3280

AlienInvaders - my first game

Hey everyone, I'm new in this community and in programming with lua/Löve2D. I work on a 'small' first game called AlienInvaders . (and btw sorry for my bad english :D) I would like to know, what you are thinking about my code and hoped you can give me some tips how I could do things better. The game...