I make games in Python using the Ursina Engine :)
mandaw2014 / rally Goto Github PK
View Code? Open in Web Editor NEWA Simple Racing Game Made In Python With The Ursina Engine
Home Page: https://mandaw2014.itch.io/rally
License: MIT License
A Simple Racing Game Made In Python With The Ursina Engine
Home Page: https://mandaw2014.itch.io/rally
License: MIT License
Great project, I would like to ask what version of python you are using? I encountered the following problem,
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/Users/easonguo/Downloads/Rally-master/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Entity' object has no attribute 'rotate'
:task(error): Exception occurred in PythonTask update
Traceback (most recent call last):
File "/Users/easonguo/Downloads/Rally-master/main.py", line 200, in
app.run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ursina/main.py", line 239, in run
super().run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/direct/showbase/ShowBase.py", line 3330, in run
self.taskMgr.run()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/direct/task/Task.py", line 553, in run
self.step()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/direct/task/Task.py", line 504, in step
self.mgr.poll()
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/Users/easonguo/Downloads/Rally-master/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Entity' object has no attribute 'rotate'
:thread(error): Exception occurred within PythonThread PythonThread-0
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/direct/stdpy/thread.py", line 107, in threadFunc
function(*args, **kwargs)
File "/Users/easonguo/Downloads/Rally-master/main.py", line 98, in load_assets
load_texture(t)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ursina/texture_importer.py", line 40, in load_texture
t = Texture(filename.resolve())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/ursina/texture.py", line 24, in init
self._texture = loader.loadTexture(Filename.fromOsSpecific(str(value)))
^^^^^^
NameError: name 'loader' is not defined. Did you mean: 'Loader'?
@mandaw2014 hii man, greate game. it inspired me alot. could you please tell me how i cn add my own car models into the game.( its a bit too complicated for me to understand)
Here is what was printed in terminal:
package_folder: /home/lvicek07/.local/lib/python3.10/site-packages/ursina
asset_folder: .
OS: posix
screen resolution: (1920, 1080)
Hello from the Rally Server!
no audio found with name: /ringtones/clicking.ogg supported formats: .ogg, .wav
no audio found with name: /ringtones/subtle.ogg supported formats: .ogg, .wav
no audio found with name: /ringtones/uplifting.ogg supported formats: .ogg, .wav
Known pipe types:
glxGraphicsPipe
(4 aux display modules not yet loaded.)
Xlib: extension "XFree86-DGA" missing on display ":0".
:device(warning): /dev/input/event6 is not readable, some features will be unavailable.
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
read obj at: assets/cars/sports-car.obj
read obj at: assets/cars/sports-car.obj
read obj at: assets/cars/muscle-car.obj
read obj at: assets/cars/limousine.obj
read obj at: assets/cars/lorry.obj
read obj at: assets/cars/hatchback.obj
read obj at: assets/cars/rally-car.obj
read obj at: assets/sand_track/sand_track.obj
read obj at: assets/grass_track/grass_track.obj
read obj at: assets/snow_track/snow_track.obj
read obj at: assets/forest_track/forest_track.obj
read obj at: assets/savannah_track/savannah_track.obj
read obj at: assets/lake_track/lake_track.obj
read obj at: assets/particles/particles.obj
read obj at: assets/sand_track/sand_track_bounds.obj
read obj at: assets/grass_track/grass_track_bounds.obj
read obj at: assets/snow_track/snow_track_bounds.obj
read obj at: assets/forest_track/forest_track_bounds.obj
read obj at: assets/savannah_track/savannah_track_bounds.obj
read obj at: assets/lake_track/lake_track_bounds.obj
read obj at: assets/sand_track/rocks-sand.obj
read obj at: assets/sand_track/cacti-sand.obj
read obj at: assets/grass_track/trees-grass.obj
read obj at: assets/grass_track/thintrees-grass.obj
read obj at: assets/grass_track/rocks-grass.obj
read obj at: assets/grass_track/grass-grass_track.obj
read obj at: assets/snow_track/trees-snow.obj
read obj at: assets/snow_track/thintrees-snow.obj
read obj at: assets/snow_track/rocks-snow.obj
read obj at: assets/forest_track/trees-forest.obj
:ffmpeg(warning): Could not update timestamps for skipped samples.
:ffmpeg(warning): Could not update timestamps for discarded samples.
read obj at: assets/forest_track/thintrees-forest.obj
read obj at: assets/cars/garage/cosmetics/viking_helmet.obj
read obj at: assets/savannah_track/rocks-savannah.obj
read obj at: assets/savannah_track/trees-savannah.obj
read obj at: assets/lake_track/trees-lake.obj
read obj at: assets/cars/garage/cosmetics/duck.obj
read obj at: assets/lake_track/thintrees-lake.obj
read obj at: assets/cars/garage/cosmetics/banana.obj
read obj at: assets/cars/garage/cosmetics/surfinbird.obj
read obj at: assets/lake_track/rocks-lake.obj
read obj at: assets/lake_track/bigrocks-lake.obj
read obj at: assets/lake_track/grass-lake.obj
read obj at: assets/cars/garage/cosmetics/surfboard.obj
:collide(error): Invalid points in CollisionPolygon:
4.52877 0.015562 5.32231
4.52877 0.015562 -2.62766
4.52877 0.015562 -3.25315
normal 0 -3.8147e-06 0 with length 3.8147e-06
:collide(error): Invalid points in CollisionPolygon:
-5.17012 1.36712 -3.25559
-5.17012 1.36712 5.3219
-5.17012 1.36712 -2.67761
normal 0 0 0 with length 1.06624e-06
:collide(error): Invalid points in CollisionPolygon:
-5.17012 1.36712 -3.25559
-5.17012 1.36712 7.70795
-5.17012 1.36712 5.86507
normal 0 0 0 with length 9.53674e-07
:collide(error): Invalid points in CollisionPolygon:
3.45144 1.36712 -3.16898
3.45144 1.36712 4.66929
3.45144 1.36712 5.86548
normal 0 1.90735e-06 0 with length 1.90735e-06
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
False
False
False
False
False
False
:pnmimage:png(warning): iCCP: known incorrect sRGB profile
info: development mode: True
application successfully started
Traceback (most recent call last):
File "/home/lvicek07/.local/lib/python3.10/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/home/lvicek07/Desktop/Rally/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
AttributeError: 'Entity' object has no attribute 'rotate'
:task(error): Exception occurred in PythonTask update
Traceback (most recent call last):
File "/home/lvicek07/Desktop/Rally/main.py", line 200, in
app.run()
File "/home/lvicek07/.local/lib/python3.10/site-packages/ursina/main.py", line 239, in run
super().run()
File "/home/lvicek07/.local/lib/python3.10/site-packages/direct/showbase/ShowBase.py", line 3330, in run
self.taskMgr.run()
File "/home/lvicek07/.local/lib/python3.10/site-packages/direct/task/Task.py", line 553, in run
self.step()
File "/home/lvicek07/.local/lib/python3.10/site-packages/direct/task/Task.py", line 504, in step
self.mgr.poll()
File "/home/lvicek07/.local/lib/python3.10/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/home/lvicek07/Desktop/Rally/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
AttributeError: 'Entity' object has no attribute 'rotate'
Wouldn't be better if the tracks were .json files?
Hi, I found this project and looks simple but complex enough to demonstrate how to use ursina.
I did a series of patches adding some features:
I tried to split into atomic changes but there's some back and forth.
Will open the PR and if any looks interesting we can work to merge any part.
I open this meta-issue to see if Rally development is stopped (to continue on my fork) or it is open for contributions. If so, I can open an issue for each characteristic
The game doesn't start, the issue seems to be that the 'rotate" attribute isn't part of an Entity.
System info: Debian 11.5 x86_64
Python 3.9.2
pip install -r requirements.txt
python main.py
info: development mode: True
application successfully started
Traceback (most recent call last):
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/tmp/Rally/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
AttributeError: 'Entity' object has no attribute 'rotate'
:task(error): Exception occurred in PythonTask update
Traceback (most recent call last):
File "/tmp/Rally/main.py", line 200, in <module>
app.run()
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/ursina/main.py", line 239, in run
super().run()
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/direct/showbase/ShowBase.py", line 3330, in run
self.taskMgr.run()
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/direct/task/Task.py", line 553, in run
self.step()
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/direct/task/Task.py", line 504, in step
self.mgr.poll()
File "/home/narke/.local/share/virtualenvs/rally/lib/python3.9/site-packages/ursina/main.py", line 143, in _update
entity.update()
File "/tmp/Rally/car.py", line 731, in update
self.rotation_parent.rotate((0, self.rotation_y + 180, 0))
AttributeError: 'Entity' object has no attribute 'rotate'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.