This site requires JavaScript, please enable it in your browser!
Greenfoot back
Darkstep
Darkstep wrote ...

2021/6/18

How do you make a grid in a non grid world?

Darkstep Darkstep

2021/6/18

#
I want to make a grid in a non-grid world like the title says. Now I've seen the previous discussion on this and danpost's PIP but I would rather have something more basic. I know you have to use a GridActor for actors going into the grid and a separate actor class for the actual grid itself but I have no idea how to do this. Any code will help. Thanks!
danpost danpost

2021/6/21

#
Darkstep wrote...
I know you have to use a GridActor for actors going into the grid and a separate actor class for the actual grid itself
Actually ... no. You do not have to use GridActor (specific to a grid world) and you do not need an actor for the grid (grid can be drawn onto the world background). All coordinates will be based on "cell" width A virtual 0 coordinate would be just half a "cell" width. A virtual 1 coordinate would be one and one-half "cell" widths. All are half a "cell" width plus the virtual coordinate times a "cell" width.
You need to login to post a reply.