spelunking-studios / the-caverns Goto Github PK
View Code? Open in Web Editor NEWAn exploration ARPG game made in python with pygame
An exploration ARPG game made in python with pygame
When path finding toward a target, the bat should move toward the target while not stopping.
When path finding toward a target, the bat will usually move to the target no problem. However, if there is an obstruction to the straight line between the bat and the target, the bat will simply get stuck.
please fix this
We need a physics library. Perhaps pymunk?
This would mean that all of the overlays (ROOT/overlay/*.py
) are PEP8 compliant (as checked by flake8).
Well, the title kinda says it.
Either dynamically shrink the size of the rat or have a prop that indicates a distinct "reach" and that is dynamically updated.
When the rat hits the player, it should attack the player but fall back after each attack.
When the rat attacks, it deals the damage, and continues forward. It ends up getting stuck on top of the player and doesn't deal any more damage.
It would be nice to have re-sizable windows. This should be a low priority, but if I get bored or tired, I might work on this a bit.
The base Enemy
class (enemies/enemy.py) has an animation
property of type Animation
(animations.py). Every time the enemy takes damage, the base class's takeDamage
method is called:
The important part is line 93 which calls the fx
method of the Animation
class and passes it a new HurtFx
object. Looking at the Animation
class' fx
method, all it does is add the object passed to it to its imageEffects
property:
After looking through both the Animation
and HurtFx
class, there is no method of freeing the memory, and the list of effects can become filled with effects that are not active. The way the game handles effects that are "over" is by determining if the current time minus the start time is past the "duration" of the effect. If it is in fact "over", the image effect is not drawn. To prevent future calls to the now "over" effect, the method calls its kill
method, removing itself from any groups it belonged to, and preventing the game from finding it and calling it. Visually, this works fine, but one major problem exists.
The issue here is that even though the effect removes itself from any groups, it still persists in memory as the kill
method does not actually free the object. As the pygame documentation states:
The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups.
(Note: emphasis is made by me and not the docs)
This means that the imageEffects
list on the Animation
object will retain all of the effects that have ever occured.
To solve this, would require simply adding a method to the Animation
class that will delete its name reference to the HurtFx
object. Since no name references should be left, the object can be garbage collected by python.
The bat should move towards the player until it hits the player. Once it has hit the player, the bat should then move towards a random point away from the player (this is called the pivot point). Once it has reached the pivot point, the bat should turn around and once again move towards the player.
The bat successfully moves towards the player, attacks the player, and moves to the pivot point. The bug arises when the bat should be moving back toward the player. For some reason, the doesn't move back towards the player. Instead, it just disappears.
@LGgameLAB I was hoping you might be able to fix this at some point (probably after I finish adding the inventory system to avoid git conflicts) see as you made the player.
This would mean that when a UI component (lets say a Button
) has a particular state activated, the system cursor will be updated to reflect the state. For example, when a Button
component has the hover
or clicked
state, the system cursor should be a pointer and upon being unhovered
or unclicked
, the cursor will return to the system default. This is not a high priority, as it is purely ascetics, but it shouldn't be hard to implement. @LGgameLAB what are your thoughts?
Add a set of methods to the inventory system API for serialization of a item registry.
For serializing:
def serialize(self) -> String
And then to deserialize:
def deserialize(self, source: String) -> Inventory
This is planned to done (see this comment), but I wanted to make an issue to sort of remind me.
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.