Search found 8 matches

by HJW012
Thu Oct 31, 2013 10:00 am
Forum: Games and Creations
Topic: Pong
Replies: 7
Views: 4439

Re: Pong

It would be great to return to the difficulty selection once the game is over. Hard mode seems to be perfectly accurate too, but credit for not making the AI paddle constantly align itself with the ball. Good job man. Thank you so much! Nothing like the Love2D forums to encourage more practice. Tha...
by HJW012
Thu Oct 31, 2013 9:57 am
Forum: Games and Creations
Topic: Pong
Replies: 7
Views: 4439

Re: Pong

https://love2d.org/imgmirrur/2951Uqt.gif yes, I'm sorry about that. I am not entirely experienced in programming by any means and I obviously haven't learnt the most efficient means of using code. And I have noticed the speed change between a macbook pro and my PC. I appreciate the reply though. Ho...
by HJW012
Wed Oct 23, 2013 5:36 am
Forum: Games and Creations
Topic: Pong
Replies: 7
Views: 4439

Pong

Pong.love Hello everybody. I just thought I'd share pong with you guys. I am not great at programming but I am quite proud that I was able to make this without the use of any other resources besides the Love2d wiki in the expanse of 1 day. Thanks and feel free to yell at me for sloppy code if you c...
by HJW012
Wed Oct 09, 2013 10:12 am
Forum: Support and Development
Topic: Why won't the image load?[On Windows 64bit]
Replies: 4
Views: 2924

Re: Why won't the image load?[On Windows 64bit]

Did you ever actually draw in the image or did you only define the variable that is the directory to the image? If you haven't, you can try this.

Code: Select all

function love.draw()
 love.graphics.draw(imagename, x, y)
end
by HJW012
Sun Sep 29, 2013 11:19 am
Forum: General
Topic: Having Trouble With 2 Independent Backgrounds
Replies: 2
Views: 1683

Having Trouble With 2 Independent Backgrounds

Game.love In a game I am attempting to create, I plan on having a background that moves in a linear way directly in relation to the player's movement. Behind that, I plan on having a background that moves quite slowly in comparrison to the player's movement. This is to simulate a background that is...
by HJW012
Thu Sep 05, 2013 7:58 am
Forum: Support and Development
Topic: Having trouble with Arithmetic.
Replies: 5
Views: 2877

Re: Having trouble with Arithmetic.

If you are inside a function of an object, like in the player.phsyics function, you cannot reference to the variable "player", you have to reference the variable "self". So it becomes self.x = self.x + self.xvel * dt While it is generally a good idea to use the self-shortcut, th...
by HJW012
Thu Sep 05, 2013 7:48 am
Forum: Support and Development
Topic: Having trouble with Arithmetic.
Replies: 5
Views: 2877

Re: Having trouble with Arithmetic.

If you are inside a function of an object, like in the player.phsyics function, you cannot reference to the variable "player", you have to reference the variable "self". So it becomes self.x = self.x + self.xvel * dt It now says : attempt to index global 'self' (a nil value). Th...
by HJW012
Thu Sep 05, 2013 6:37 am
Forum: Support and Development
Topic: Having trouble with Arithmetic.
Replies: 5
Views: 2877

Having trouble with Arithmetic.

game.love Hello. First off, I'd like to say that I am quite new to Love2D and Lua in general so bare with me. Recently, I have been trying to make a simple game with a friend of mine. I know that I should work on some easier things before jumping the gun and making a game but I decided to jump righ...