Search found 134 matches

by Wojak
Thu Jan 22, 2015 9:57 am
Forum: General
Topic: Help On Procedural Generation
Replies: 12
Views: 4557

Re: Help On Procedural Generation

The rules you use aren't the same as in the tutorial: if Tile.Alive and NeighborsAlive <= 3 then                World[X][Y].Alive = false             end             if not Tile.Alive and NeighborsAlive >= 5 then                World[X][Y].Alive = true             end And yes – with the way you hand...
by Wojak
Thu Jan 22, 2015 9:18 am
Forum: General
Topic: Help On Procedural Generation
Replies: 12
Views: 4557

Re: Help On Procedural Generation

It's interesting. Though I find it interestingly huging the edges of the map (the edges are the screen), Not sure why it's happening. But it may or may not be a good thing once I add in page generation. I think I can explain this as well. Basically this algorithm makes the more dens parts of the no...
by Wojak
Thu Jan 22, 2015 7:45 am
Forum: General
Topic: Help On Procedural Generation
Replies: 12
Views: 4557

Re: Help On Procedural Generation

to simplify the 2 link: 1) create an implementations of life like cellular automata algorithm (Conway's game of life) 2) Apply a s345678b5678 rule (cells survive if they have 3 or more neighbors and are born with 5 or more) 3) Run the algorithm for about 5 steps on a noise in winch about 45% of the ...
by Wojak
Thu Jan 22, 2015 7:03 am
Forum: General
Topic: Help On Procedural Generation
Replies: 12
Views: 4557

Re: Help On Procedural Generation

This may be a thing that matches Your description: https://love2d.org/forums/viewtopic.php?p=58621#p58621 It builds a top down map with prefabricated blocks sticking a “matching” block to all the “open” corridors until there is any space on the map. The North, South, East, and West open corridors al...
by Wojak
Wed Jan 14, 2015 10:47 am
Forum: Support and Development
Topic: Would A Classic Doom Inspired Game Work In LOVE2D?
Replies: 53
Views: 12529

Re: Would A Classic Doom Inspired Game Work In LOVE2D?

I don't know if this helps, but this is 100% different method than You are using: https://love2d.org/forums/viewtopic.php?p=173100#p173100 the shader code is: local myShader = love.graphics.newShader[[ extern number camdist; extern number h; extern number w; extern Image tile; extern number tw; exte...
by Wojak
Mon Dec 29, 2014 3:19 pm
Forum: Support and Development
Topic: Passing a table to a shader
Replies: 9
Views: 4120

Re: Passing a table to a shader

so my question is: What is the best way to transform a data table into an image? love.image.newImageData ImageData:setPixel love.graphics.newImage The setPixel part is the place where you can encode the data (4 integers (r,g,b and a) within range 0-255 per pixel) Exemplar: https://love2d.org/forums...
by Wojak
Thu Dec 04, 2014 6:09 am
Forum: General
Topic: How do i define multiple variables at once?
Replies: 7
Views: 2099

Re: How do i define multiple variables at once?

Code: Select all

P1.x, P2.x, P3.x, P4.x = 0,0,0,0
http://www.lua.org/pil/4.1.html
by Wojak
Thu Nov 27, 2014 7:31 am
Forum: Support and Development
Topic: Passing a table to a shader
Replies: 9
Views: 4120

Re: Passing a table to a shader

I think that in this case you don't need to send anything... (I assume that 600 is screen height) myShader = love.graphics.newShader[[ vec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 screen_coords ){ //note that GLSL counts y coordinates from the bottom of the screen so you may wan...
by Wojak
Tue Nov 25, 2014 3:57 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 144919

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

I think everything involving shaders deserves it's own thread... GLSL seams to be lacking a lot of functionality (for loop by float) If I haven't messed up this is the fix: shader = love.graphics.newShader([[ extern Image map; extern vec2 dimensions; vec4 effect( vec4 col, Image texture, vec2 textur...
by Wojak
Tue Nov 25, 2014 9:04 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 144919

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

I'm trying to get a value inside of a nested table, but I'm given the id of the table instead of the actual value. The value I'm trying to get is inside layers.data. The problem is that STI overwrites the “data” table when calling sti.new () function Map:setTileData(layer) local i = 1 local map = {...