hunar4321 / particle-life

A simple program to simulate artificial life using attraction/reuplsion forces between many particles
MIT License
2.98k stars 297 forks source link

Out of the window #8

Open Seuguhfr opened 1 year ago

Seuguhfr commented 1 year ago

Hello, When I run particle_life.exe, the simulation is out of the window. I only see a quarter of the simulation, as if the app thinks my screen is bigger than it really is. How I can fix it ? Thank you in advance, Jules

hunar4321 commented 1 year ago

You need to have a FULL HD monitor (1920 x 1028). We might add resize ability at some moment.

Bellisario commented 1 year ago

Same problem for me, I have an HD monitor (768x1366, Intel HD Graphics) but window goes out of bounds...

AnasQiblawi commented 1 year ago

same issue

image

Vaibhav9535 commented 1 year ago

Lol see this when I tried to run it on my android mobile ..... Screenshot_20220830-192006_Dcoder

AnasQiblawi commented 1 year ago

@Vaibhav9535 Lol see this when I tried to run it on my android mobile .....

try download directly from the repository its already fixed and can work on all screens https://raw.githubusercontent.com/hunar4321/life_code/main/particle_life.html

image

LuizMosciaro commented 1 year ago

Is is ask too much for a 1366x766 or configurable screen settings executable? I would really like to send this to other friends and spread your work around for non programmers.

Edit:

They've added a python file for those who might know better manipulate in this language.

hunar4321 commented 1 year ago

Is is ask too much for a 1366x766 or configurable screen settings executable? I would really like to send this to other friends and spread your work around for non programmers.

The problem is not just the screen size, I have hard coded many numbers to visualize the model, GUI controls. Changing the screen size would require changing all these numbers too. Hard coding numbers is a very bad programming habit but I didn't expect this program to get this traction to care about my coding style 🤦‍♂️
Anyway, I'll try to fix these issues and also hope people with openFramework background could step in and contribute. Best

hunar4321 commented 1 year ago

I have now made the screen size for the C++ version to be 1600 x 900 so it is a bit friendlier for those who don't have Full+HD monitors

ker2x commented 1 year ago

the pull request I made will make the cpp version of the code dynamically resizable. it's actually a very simple 2 lines patch: https://github.com/hunar4321/particle-life/pull/71/commits/aed94d160fd6c7193b90aa7ccada9c565a4e905d