Worklog for RemiD - breakout 2D arcade game

Tweet 2d worklogs


it is the winter months again here (France), so i have decided to work on an arcade game : breakout 2D.

i am going to post my progress here, and to post some code examples (blitzbasic) of things that i need to make the game.

first look of the layout of the game :


i am still working on this but i am experimenting with different gameplay mechanics before posting more...

there was a nasty bug, never found the cause... :(

so i had to rewrite the code for the direction+movement and detection of collisions and repositionning, and now it works well. :)

i have reduced the size of the blocks so that they can be created and positionned depending on the colored pixels of a background image.

for this game i use several lists for entities (walls, bouncers, blocks, balls) (in arrays), and one list for colliders (in arrays).

i also use a few others lists (custom types) for things which are automatically destroyed (like impacts and parts).

and sometimes i have to delete one entity (a destroyed block or a lost ball) and the corresponding collider.

and i need to have a link between the entity and the collider and a link between the collider and the entity.

the problem is to reorganize the entities list and the colliders list without making errors.

so i thought about how to do it the best way...

and then i did a simple test : how much time would it take to recreate all colliders ?
answer : 0.007 millisecond to recreate all colliders (which are only x, y coordinates of centers and of starts and ends of lines)

all this to say that sometimes there is no need to find the most optimized solution !

problem solved !

i think that i am going to have 4 'bouncers', one for each side of the screen, all controlled using the mouse x axis and y axis,
and small blocks at the center of the screen, which cover some parts of an image.

and the goal will be to break all blocks to reveal the image, without losing the ball.

a later feature would be to generate random images, for never ending games.

wrong post...

some progress :
finally my 2d orientation + movement + collision system works well
after a lot of experiments and debugging

on this screenshot, we can see the colliders of the walls, of the blocks, of the bouncer, of the ball.

the colliders out of range (too far from the ball) are in grey, the colliders in range (near enough the ball) are in white, the dots represents the centers of each collider.

the yellow line represents the movement vector of the ball (direction normal * speed).

the blue line represents the nearest line intersected by the movement vector.

the magenta line represents the collision normal (of the nearest intersected line).

the cyan line represents the reflection normal (the ball orientation after the collision).

good !

next step : ?