generated from mwc/project_game
Left feedback in proposal
This commit is contained in:
parent
66869aac1a
commit
b1541ddf77
17
proposal.md
17
proposal.md
|
@ -32,6 +32,23 @@ I think a good milestone in this project would be to establish the sprite that c
|
|||
|
||||
I haven't had a chance to work through the retro lab yet (I did watch the video), but wanted to get this proposal in first. I think some of the easy movements will become more obvious to me after the retro lab. I think one challenge may be making the hungry man larger and the subsequent navigation around the screen. If this functionality does not become too challenging, I may try to add different types of snacks for the hungry man or different types of penalties.
|
||||
|
||||
# Feedback from Chris Proctor
|
||||
This sounds like a fun challenge--and I think it's a good conceptual distance
|
||||
from the snake game that you'll be able to study that game's code. One major challenge
|
||||
I anticipate is coordinating all the pixels of the man's body. The snake game has
|
||||
one approach--the head moves forward, and then each body segment moves into the position
|
||||
previously occupied by the segment (or head) in front of it. This involves propagating
|
||||
a message along a sequence of agents, similar to what I had to do with the blocks in
|
||||
my beast game (see week 13 video).
|
||||
|
||||
Another approach, which might work better for this game, would be to have a body manager
|
||||
agent, which has a position but isn't displayed directly (`display = False`). Then body
|
||||
part agents (each agent that actually shows up on the screen) each have a fixed (x, y)
|
||||
offset from the body manager's position, which acts as an origin point for a local reference
|
||||
frame. The body manager can keep all its body parts in a list, and an `update_positions`
|
||||
method which goes through each body part and sets its position to the manager's position
|
||||
plus the body part's offset. That way, you can move the whole body by moving the manager
|
||||
and then calling `update_positions`.
|
||||
|
||||
Good luck, and be in touch when you get stuck!
|
||||
|
||||
|
|
Loading…
Reference in New Issue