From a03ba2b950046fd0753fda00a8e2f6e2554a89d2 Mon Sep 17 00:00:00 2001 From: Stan44 Date: Thu, 26 Dec 2024 05:44:34 -0600 Subject: [PATCH] purdyfied and added to the commit messages may of changed a couple of other things maybe minor tweaks to physics. --- __pycache__/rendering.cpython-312.pyc | Bin 12255 -> 11846 bytes __pycache__/sim.cpython-312.pyc | Bin 30961 -> 30532 bytes rendering.py | 23 +++++------- sandpypi.py | 4 +- settings.py | 3 ++ setup.py | 2 + sim.py | 52 +++++++++++++------------- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/__pycache__/rendering.cpython-312.pyc b/__pycache__/rendering.cpython-312.pyc index 57493cda548974cefc83d22c585c65a1a65f00b9..e845e579e133382894ab2417a15363bd6509942a 100644 GIT binary patch delta 1516 zcmZvcO>7%Q6vyZ7de_E|Be2tkq(wM!KA0r7NScr)BoPgW50N&g$pJ#CYiBo(gTFev zMkFG#sum7N6@rmK;#6@#RmEv92*EMAaOwq#z3@>kzC|ulB_t%?o6Uz*v4@}D%$s@p zKK{GE<@T>Me~!na44)_GE5(2N8GAsBqbGD|JRC#gD`qhZ%B%uwP|?=3ioT`;)7Wdw z(rz(Jzo!MK*FxJNZnS8@b>FOS7xNX{H$}c`)hd3no)>Ouy=>>|qE@$ME^K(qu%*SG z32rmCH6-tMB;{@>>iwZtbwe2F@vLwkK-l{vvafYNhZ{mCqzRN9H$+yh$7ak4+R4ao zV*QYjd$Fr9Dc_Iwc=H_t(4;_Oh;VW_Maw<{7SF^mf}0{s_6%Vb;m41YcDL)cc%B?{ z2**UE)Faf32XVb~`m$ZMY*DHfv*lXe$`u-}TdO+L^7r^{nDnZhU+d-~g;;Q;g4Wb|KTJI0*hji-c|hl_NF?n*^#{Tqdj# zlonN9YK}^f1L)w<$3!Gv#9iME#2{4us!@GLIbX2LY6gL*sDwaNL@^;-X%1g_$$>q9 zl>Bw@4t8&6=*9&qpNCFz_RaN@z%NUsjSeN^<4oxbv`P)fA!!{3o*SNq@1;9Din6>j z`~aFk$kyM0mBsL!a0wp}XaM3v!ZzV1;jtsvaBrt$Q8b**)Jkc`o=vTC?c^knoaFld z{T-p8N?Lj#t!ROQEM0}7flHZl)C$*qwe0_AI{{4Q@{bQj&ZAt~A=Zuk+$ zc3u2mI6;GGLh7#Gu>4|URjNPI|`B7JdJ3pXsjv35=6iY(_(o#Z7%Ly4+ z1(TQ=Fr-=VeS29#L5*~(svKnX-&D$83C)n{H@jQ%&46JBn4!!tL!DjGB`T-nIO}E( zOiI9xF~Hy1x|if*Y!c$k44RUt*-%#)mzo(5Qvfq$1j-qJSuCL)V`sNbGXE7_TcljN z?5f$RiDcSz1E(B2{#pg9m&?Rovybu{gvr~=m)0D}3#PQlKFi<>G`#NB%>biLu2E;=BpXy$U z+9&27if%nbqL)xRnRJr59OuuHY7N25UPsai!U*9xp+z>;9!62G_KM)j<5`Cv5ql!N z^-qzC;=>M1-VQR^!EQf89tb$%P8YiP7%;I={ zyltbwo6vhZr2}VJdB+K?gvY?imhJGBxX{v$<8ig+78LxDi+|y*!Yk2_=LwSpY5<=i zOcQ1Z_qkA&r>pkzymK-(WKEkpV#B($>Zu1;_xk_!^-AcCmh6vKXq1ADI2eqd#^??; z2y26TKdSGBdGW43r}m<5OcKygR~*}X8lYeN(cT$9f?9qQ;VM{@BtpuL!&vISrp%bHGZOgLdwKozEEFz3D!1aOm*hW9FD`n7%^Ea=bsh zZSoH&+P(eX4emT6f*yHI(MnXn(Uj9|z>W DD;Jor diff --git a/__pycache__/sim.cpython-312.pyc b/__pycache__/sim.cpython-312.pyc index 0a1fa18f37964609a3049175985f494bcf0d8899..56ca267b355ebd95c7475f25b79ba4cd0e08f70b 100644 GIT binary patch delta 4239 zcmZu!dvH`&8Q-(7EO|mmXaWHOF(DVSAq2u(vI!wTD9b}A1eDFPd$U>CM>uy=2z6Yl zsShmLnNwgy$LT23N_CLB9i1YAI1D?@WGs z&Ue0Z&hLD$b8`2tc=dge{zX|?v5mgpe>fib;JD59XLKe%XSQ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1%*=obmJnQo&f395-XX@4H#tf}GmjL21WA4fx@DwwkP}9ZBky|dm2H!UU-x41ht<(nVhuYa| z+1{a#yyUqX?mpou<~FWuQqwRNYy)fs6cyi&SDD2!tk2SG{<`)POl1Lbby1@iK%*N_ z@w$fmlMUUONrfr;Qft`y?7gW*#PYPY$HS_{#DUfGafP8C7frbLD=j}Hzss_lQ%DaQyU1}tic^b2_6~Tx6 zIly_q%L?^UE{%8%@6wVtFnSyC7r;6Iv~*9!4HyBC5B4#Fqsqtr8NLM*ZFRmLHqj|| z9h}SNi}=CynWbJ(s=9nDCl0gOzI798Q_Qz|Vy{~1+rcK9DtvwHdc*(nk`;M*ab@F#5MqdskG(*tK$nwO&@1TnYNwyg!vy zUaD$+qpaUnd1>q-6l<|*?j_Gsc#u;H3Y#STXJKk)_y6aWAK diff --git a/rendering.py b/rendering.py index 4bb2cdc..6ed210a 100644 --- a/rendering.py +++ b/rendering.py @@ -1,9 +1,9 @@ #File Name: rendering.py -from settings import pygame, json, random, particle_properties +from settings import pygame, random, particle_properties class Rendering: - + def __init__(self, width, height): self.screen = pygame.display.set_mode((width, height)) self.background = pygame.Surface((width, height)) @@ -21,12 +21,7 @@ class Rendering: for name, properties in particle_properties.items(): if 'color' in properties: self.particle_colors[name.lower()] = properties['color'] - self.categories = { - 'Solids': [], - 'Liquids': [], - 'Gases': [], - 'Special': [] - } + self.categories = {'Solids': [], 'Liquids': [], 'Gases': [], 'Special': []} for particle_name, properties in self.particle_properties.items(): if properties.get('is_gas'): self.categories['Gases'].append(particle_name) @@ -63,7 +58,7 @@ class Rendering: x_offset += self.button_width + 10 # Add spacing between buttons - def draw_particles(self, particles, active_particles, particle_size, particle_colors): + def draw_particles(self, particles, active_particles, particle_size, particle_colors): # this is the function that draws the particles self.particle_surface = pygame.Surface((self.width, self.height), pygame.SRCALPHA) self.particle_surface.fill((0, 0, 0, 0)) @@ -99,7 +94,7 @@ class Rendering: self.screen.blit(self.particle_surface, (0, 0)) - def draw_debug_overlay(self, fps, particles): + def draw_debug_overlay(self, fps, particles): # this is the function that draws the debug overlay # Get mouse position and convert to grid coordinates mouse_x, mouse_y = pygame.mouse.get_pos() grid_x = mouse_x // 3 @@ -143,7 +138,7 @@ class Rendering: y_offset += 25 - def draw_buttons(self): + def draw_buttons(self): # this is the function that draws the buttons self.buttons = {} # Draw category buttons vertically on right @@ -181,12 +176,12 @@ class Rendering: self.screen.blit(label, (self.clear_screen_button.x + 5, self.clear_screen_button.y + 5)) - def render_brush_curser(self, x, y, radius): + def render_brush_curser(self, x, y, radius): # this is the function that draws the brush curser but isn't used yet so unkown if works # Draw a circle cursor for brushsize pygame.draw.circle(self.screen, (255, 255, 255), (x, y), radius) - def draw_brush_size_slider(self, brush_size): + def draw_brush_size_slider(self, brush_size): # this is the function that draws the brush size slider # Draw the slider for brush size pygame.draw.rect(self.screen, (255, 255, 255), (500, 10, 100, 20)) pygame.draw.rect(self.screen, (0, 0, 0), (500, 10, 100, 20), 2) @@ -195,7 +190,7 @@ class Rendering: self.screen.blit(label, (500, 10)) - def clear_screen(self, sim): + def clear_screen(self, sim): ## this is the function that clears the screen # Store current particle type current_type = sim.current_particle_type diff --git a/sandpypi.py b/sandpypi.py index aaeac65..ae689bc 100644 --- a/sandpypi.py +++ b/sandpypi.py @@ -9,7 +9,7 @@ from settings import pygame from rendering import Rendering from sim import Simulation -def main(): +def main(): # Main function to run the program pygame.init() clock = pygame.time.Clock() pygame.display.set_mode((1024, 768), pygame.HWSURFACE | pygame.DOUBLEBUF) @@ -98,6 +98,6 @@ def main(): pygame.display.flip() pygame.quit() - + if __name__ == "__main__": main() diff --git a/settings.py b/settings.py index ed54030..e3bdf50 100644 --- a/settings.py +++ b/settings.py @@ -1,3 +1,6 @@ +#File Name: settings.py +# Global settings and impoorts for the project. + import pygame import json import random diff --git a/setup.py b/setup.py index b78fd9f..de381a5 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +#this be a wip maybe gonna move heavy work loads to cython. + from setuptools import setup from Cython.Build import cythonize diff --git a/sim.py b/sim.py index fcb614c..587fdc8 100644 --- a/sim.py +++ b/sim.py @@ -2,7 +2,7 @@ #Load the imports. Pygame is what makes this even work and so simple may consider other engines for performance depends on learning curve. -from settings import json, random, time, particle_properties +from settings import random, particle_properties # Load particle properties from json so we know what particles we got and how they should be simulated. class Particle: @@ -76,7 +76,7 @@ class Simulation: self.wind = [0.0, 0.0] # Global wind vector (x, y) - def handle_phase_transitions(self, particle, x, y): + def handle_phase_transitions(self, particle, x, y): # this is where we handle all the phase transitions. """Handle all phase transitions for a particle""" # Check evaporation if hasattr(particle, 'evaporate_temperature') and particle.evaporate_temperature is not None: @@ -99,7 +99,7 @@ class Simulation: self.transform_particle(x, y, particle.solidify) - def handle_particle_interactions(self, dt): + def handle_particle_interactions(self, dt): # this is where we handle all the particle interactions. """Handle interactions between different particle types""" for x, y in list(self.active_particles): particle = self.particles[x][y] @@ -115,7 +115,7 @@ class Simulation: self.process_interaction(particle, neighbor, x, y, nx, ny) - def process_interaction(self, particle1, particle2, x1, y1, x2, y2): + def process_interaction(self, particle1, particle2, x1, y1, x2, y2): # this function is part 2 of handle_particle_interactions. """Process specific interactions between two particles""" # Water + Sand = Mud if (particle1.particle_type == 'water' and particle2.particle_type == 'sand' or @@ -139,7 +139,7 @@ class Simulation: self.transform_particle(target_x, target_y, 'fire') - def create_mud(self, x, y): + def create_mud(self, x, y): # this is where we create the mud. probably should be moved to handle_particle_interactions or process_interaction. """Create mud particle from water and sand interaction""" if 'mud' in self.particle_properties: properties = self.particle_properties['mud'] @@ -148,7 +148,7 @@ class Simulation: self.active_particles.add((x, y)) - def transform_particle(self, x, y, new_type): + def transform_particle(self, x, y, new_type): # this is where we transform the particle. """Transform a particle into a different type""" if new_type in self.particle_properties: properties = self.particle_properties[new_type] @@ -157,7 +157,7 @@ class Simulation: self.active_particles.add((x, y)) - def handle_gas_movement(self, particle, x, y): + def handle_gas_movement(self, particle, x, y): # this is where we handle the gas movement. this function sucks. wip """Handle gas particle movement""" if particle.is_gas: dx = random.uniform(-1, 1) @@ -173,7 +173,7 @@ class Simulation: self.active_particles.discard((x, y)) - def temperature(self, dt): + def temperature(self, dt): # this is where we handle the temperature. """Handle temperature changes and state transitions""" for x, y in list(self.active_particles): particle = self.particles[x][y] @@ -188,7 +188,7 @@ class Simulation: particle.is_gas = False - def calculate_forces(self, particle, x, y): + def calculate_forces(self, particle, x, y): # this is where we calculate the forces. """Calculate net forces acting on a particle.""" fx, fy = 0.0, 0.0 # Initialize forces @@ -220,7 +220,7 @@ class Simulation: return fx, fy - def ignite_particle(self, particle): + def ignite_particle(self, particle): # this is where we ignite the particle. """Handle ignition and burning of flammable particles.""" if hasattr(particle, 'flamability') and particle.flamability > 0.5: if hasattr(particle, 'temperature') and particle.temperature > 150: @@ -229,10 +229,10 @@ class Simulation: # Add burning effect for wood if particle.type == 'wood': particle.burning = True - particle.burn_time = 100 # Adjust burn time as needed + particle.burn_time = 100 # burn time - def spread_fire(self): + def spread_fire(self): # this is where we spread the fire. """Spread fire to neighboring particles.""" for x, y in list(self.active_particles): particle = self.particles[x][y] @@ -253,7 +253,7 @@ class Simulation: self.ignite_particle(neighbor) - def handle_temperature(self, dt): + def handle_temperature(self, dt): # this is where we handle the temperature. """Handle temperature changes and state transitions""" for x, y in list(self.active_particles): particle = self.particles[x][y] @@ -289,7 +289,7 @@ class Simulation: neighbor.temperature += heat_transfer - def burning(self): + def burning(self): # this is where we handle the burning. """Handle burning of particles.""" for x, y in list(self.active_particles): particle = self.particles[x][y] @@ -301,27 +301,27 @@ class Simulation: self.spatial_grid.pop((x, y), None) - def get_cell_key(self, x, y): + def get_cell_key(self, x, y): # this is where we get the cell key. # Convert coordinates to grid cell cell_x = x // self.cell_size cell_y = y // self.cell_size return (cell_x, cell_y) - def add_to_spatial_grid(self, particle, x, y): + def add_to_spatial_grid(self, particle, x, y): # this is where we add to the spatial grid. cell_key = self.get_cell_key(x, y) if cell_key not in self.spatial_grid: self.spatial_grid[cell_key] = set() self.spatial_grid[cell_key].add((x, y)) - def remove_from_spatial_grid(self, x, y): + def remove_from_spatial_grid(self, x, y): # this is where we remove from the spatial grid. cell_key = self.get_cell_key(x, y) if cell_key in self.spatial_grid: self.spatial_grid[cell_key].discard((x, y)) - def create_particle_circle(self, center_x, center_y): + def create_particle_circle(self, center_x, center_y): # this is where we create the particle circle. brush_size = int(self.brush_size) for dx in range(-brush_size, brush_size + 1): for dy in range(-brush_size, brush_size + 1): @@ -330,7 +330,7 @@ class Simulation: center_y + dy * self.particle_size) - def create_particle(self, x, y): + def create_particle(self, x, y): # this is where we create the particle. """Create a new particle with full property support""" particle_type = self.current_particle_type.lower() if particle_type in self.particle_properties: @@ -352,14 +352,14 @@ class Simulation: self.active_particles.add((grid_x, grid_y)) - def update_spatial_grid(self): + def update_spatial_grid(self): # this is where we update the spatial grid. """Update spatial grid for optimized collision detection""" self.spatial_grid.clear() for x, y in self.active_particles: self.add_to_spatial_grid(self.particles[x][y], x, y) - def apply_gravity(self, dt): + def apply_gravity(self, dt): # this is where we apply gravity. """Handle only gravity and basic particle movement""" self.spatial_grid.clear() @@ -419,7 +419,7 @@ class Simulation: particle.position = (new_x, new_y) - def handle_special_particles(self, particle, x, y): + def handle_special_particles(self, particle, x, y): # this is where we handle special particles. """Handle special particle behaviors""" if particle.particle_type in ['fire', 'flame', 'smoke']: if random.random() < 0.6: # % chance @@ -446,7 +446,7 @@ class Simulation: self.active_particles.add((x, y)) - def apply_physics(self, dt): + def apply_physics(self, dt): # this is where we apply physics. """Handle all physics effects""" new_active_particles = set() @@ -497,7 +497,7 @@ class Simulation: continue - # Air handling - particles can pass through + # Air handling - particles can pass through should implement proper air instead of a particle if particle.particle_type == 'air': continue @@ -559,7 +559,7 @@ class Simulation: self.active_particles = new_active_particles - def clear_particles_circle(self, center_x, center_y): + def clear_particles_circle(self, center_x, center_y): # this is for the brush tool """Clear particles in a circle around the given point based on brush size""" brush_size = int(self.brush_size) for dx in range(-brush_size, brush_size + 1): @@ -575,7 +575,7 @@ class Simulation: self.remove_from_spatial_grid(grid_x, grid_y) - def mix_liquids(self, liquid1, liquid2): + def mix_liquids(self, liquid1, liquid2): # this is for the mix tool """Handle liquid mixing interactions""" if liquid1.temperature != liquid2.temperature: avg_temp = (liquid1.temperature + liquid2.temperature) / 2