Search found 160 matches

by Bobble68
Thu Apr 11, 2024 12:02 pm
Forum: Support and Development
Topic: Weird error for a function that is correct.
Replies: 10
Views: 1529

Re: Weird error for a function that is correct.

I also want to add (I can't tell if you understand this or not, but there's a strong chance you do so if so I apologize) that the way if statements work is that it checks that the value between 'if' and 'then' evaluates as true or false so if true then something = 1 end is the same as something = 1 ...
by Bobble68
Wed Apr 03, 2024 6:09 pm
Forum: Support and Development
Topic: 2D Array
Replies: 6
Views: 525

Re: 2D Array

Currently looking through it, however you haven't given us much to go on in terms of what's actually wrong vs what you want, so it's not easy to pinpoint the issue, especially without the full project. Edit: Something I have noticed is that at line 44 col and row can be 0 which isn't accounted for a...
by Bobble68
Mon Apr 01, 2024 11:38 am
Forum: Support and Development
Topic: How to force draw an image on top of another image?
Replies: 6
Views: 475

Re: How to force draw an image on top of another image?

Deletion won't work with this code. Now ImagesToDraw has numeric indices, therefore setting ImagesToDraw[image] to nil has Right, yeah I didn't notice that. The way I usually handle deletions is by giving each of the objects a remove flag, and then at the end of update checking which objects need r...
by Bobble68
Sun Mar 31, 2024 11:18 am
Forum: Support and Development
Topic: How to force draw an image on top of another image?
Replies: 6
Views: 475

Re: How to force draw an image on top of another image?

is there a library available that does array manipulation? You don't really need one - you can just use table.insert() to add it to an ordered table like this: local coinImage = love.graphics.newImage(IMAGES[1]) local function createCoin() LAST_COIN = love.timer.getTime() currentCoins = currentCoin...
by Bobble68
Tue Mar 26, 2024 1:28 pm
Forum: Games and Creations
Topic: In the Heavens - Demo 0.1.12
Replies: 54
Views: 867576

In the Heavens - Demo 0.1.12

Hello! I'm back with another update, though this might be the last one for a while till I finish my assignments. Untitled.png New ambient lighting and shadows - caves are now dark! Partial controller support - the game should now work properly with controllers and show prompts for x-box controllers....
by Bobble68
Sat Mar 09, 2024 8:01 pm
Forum: Support and Development
Topic: Method doesn't see self variable when called by other method (hump.class)
Replies: 8
Views: 975

Re: Method doesn't see self variable when called by other method (hump.class)

Classic is the one I use, though it's mainly because it was the one used in the sheepolution tutorials, so I can't really say much about the quality of this or other ones.
by Bobble68
Sat Mar 09, 2024 5:22 pm
Forum: Support and Development
Topic: Method doesn't see self variable when called by other method (hump.class)
Replies: 8
Views: 975

Re: Method doesn't see self variable when called by other method (hump.class)

Your issue is this: function MyObject:mainMethod() print('Var in main', self.myVar) MyObject:subMethod() end What you want is function MyObject:mainMethod() print('Var in main', self.myVar) self:subMethod() end Assuming I understand how this class library works, what you're doing is you're using the...
by Bobble68
Tue Mar 05, 2024 6:59 pm
Forum: Support and Development
Topic: Unusual crashing within the first few seconds of the game with no error message.
Replies: 7
Views: 941

Re: Unusual crashing within the first few seconds of the game with no error message.

Sounds kind of similar to an issue I was getting a while back - never found a fix for it, though I know it happened when the game was started from the main menu instead.
by Bobble68
Mon Feb 19, 2024 11:48 am
Forum: Support and Development
Topic: Finding the visual center of a polygon
Replies: 3
Views: 525

Re: Finding the visual center of a polygon

There might be algorithms to achieve this kind of thing, but I'm not sure how they could work, since where the centre is can be subjective if you aren't using centre of mass or something similar (e.g. a perfectly round ring would have an infinite numer of places it can be) I guess the real question ...
by Bobble68
Mon Feb 19, 2024 11:42 am
Forum: Support and Development
Topic: Tips & advice for making a small beginner project?
Replies: 6
Views: 697

Re: Tips & advice for making a small beginner project?

knorke wrote: Sun Feb 18, 2024 3:43 pm "Pong" or "Breakout"
Oh yeah I would highly recommend breakout after you've done pong, it teaches ways tables can be used.