diff --git a/README.md b/README.md index 10a5732..97206ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,32 @@ -# Falling Sand Simulation Concept in Python +# ***Falling Sand Simulation Concept in Python*** -## mostly a concept in python for falling sand simulation +mostly a concept in python for falling sand simulation +i guess the goal is to make a python version of the powder toy which is a falling sand sim +the code is not finished yet, but i will update it as i go. -## i guess the goald is to make a python version of the powder toy which is a falling sand sim +## **Current Features** -## the code is not finished yet, but i will update it as i go +| **Working** | **Partial** | **Not Working/Implemented** | +| ----------------- | ----------------------------- | --------------------------- | +| Gravity | Gas | Zoom | +| Liquid/Solid | Liquid | Pause | +| Particle Data | Fire/Flame | Pressure | +| Brush Sizes | Particle Basic Interactions | explosiveness | +| Debugging Info | Particle Heat interactions | conductiveness | +| Menus and Buttons | Ambient Heat | | +| | Wind | | +| | Core Physics and Interactions | | +| | Core Rendering System | | + +### **Controls** + +| Key | Action | +| ------------------- | ------------------------------ | +| Z | Zoom window | +| ESC | Exit Program | +| C | Clear Screen | +| Space | Pause Simulation | +| Mouse 1 {Left} | Spawn Particle with brush size | +| Mouse 3 {Right} | Erase Particles at cursor | +| Mouse 2 {Middle} | Spawn Particle at cursor | +| Mouse Wheel Up/Down | Change Brush size | diff --git a/sandpypi.py b/sandpypi.py index 435e07d..771a82e 100644 --- a/sandpypi.py +++ b/sandpypi.py @@ -75,6 +75,7 @@ def main(): # Main function to run the program if rendering.settings_button.collidepoint(event.pos): settings_visible = not settings_visible + elif settings_visible: # Handle settings toggles mouse_pos = pygame.mouse.get_pos() @@ -100,23 +101,26 @@ def main(): # Main function to run the program mouse_down_right = False elif event.type == pygame.MOUSEBUTTONUP and event.button == 2: mouse_down_middle = False + elif event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: print("Escape button pressed") print(f"Exiting Program {__file__}") running = False + elif event.key == pygame.K_SPACE: print(f"Pause button pressed but not functional 'Space'") pass + elif event.key == pygame.K_c: rendering.clear_screen(sim) + elif event.key == pygame.K_z: zoom_active = not zoom_active if zoom_active: zoom_locked = False - zoom_pos = pygame.mouse.get_pos() + zoom_pos = pygame.mouse.get_pos() - elif event.type == pygame.QUIT: running = False