Search found 113 matches

by Vimm
Thu Mar 24, 2016 7:43 pm
Forum: Support and Development
Topic: Images turn into white squares after time
Replies: 26
Views: 11090

Re: Images turn into white squares after time

how do I reuse the image? Again, fairly new Actually you can see it by looking at my example above. ... local Asteroid = Object:extend() local image = love.graphics.newImage("assets/asteroid.png") function Asteroid:new(x, y) self.image = image ... also, not sure what you mean by... You cr...
by Vimm
Thu Mar 24, 2016 5:56 pm
Forum: Support and Development
Topic: Images turn into white squares after time
Replies: 26
Views: 11090

Re: Images turn into white squares after time

Seems to be a problem with your system. Can you post your specs, especially graphics card/chip and drivers. btw. the way you use classes seems to be pretty weird. You create a new object table inside your Asteroid class to handle them but the sense of a class is to be able to create an instance of ...
by Vimm
Thu Mar 24, 2016 11:33 am
Forum: Support and Development
Topic: Images turn into white squares after time
Replies: 26
Views: 11090

Images turn into white squares after time

for some odd reason, whenever I run my program (not willing to call it a game yet) the image I have set to spawn will start spawning, and then after a few seconds(30 or so) the images will blank out and be replaced with white squares, can someone take a look at the code and see if they can find out ...
by Vimm
Thu Mar 24, 2016 10:40 am
Forum: Support and Development
Topic: I don't understand classes
Replies: 9
Views: 3721

Re: I don't understand classes

So, i took a look at your project, and i noticed right off the bat you're trying to call Asteroid.new(). Unfortunately, Lua in itself is not object oriented (correct me if i'm wrong) but that can be implemented. So, do you want to do object orienting yourself (code the constructors and stuff) or ju...
by Vimm
Thu Mar 24, 2016 10:21 am
Forum: Support and Development
Topic: I don't understand classes
Replies: 9
Views: 3721

Re: I don't understand classes

Ohh, see I've heard that you should use libraries like "classis" for objects, but every resource I saw made it sound optional, didn't know lua wasnt OO. They are in fact optional if you don't want to think about how to use tables and metatables to create classes and inheritance in lua. Pe...
by Vimm
Thu Mar 24, 2016 4:01 am
Forum: Support and Development
Topic: I don't understand classes
Replies: 9
Views: 3721

Re: I don't understand classes

So, i took a look at your project, and i noticed right off the bat you're trying to call Asteroid.new(). Unfortunately, Lua in itself is not object oriented (correct me if i'm wrong) but that can be implemented. So, do you want to do object orienting yourself (code the constructors and stuff) or ju...
by Vimm
Thu Mar 24, 2016 1:32 am
Forum: Support and Development
Topic: I don't understand classes
Replies: 9
Views: 3721

Re: I don't understand classes

Robin wrote:Okay, so could you upload a recent attempt of yours to use classes? Then we can walk you through it step by step. If you help us help you, I promise it won't be hard.
Try not to cringe at the code, lol
by Vimm
Wed Mar 23, 2016 10:27 pm
Forum: Support and Development
Topic: I don't understand classes
Replies: 9
Views: 3721

I don't understand classes

for as long as I've been studying programming (on and off for a few years) I've never understood how classes work and how to "call them" or whatever, like if I make an enemy class and try to add it to main, i always get some kind of error and just dont understand, which is why ive never ma...
by Vimm
Mon Mar 21, 2016 2:05 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 425574

Re: "Questions that don't deserve their own thread" thread

How do I set an angle to an object? Basically I have a rectangle that, when the game starts, I want to make move in a random direction, how would I accomplish this? Create a random angle with 2*math.pi*love.math.random() (that's a random number from 0 to twice pi, which is a whole circle in radians...
by Vimm
Mon Mar 21, 2016 12:02 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 425574

Re: "Questions that don't deserve their own thread" thread

How do I set an angle to an object? Basically I have a rectangle that, when the game starts, I want to make move in a random direction, how would I accomplish this?