## Search found 134 matches

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...
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...
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 ...
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...
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...
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...
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
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...
Tue Nov 25, 2014 3:57 pm
Forum: Support and Development
Replies: 905
Views: 144919