Search found 107 matches

by pedrosgali
Fri Aug 14, 2015 5:06 pm
Forum: Libraries and Tools
Topic: Perlin noise planet generator.
Replies: 6
Views: 3737

Re: Perlin noise planet generator.

That sir is genius! I'll do that as soon as I get home. Thanks. :)
by pedrosgali
Fri Aug 14, 2015 4:05 pm
Forum: Libraries and Tools
Topic: Perlin noise planet generator.
Replies: 6
Views: 3737

Re: Perlin noise planet generator.

Thanks for the input, I know it's a bit ram intensive at the minute. How would I use the modulus operator transform? I'm not sure what you mean.
by pedrosgali
Fri Aug 14, 2015 2:51 pm
Forum: Libraries and Tools
Topic: Perlin noise planet generator.
Replies: 6
Views: 3737

Perlin noise planet generator.

Here's a little library I wrote yesterday to make 2d Perlin noise, I'm using it to make procedurally generated planets for a space game I'm making. I thought others might find it useful. You can pass the draw function a texture table to set the colours drawn so planet types can all be different colo...
by pedrosgali
Wed Jul 22, 2015 10:28 am
Forum: Support and Development
Topic: How do I tell when the window is maximized?
Replies: 6
Views: 2407

Re: How do I tell when the window is maximized?

The callback is love.resize(w, h), you get passed w and h which are the new size of the window.
by pedrosgali
Fri May 29, 2015 1:33 pm
Forum: Support and Development
Topic: [SOLVED] Problem switching Canvas
Replies: 2
Views: 1118

Re: Problem switching Canvas

Well spotted sir! :awesome:

also I agree, a table is better.
by pedrosgali
Fri May 29, 2015 11:22 am
Forum: Support and Development
Topic: [SOLVED] Problem switching Canvas
Replies: 2
Views: 1118

[SOLVED] Problem switching Canvas

Hey all, I'm currently rewriting my UI library and have hit a bit of a snag. I'm making self contained window objects that [should] handle their own rendering to a canvas stored in the object, so each window has a function win:draw() which should render the window and any other objects in the window...
by pedrosgali
Wed Jan 14, 2015 10:50 am
Forum: Support and Development
Topic: Cannot load more the one class object
Replies: 16
Views: 10702

Re: Cannot load more the one class object

I think Foxcraft has it right, from what I've seen badie:init() is not a constructor. try a new function called badie:new() function baddie:new(x, y) local newBad = {} setmetatable(newBad, self) self.__index = self self:init(x, y) return newBad end Then call it as b = baddie:new(math.random(whatever...
by pedrosgali
Sun Dec 14, 2014 2:01 pm
Forum: Support and Development
Topic: [SOLVED] Objects within objects. Help needed.
Replies: 15
Views: 10875

Re: [SOLVED] Objects within objects. Help needed.

I know what you mean about adding bells and whistles that don't really need to be added, I just spent the best part of a week for no real visible difference to how the game looks to the player! I do have a design brief so to speak but I have focused a lot of time early on making this as easily modda...
by pedrosgali
Sun Dec 14, 2014 4:21 am
Forum: Support and Development
Topic: [SOLVED] Objects within objects. Help needed.
Replies: 15
Views: 10875

Re: [SOLVED] Objects within objects. Help needed.

Finally figured it out! :awesome: I needed to put the new equipment slot assignment inside the constructor to get a unique copy each time. They all got unique names because I had put the name generation in there but the AI was being overwritten each time it was called because I declared the new slot...
by pedrosgali
Fri Dec 12, 2014 6:30 pm
Forum: Support and Development
Topic: [SOLVED] Objects within objects. Help needed.
Replies: 15
Views: 10875

Re: Objects within objects. Help needed.

Yes, I put a random name from my random name generator on each instance of equipment as it was called then after the equipment was "insatlled" I got the ship/station to print the names into their log. Each was unique.