stephcraft / project-16x16 Goto Github PK
View Code? Open in Web Editor NEW2D Platformer game made with processing
License: GNU General Public License v3.0
2D Platformer game made with processing
License: GNU General Public License v3.0
Steps to reproduce
This issue is for everyone to see the progress on the combat system I'm implementing, so I can get feedback on how it feels in the game, and how I can improve it. Will upload the changes to my fork, so everyone can get them without merging them to the main repository.
Drag the magic source (pink) and it's animated tile will not move with it.
Issue:
The tutorial here link does not work anymore and the current step is written below. https://processing.org/tutorials/eclipse/
Proposed Change:
The two tutorials are just basic tutorials for installing and using each IDE. The direct links are below:
https://www.vogella.com/tutorials/Eclipse/article.html
https://www.jetbrains.com/help/idea/run-for-the-first-time.html
I checked the Processing page and did not find any tutorials, unless I missed one.
An options interface is needed to modify and apply options in game.
Currently the game modes in the GameplayScene are stored as enums, and all the logic associated is being checked and processed inside the scene object using switch case statements.
As mentioned in #68, this enum can be refactored as classes, and i thought a good design would be one following the state/strategy patterns:
Some benefits i see with this implementation are:
Leave any comment or suggestion, i'll be working on the implementation during the following days, along with any relevant reports.
The README contains only a gif from the tileset source.
I think it would be helpful (and more enticing for potential contributors) to include some screenshots (such as play mode, create, menus) of the present game in the README.
Things to be made to improve the current Collision system:
Collider
classTile
classSprite
classSprite
and Tile
classes to have a Collider array ArrayList<Collider(x, y, w, h)>
for collisionsTiles
GameObject
Sprite
Tile
Currently, the tilset is loaded as separate sprites, located in class sidescroller.GameGraphics
. The tileset should be loaded as 16x16 tiles instead. This issue could affect #30
We should add unit tests for existing codebase in order to have a coverage of 80% at least.
Each test class should test the related src class and be located under same package.
E.g. Tile.java src class is under project_16x16.components package (src/project_16x16/components directory). TileTest.java test class must be under project_16x16.components package (test/project_16x16/components directory).
Test class name must have the suffix Test added to the source class under test.
E.g. Tile.java src class to be tested must have a TileTest.java test class.
Util.java
Also, when a menu is displayed, we are able to move the camera (shaking, zooming...) and change framerate by pressing "special keys" ( X, R, V, C, F, G).
Video here.
Selecting objects (to move them) in modify mode is very inconsistent/bugged. Some objects won't select at all; others can be selected once, and then won't select again depending upon where you placed released them.
It seems moving objects to around x<350 will prevent them from being selected again, otherwise they're ok?!
I've looked into it a little, but see no obvious reason why it's happening.
I try to join your dicord sever with this link : https://discord.gg/zDJSCqd but there is an invalid invite link error. please refresh the link
If you spam wasd, space shift and mouse 1 while shooting a projectile you can crash, looks like an animation bug.
java.lang.IndexOutOfBoundsException: Index 3 out of bounds for length 3 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) at java.base/java.util.Objects.checkIndex(Objects.java:372) at java.base/java.util.ArrayList.get(ArrayList.java:458) at components.AnimationComponent.animate(AnimationComponent.java:69) at entities.Player.update(Player.java:353) at scene.SceneMapEditor.draw(SceneMapEditor.java:219) at sidescroller.SideScroller.draw(SideScroller.java:215) at processing.core.PApplet.handleDraw(PApplet.java:2483) at processing.javafx.PSurfaceFX$1.handle(PSurfaceFX.java:90) at processing.javafx.PSurfaceFX$1.handle(PSurfaceFX.java:1) at com.sun.scenario.animation.shared.TimelineClipCore.visitKeyFrame(TimelineClipCore.java:239) at com.sun.scenario.animation.shared.TimelineClipCore.playTo(TimelineClipCore.java:197) at javafx.animation.Timeline.doPlayTo(Timeline.java:175) at javafx.animation.AnimationAccessorImpl.playTo(AnimationAccessorImpl.java:39) at com.sun.scenario.animation.shared.InfiniteClipEnvelope.timePulse(InfiniteClipEnvelope.java:126) at javafx.animation.Animation.doTimePulse(Animation.java:1101) at javafx.animation.Animation$1.lambda$timePulse$0(Animation.java:186) at java.base/java.security.AccessController.doPrivileged(AccessController.java:389) at javafx.animation.Animation$1.timePulse(Animation.java:185) at com.sun.scenario.animation.AbstractMasterTimer.timePulseImpl(AbstractMasterTimer.java:344) at com.sun.scenario.animation.AbstractMasterTimer$MainLoop.run(AbstractMasterTimer.java:267) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:558) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:542) at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:535) at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:341) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174) at java.base/java.lang.Thread.run(Thread.java:835)
Needs more documentation (Javadocs or wiki) from the people who wrote the existing classes and functionality to explain to new contributors what each class does and how they fit into the bigger picture (architecture).
Only global keys (such as fullscreen toggle) should be handled in SideScroller.class -- all other hotkeys (that are scene related) should be handled by the relevant scene by overriding keyPressed
or keyReleased
.
Here are bugs concerning zooming:
Further explanation:
How it currently works is as you zoom in or out, it changes the camera’s x and y position. This should not happen, as it should only zoom toward the center of the screen. I’m not sure if that’s what the setOffsetScale statements in the Camera class are trying to handle. It doesn’t seem so, because after commenting it out, the canera x and y doesn’t change on zoom, but the camera still zooms. That’s okay, but then the only problem is that it zooms towards the world origin. It should zoom toward the center of the screen instead.
I also noticed the camera position doesn’t scale along with the zoom. If I move in an x or y direction, zoom in, and move again, the camera x and y should increase/decrease faster/slower based on the zoom level. This may be an easy fix, and I’ll keep looking into it, but it would definitly be helpful to have someone explain the zoom offset stuff! Thanks to anyone who knows!
Scroungy
Good evening in the context of a university thesis I ran a few metrics in your work .I send you my results in order to contribute to the improvement of your project.
Some of the notable metric results :
Help needed in developing the Camera class. I simply do not have the time to work on it. If anyone has questions about my current code feel free to ask me. Other than that development for this will be in the CameraDev branch.
It would be easier to use all those items if they had names
The projectile should have two colliders, one is a small box in front of the projectile to detect collision with entities & gameObjects and the other one is a line also in front that detects if it touches a wall. The magic projectile also needs to have an animation to fade away when it collides with an entity, gameObject or a Collider.
The level designer requests to be able to use Tiled while the level editor is in construction for Project 16x16. Tiled is a third-party tileset map editor. It exports to the .json
format.
A button with the functionnality of converting a Tiled .json
file to a game map file format is needed.
The function should be placed in the Utility
class.
Here are resources to help you achieve this issue:
Alot of tiles are missing, for exemple:
After the walking animation cycles though frames 0-7 a first time, the animation gets stuck on frame 0 when walking right and stuck between frames 0 and 1 when walking left.
The MirrorBoxObject only reflects projectiles that travel from left to right, i.e. projectile.direction = RIGHT. I'll get working on this.
As you can see in this image, you can actually get stuck into blocks. This is easily recreated by shift-jumping
into a blocks corner.
It is really consistent and it always work if you hit the corner correctly.
Most of the time you're able to get out of the block by walking away from it but you also might get stuck in it (I wasn't able to replicate it).
The Utility
class should have some javadoc comments explaining its purpose.
There are missing javadoc comments on the following functions:
PImage scale(...)
PImage rotate(...)
boolean fileExists(...)
A tip to write good comments is to answer the question Why? instead of What?
Development of the Options.
Option.load()
function. It must parse the JSON file and set the variablesOption.save()
function. It saves the data from the variables in the JSON fileA non-exhaustive list of feature TODOs and/or suggestions.
The FALL animation sequence is triggered during a jump, but is not triggered when the player falls without jumping (falling from a platform for example).
This issue is mentioned as a bullet point in #68 and i'm opening it here for better isolation.
As the collision solution implemented in the project currently is not as much escalable, i'm taking a shot on it. Talking with @Stephcraft over Discord, he gave me advice on the desired implementation, using a PhysicsEngine singleton to register and handle every collision check for every non-static Collider object. The reached design is as follows:
Things left out from this refactor, left pending of implementation:
Please, do tell me if i'm missing something or any suggestion, i'll be working on it shortly.
This is for artist. We need to draw a death animation for the player.
Currently, there is no way to load the game other than setting the map within the code. A loading menu to load levels within the game would be quite useful for testing. I can handle this at the moment. In addition, a tab system to work for any window should be implemented, and since this will be first built in with the load and save menu, I can handle this too.
public class Multiplayer {
/**
* A client connects to a server and sends data back and forth.
*/
private Client c;
/**
* A server sends and receives data to and from its associated clients (other
* programs connected to it)
*/
private Server s;
Names like c (as per client) and s (as per server) must be avoided since code readability is reduced. I'd go for a full code base review.
The audio in the project is handled by the Minim library. This library is yelling errors at runtime. The sources of the errors are unknown and a solution must be established to fix the errors.
Here are the errors:
=== JavaSound Minim Error ====
==== Don't know the ID3 code TSS
==== JavaSound Minim Error ====
==== Error parsing ID3v2: String index out of range: -131
==== JavaSound Minim Error ====
==== Don't know the ID3 code TSS
==== JavaSound Minim Error ====
==== Error parsing ID3v2: String index out of range: -131
==== JavaSound Minim Error ====
==== Don't know the ID3 code TSS
==== JavaSound Minim Error ====
==== Error parsing ID3v2: String index out of range: -131
==== JavaSound Minim Error ====
==== Don't know the ID3 code TSS
==== JavaSound Minim Error ====
==== Error parsing ID3v2: String index out of range: -131
Sidescroller.java
Currently the scroll bar on the inventory can only be moved with the mouse wheel, I will add left click capabilities to the scroll bar.
The development and master branch has different commits. A merge without conflicts is needed.
I don't think a master\development branch distinction is needed until there's a playable build on the master branch. Until then, I think everything should be done on the master branch (and temporary feature branches)
micycle
Should be 3, not 0.3.
Add a pre-commit git hook to auto-format (and standardise) source code before a commit/PR (ie. someone's source code will be formatted to the format of the project whenever they commit).
Something like this.
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.