Python Forum
I have an idea and don't know where to start... - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Game Development (https://python-forum.io/forum-11.html)
+--- Thread: I have an idea and don't know where to start... (/thread-28584.html)



I have an idea and don't know where to start... - Bubba123 - Jul-24-2020

So, my girlfriend is coming out of hospital soon and we both got into coding during lockdown. I want to suprise her by coding a game in pygame. I've already started but don't know how to proceed, especially since theres no guide/help to get me started with the main mechanic.
So, the idea is that a sprite that looks like me automatically leaves a trail behind itself that spells her name.
This is my code that i have already. I would just like to get a tip how to start.



RE: I have an idea and don't know where to start... - Windspar - Jul-25-2020

This is what programming is all about. Figure out how to program your code. More you program without copying. The more you will learn.

I would use a surface for her name. Then use a rect to color out here name. As you move sprite. You shrink and move the rect.
# Sprite moves.
if cover_rect.w > 0:
    cover_rect.x += sprite_x_movement
    cover_rect.w -= sprite_x_movement

# Draw
screen.fill(clear_color)
screen.blit(hername_surface, position)
if cover_rect.w > 0:
    screen.fill(clear_color, cover_rect)