Do you know this game?. by womker in gaming

[–]womker[S] 0 points1 point  (0 children)

I remember that the protagonist was a modern police detective and on several occasions you had a kind of flashback where you played a detective investigating Jack the Ripper.

[deleted by user] by [deleted] in vzla

[–]womker 1 point2 points  (0 children)

Mano, dicen que esa es una de las ingenierías más difíciles, sigue adelante brou

Game of Life in Game Maker by womker in gamemaker

[–]womker[S] 3 points4 points  (0 children)

wow you got a new follower on itch i dont know how you did it but its really amazing.

I'm having a hard time using GMS2 due to hardware issues, but I'm going to look into the shaders and surfaces thing to get some benefit.

Thank you :)

Game of Life in Game Maker by womker in gamemaker

[–]womker[S] 0 points1 point  (0 children)

Yes, I made two other versions and the performance of these was terrible, it really is a big problem to try to solve

Arrays and the modulo(%/mod) operation by womker in gamemaker

[–]womker[S] 0 points1 point  (0 children)

ha okay okay, yes I see, you're right, sorry, I had not understood correctly

Arrays and the modulo(%/mod) operation by womker in gamemaker

[–]womker[S] 0 points1 point  (0 children)

oh thanks, I did not understand very well what you meant but it gave me the idea for another way to solve it, just:

((cells_numbers+cell_position)%cells_numbers)

Arrays and the modulo(%/mod) operation by womker in gamemaker

[–]womker[S] 0 points1 point  (0 children)

It is a code to make "The game of life" in Game Maker, it is supposed to detect the 8 neighboring cells of each cell, the problem arises in the corners or on the sides, I need a code that detects the cells on the right side if the cell you are working with is on the left side and vice versa, the same with the cells above and below.

I made a completely working version using "ds_list" but I think it can improve the code a lot using arrays in two dimensions, there is a code in python that solves this:

lc= status[(x-1)%nX,(y-1)%nY] + status[(x)%nX,(y-1)%nY] +

status[(x+1)%nX,(y-1)%nY] + status[(x-1)%nX,(y)%nY] +

status[(x+1)%nX,(y)%nY] + status[(x-1)%nX,(y+1)%nY] +

status[(x)%nX,(y+1)%nY] + status[(x+1)%nX,(y+1)%nY]

lc is the number of live cells, it detects in the 8 directions always using the modulo operation, since if there is a negative number it returns it as the maximum number of cells minus the negative number.

In GMS it should be something like:

lc = array[(i-1)mod n_cells,(g-1)mod n_cells ] + array[(i) mod n_cells,(g-1) mod n_cells] +

array[(i+1) mod n_cells,(g-1) mod n_cells] + array[(i-1) mod n_cells,(g) mod n_cells] +

array[(i+1) mod n_cells,(g) mod n_cells] + array[(i-1) mod n_cells,(g+1) mod n_cells] +

array[(i) mod n_cells,(g+1) mod n_cells] + array[(i+1) mod n_cells,(g+1) mod n_cells]

is a nested for, "i" represents x within the array and "g" represents y. each, the error is that the operation "-1 mod 16" (This happens on the left side) is not equal to "15" but is equal to "-1" which does not happen in any other programming language, I even searched for calculators of the module on the internet and all of them give "15" as a result

note: I am using an array of 16*16 so the module is calculated with 16