larryhastings / pyweek26 Goto Github PK
View Code? Open in Web Editor NEWDynamite Valley
License: BSD 3-Clause "New" or "Revised" License
Dynamite Valley
License: BSD 3-Clause "New" or "Revised" License
I made a function for you called Level.hide_hud(). Please give it a body.
Frozen versions of every type of bomb, and in both floating and not-floating aspects.
They're in and working! Oh purty please!
The timer is running while the intro screen is displayed.
This means that the level can be in a different state depending on how long the player viewed the intro text.
Another issue from the reviews:
The water waves (that indicate the flow) did not render on my machine (running osx 10.12, python 3.6.2, pygame 1.9.3)
If you skip one bomb off another bomb, and it lands in the flow, it doesn't start moving.
I tried to make a GameWonScreen in dynamite.titles but I didn't know what I was doing. I made it overlay text. Please do a proper job!
Being blasted on a log should kill you, but doesnt.
I just fixed this (hastily) for Dams, but this should be fixed using a refactor and a common base class.
User asrp reported a crash as part of the ratings feedback:
Traceback (most recent call last):
File "game.py", line 2590, in <module>
main(sys.argv[1:])
File "game.py", line 2584, in main
pyglet.app.run()
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/app/__init__.py", line 138, in run
event_loop.run()
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/app/base.py", line 142, in run
self._run()
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/app/base.py", line 155, in _run
platform_event_loop.step(timeout)
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/app/xlib.py", line 125, in step
device.select()
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/canvas/xlib.py", line 168, in select
dispatch(e)
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 917, in dispatch_platform_event
event_handler(e)
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 1108, in _event_key
return self._event_key_view(ev)
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 1089, in _event_key_view
self.dispatch_event('on_key_press', symbol, modifiers)
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1232, in dispatch_event
if EventDispatcher.dispatch_event(self, *args) != False:
File "/tmpfs/venv3.6/lib/python3.6/site-packages/pyglet/event.py", line 357, in dispatch_event
if handler(*args):
File "game.py", line 2529, in on_key_press
return game.on_key_press(k, modifiers)
File "game.py", line 444, in on_key_press
r2 = send_message(self.key_handler, "on_key", k)
File "game.py", line 377, in send_message
return fn(*a)
File "game.py", line 1416, in on_key
bomb.detonate()
File "game.py", line 1949, in detonate
self.occupant.on_blasted(self, position)
File "game.py", line 1217, in on_blasted
self.drown()
File "game.py", line 1225, in drown
self.on_died()
File "game.py", line 1202, in on_died
gravity=-400,
File "/tmpfs/dynamite-valley-1.0.2/src/dynamite/scene.py", line 83, in spawn_particles
gravity
File "/tmpfs/dynamite-valley-1.0.2/src/dynamite/scene.py", line 492, in __init__
super().__init__(scene, position, sprite_name)
File "/tmpfs/dynamite-valley-1.0.2/src/dynamite/scene.py", line 204, in __init__
self.sprites[sprite_name],
KeyError: 'remote-bomb'
There are lots of asserts, including in OpenGL code, and maybe players will have a better experience if we turn them off.
If there's only one dam left in a level, and you blow up that dam and die in the same logical frame, e.g.:
Then you both die and win the level simultaneously. The game displays both "You Won!" and "Oops!", one on top of the other. In my experience the game always behaves as if you won, and pressing Space goes on to the next level / title screen.
if on a map you have
>>>XXX>>>
Legend:
> MapWaterMovingRight
X MapWaterMovingRight + Log
only the first log moves. the others never move. if it's a loop, the moving one eventually bumps into the last one and now they're all stuck.
The log below the red floating bomb is on water moving down. Once you destroy the dam, the log should move. But once that red floating bomb goes off, the log will never move again.
If I had dropped the bomb to the left of the floating log, instead of above it, the log would have been fine. It would have started moving once the dam was destroyed.
If you win a game, then at the main menu press Space to continue playing, you replay the final level in that sequence ("tutorialX" or "levelX"). When you win a game, it should blow away the savegame file.
I added Labels for Level Compete etc. They're drawn behind some level stuff / entities. I thought it was going to be "group" but that didn't fix it.
When skipping bombs, if there's no place for the bomb to go, the bomb stops atop the other bomb:
Perhaps this makes sense, but the floating bomb might explode, leaving a bomb in mid-air:
Or it might flow out of the way, with the same result:
I would expect not to be able to throw a bomb in this case, or for the bomb to explode, or for it to actually sit atop the bomb, move with it, etc.
Instead of a big label over the screen, it'd be more in theme to have a speech bubble appear, in the same way that we have dialog at the beginning, for level complete or player death.
Maybe something like:
Level complete:
<( GOOD JOB! )
Player death:
<( WHAT JUST HAPPENED, JIM? )
The run_game.py
launcher seems to have a bug where the 'src' path is considered absolute instead of relative to the launcher script itself.
On Windows:
py -3 run_game.py
Traceback (most recent call last):
File "run_game.py", line 26, in
os.chdir(srcdir)
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\src'
On something Posixey:
Traceback (most recent call last):
File "run_game.py", line 26, in
os.chdir(srcdir)
FileNotFoundError: [Errno 2] No such file or directory: '/src'
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.