nearoo / wario-land-3 Goto Github PK
View Code? Open in Web Editor NEWA remake of the GBC-Game "Wario Land 3" using Pygame for Python
License: MIT License
A remake of the GBC-Game "Wario Land 3" using Pygame for Python
License: MIT License
Using "" in paths doesn't work on linux. Instead use os module to allow the game to work on both windows and linux.
e.g.
import os
os.path.join("images","image.png")
Need to add controls to Readme
Some images like ANI_Wario_turn_r.png
are still missing.
New levels should be loaded! Only a tiny step away: Delete and re-initialize World.
Currently, EngineWrapper is inside the GameActor module, and gets initialized anew with every game actor. The problem is that, if the wrapper gains a new member, every GameActor has to be changed. That shouldn't have to be the case.
It is possible to achieve, there's a method, it just needs some time and energy to figure out.
The sprites are showing up purple and the console is showing "libpng warning: iCCP: known incorrect sRGB profile"
By the way I'm on Mac
Python 3 is the future!
Hey I was wondering if you could help me out with something. I'm trying to get sound to play without the game crashing. Can you help with that? I also have questions about making a simple scoreboard for the game as well. Hopefully I hear from you soon :D
It worked to pass it to the update()
-method until now, but when it comes to sound, it must be aviable to the __init__()
-method. Also, to be honest, it feels kinda funny to pass it every time an update()
-method is called.
The animation-class is still very limited. It would be great to be able to control the order of sprites much more.
One improvement would be to separate the information about the order of the sprites from the actual surfaces. One argument could be the list of all the surfaces, and another one the order in which these surfaces should appear - which could be much longer than the amount of surfaces given. To combine it with the length of the single sprites, a list could look like this:
[(frame_nr_1, frame_1_length), (frame_nr_2, frame_2_length) ...]
An animation that plays its surfaces in order 1, 2, 1, 3, 1, 2, 1, 3 with each frame being showed 100 frames would then look like this:
Animation(self, [surface_1, surface_2, surface_3], [(0, 100), (1, 100), (0, 100), (2, 100)])
It well be needed sooner or later, when Tiles become more complex...
I don't know how to do this, but it's necessary. Right now, only the number of the var gets shown.
It would make it...
Things to do:
Seems like the counter of the JUMP
-state doesn't reset and Wario immediately goes over to the FALL
-state...
It doesn't really make sense to call game_actor.world
to affect something engine-wide and game_actor.rect
to affect something of the individual GameActor. Much better would be to get an argument engine
and one game_actor
. Maybe for that purpose, a static variable called "engine" should be added to GameActors - best would be a dummy-class that contains the engine-things.
So far, any GameActor is able to access graphics, sound, user-input and world data - but a really important part is to ensure communication between gameactors. This is why the Engine-class needs a new class-instance, the GameActorController (or similar), who handles tasks like these:
Following these functions, the GameActor BC needs a new method called receive_message(
, and all components one that is called receive_stranger_message(
or similar.
There's no programming done regarding playing sound. In it's current state, the game needs no sound, but if sound should be needed later down the road, it's better if a dummy-sound-engine is already implemented now.
A draft of how it could work:
class Sound:
def load_sound(self, filename): # Load sound in advance
def play_sound(self, filename): # Play sound if already loaded, otherwise load it before
def stop_sound(self, filename):
def load_music(self, filename): # Same applies here
def play_music(self, filename):
def stop_music(self, filename):
def queue_music(self, filename):
It then gets passed the same way as Input, World or Graphics. Maybe sounds should even be bound to game-actors, so they can stop sounds they are currently playing... but that's something that can be decided in the future, and be added as a non-standard argument. (e.g. id = id(self))
It's still just strings, which needs unnececary memory and is also unsafe for bug-prevention.
The original also has this delay in order to be able to fist and jump at the same time.
The one I got from the internet is much better...
Maybe it would be good to store the Tile
-instances in the World
class sorted by material_group
in a dictionary instead of in a raw list, since
Maybe the Tile
-instances should even contain the information about their position (or even a complete rect) and only share the surface-data?
If the right and the left key to move Wario get presst alternately, sometimes, Wario is able to jump much higher than he should. If the right frequency is found, he's even able to jump infinitely high.
It's still looking for collision and movement! That should be changed.
Regardless of what's defined as the first frame in the order list, the first sprite gets shown first.
So things like tracking Wario, camerashake or fadeout can be achieved!
Wario currently jumps to high and to slow compared to the orignal. The bug #6 probably has to be fixed first dough.
I'm not sure how to implement this jet. Probably add two new Wario-states "goto-sleep" and "wake-up" on which the animation of going to sleep and waking up will be played. When these states go over to "sleep" or "stand-stay" could be controlled by the Look-Component so these states take exactly as long as the animation.
It would probably be a good idea to store the paths to source-files centralized in a seperate module, so it's easy to move the images around while the project grows...
Example:
# Images:
IMG_ANI_walk_r = "images\\ANI_walk_r.png"
# Sound:
SND_shoot_fireball = "sound\\tmp\\shoot_sound.wav"
For that, #3 probably has to be completed first, since there are now multiple Tile-types.
If you press down LEFT and then down RIGHT and then release RIGHT, Wario will keep walking to the right.
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.