Git Product home page Git Product logo

Comments (5)

godisreal avatar godisreal commented on June 10, 2024

Thanks for your interest. It seems that the source code is able to run on your computer, and there may be something wrong with pygame. I do not know why the simulation screen is blank.
Yes. You are supposed to see three circles moving around. The simulation was recorded in 3Particles.swf. So do you run any other Python program with pygame? So others are OK and only this one is blank on screen? Please let me know whether you can debug it or not. I compiled the code in Python 2.7 with Pygame 1.9. Based on your description, it seems that pygame.draw.line() and pygame.draw.circle() does not output on the screen.

Sorry for the error about tabs and spaces. In fact the text edior confuses me a little. I previously selected TABS and SPACES, and it caused an unexpected problem as you mentioned. So I should only use SPACES and set TAB = 4 spaces. Is that right? Anyway, you are also welcome to give a pull request if you have already fixed this error.

from group-social-force.

chraibi avatar chraibi commented on June 10, 2024

I use pygame 1.9.5 and Python 3.7.3.
I did not check other pygame-examples. Just wanted to see what this simulation is all about..
Yes, four spaces everywhere seem to be a good idea.

from group-social-force.

godisreal avatar godisreal commented on June 10, 2024

Please try the following program to test the pygame in Python 3.7. If it does not work in your computer, it is probably a setup problem of pygrame with Python 3.7. I am not sure. Just try it. There is no problem in computational model in the existing code. Thank you for your question.

from group-social-force.

godisreal avatar godisreal commented on June 10, 2024

The problem may be related to pygame._view.

When I use py2exe to get an execuable, the execuable file is successfully produced.
However, when I run it, it returns the following error message. I think the these problems are perhaps related issues.


C:\Documents and Settings\WP\Desktop\PySim\Test_py2exe\dist>simulator_WP_Doorway
.exe
simulator_WP_Doorway.exe:4: RuntimeWarning: import display: No module named _view
(ImportError: No module named _view)
simulator_WP_Doorway.exe:4: RuntimeWarning: import draw: No module named _view
(ImportError: No module named _view)
simulator_WP_Doorway.exe:4: RuntimeWarning: import image: No module named _view
(ImportError: No module named _view)
simulator_WP_Doorway.exe:4: RuntimeWarning: import pixelcopy: No module named _view
(ImportError: No module named _view)
simulator_WP_Doorway.exe:4: RuntimeWarning: import transform: No module named _view
(ImportError: No module named _view)
Traceback (most recent call last):
  File "simulator_WP_Doorway.py", line 5, in <module>
  File "pygame\draw.pyc", line 12, in <module>
  File "pygame\draw.pyc", line 10, in __load
  File "pygame\surface.pyc", line 12, in <module>
  File "pygame\surface.pyc", line 10, in __load
ImportError: No module named _view

from group-social-force.

godisreal avatar godisreal commented on June 10, 2024

OK. So the developers of Pygame replied that the problem is related to OSX for mac users. The details are listed as below.
"Looking at the linked issue on the other github repo I'm almost certain this is just the standard 'modern OSX doesn't work with pygame 1/SDL1' issue we get reported every other week. Don't think there is any work for pygame here, other than telling people on mac to use pygame 2 whenever they ask, so I think I'll close this for now." --- By MyreMylar commented May 31, 2020

from group-social-force.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.