Need tips about block breaker game
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Need tips about block breaker game
Been long time not using löve and now wanna stretch myself writing a small block breaker game. What tips you'd give me to create the game structure.
I am a mad scientist!
Re: Need tips about block breaker game
My tip is: Do it step by step and don't overthink it.
With step by step I mean, just start implementing some blocks or a paddle and the basic movement, then add a ball, get it right and so on. The structure of your game grows together with the features that are already implemented.
With "don't overthink" I mean that you should just start the project. Of course it is a good thing to do things cleverly, but on the other hand, don't wait until you have figured out the perfect engine in your mind.
With step by step I mean, just start implementing some blocks or a paddle and the basic movement, then add a ball, get it right and so on. The structure of your game grows together with the features that are already implemented.
With "don't overthink" I mean that you should just start the project. Of course it is a good thing to do things cleverly, but on the other hand, don't wait until you have figured out the perfect engine in your mind.
Check out my blog on gamedev
Re: Need tips about block breaker game
I will have to deal with creating a grid that holds blocks, gotta use a matrix for that I guess. That would help me create different maps as well.
I am a mad scientist!
Re: Need tips about block breaker game
tried to create the grid which holds images named cell but getting attempt to index field '?' (a nil value) error
Code: Select all
for i = 1, 15 do
for j = 1, 10 do
grid[i][j] = {cell}
end
end
I am a mad scientist!
Re: Need tips about block breaker game
First you have to create grid and grid
Code: Select all
grid = {}
for i = 1, 15 do
grid[i] = {}
for j = 1, 10 do
grid[i][j] = {cell}
end
end
Check out my blog on gamedev
Re: Need tips about block breaker game
thanx that helped! and do i destroy an objetc from matrix? making it nil is not working. should i use table instead of matrix?
I am a mad scientist!
Re: Need tips about block breaker game
What exactly is not working? If you set one entry to nil, it should be deleted. But keep in mind that the matrix is a table of tables (a table of columns). So if you remove one entry, the matrix still has the same number of columns and rows. Only one entry is gone. Even if you remove all entries in one column, the column will not disappear, but you end up with an empty table in one column.srcn wrote:and do i destroy an objetc from matrix? making it nil is not working. should i use table instead of matrix?
You could also store a 0 in every entry that does not have a block and a different number, if there is a block. That would take slightly more memory, but the difference is so small that you should not worry about it.
Check out my blog on gamedev
Re: Need tips about block breaker game
Sorry my fault, trying to draw a nil matrix cell was the problem. Thanks again.
I am a mad scientist!
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 190 guests