Comments (8)
If we're good choosing them randomly for now, it seems like making the image an array is a good idea.
from punchy.
I feel like we should introduce some concept of variants for spritesheets when its the same enemy "type" rather than giving them all unique definitions. Although maybe in the future the different variants will have different gameplay implications, but we can get to that if it comes up.
from punchy.
Just a note for anybody finding this issue: now all of the player/enemy types are implemented with YAML, a simple text format, for example the bandit. So this issue is now very approachable for non-programmers! :)
from punchy.
Does the current yaml system support nested folders inside the fighters? Since we have multiple variants of the same "type" I was thinking we could have something like:
fighters
- jerk
- jerk1
- jerk2
- jerk3
- bandit
- bandit1
- bandit2
- bandit3
Another alternative is to have multiple sprite sheets for each fighter in the yaml and choose one randomly.
from punchy.
Could I just turn the image proprety into an array and just randomly select one image path?
from punchy.
I'm having a bit of a problem with choosing a random texture.
From my understanding the files are loaded and stored in metadata structs, then these structs are filled to marker entities that will spawn the actual entity (Add missing components).
The problem that I'm having is that even though I load different textures they return the same handle, I'm assuming this is because it thinks that has already loaded that texture.
Not sure if that is because of the label or other causes.
for image in &meta.spritesheet.image {
let (texture_path, texture_handle) =
get_relative_asset(load_context, load_context.path(), image);
println!("{:?}", texture_path);
let atlas_handle = load_context.set_labeled_asset(
"atlas",
LoadedAsset::new(TextureAtlas::from_grid(
texture_handle,
meta.spritesheet.tile_size.as_vec2(),
meta.spritesheet.columns,
meta.spritesheet.rows,
))
.with_dependency(texture_path),
);
println!("{:?}", atlas_handle);
meta.spritesheet.atlas_handle.push(atlas_handle);
}
That prints out the following:
AssetPath { path: "fighters/fishy\\PlayerFishy(96x80).png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(6978943932354199104), LabelId(8302211218699850881))))
AssetPath { path: "fighters/sharky\\PlayerSharky(96x80).png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(14630453536192032707), LabelId(8302211218699850881))))
AssetPath { path: "fighters/slinger\\Slinger_Skin1.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(2437720787748651759), LabelId(8302211218699850881))))
AssetPath { path: "fighters/slinger\\Slinger_Skin2.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(2437720787748651759), LabelId(8302211218699850881))))
AssetPath { path: "fighters/slinger\\Slinger_Skin3.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(2437720787748651759), LabelId(8302211218699850881))))
AssetPath { path: "fighters/bandit\\Bandit_Skin1.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(15664738912578234533), LabelId(8302211218699850881))))
AssetPath { path: "fighters/bandit\\Bandit_Skin2.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(15664738912578234533), LabelId(8302211218699850881))))
AssetPath { path: "fighters/bandit\\Bandit_Skin3.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(15664738912578234533), LabelId(8302211218699850881))))
AssetPath { path: "fighters/brute\\Brute_Skin1.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(9822384095410878402), LabelId(8302211218699850881))))
AssetPath { path: "fighters/brute\\Brute_Skin2.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(9822384095410878402), LabelId(8302211218699850881))))
AssetPath { path: "fighters/brute\\Brute_Skin3.png", label: None }
StrongHandle<TextureAtlas>(AssetPathId(AssetPathId(SourcePathId(9822384095410878402), LabelId(8302211218699850881))))
Hope I'm not being a total noob right now
from punchy.
That is a little strange. Maybe try adding loop index to the label and see if that resolves the issue. So the label would end up being atlas0
, atlas1
, and so on.
from punchy.
That is a little strange. Maybe try adding loop index to the label and see if that resolves the issue. So the label would end up being
atlas0
,atlas1
, and so on.
Still no luck :/
from punchy.
Related Issues (20)
- Sometimes Player Left-Right Movement Can Be Frozen HOT 2
- New Feature: Redirect to main menu or show next steps after beating all AI on screen HOT 1
- New Feature: Ability to switch keyboard action buttons
- Implement new positional system
- Create Scripted In-Game Item
- Hit flash on damage application HOT 2
- Add ranged attack as Slinger fighter default attack.
- Implement boss bomb throwing HOT 3
- Audio system panic on using Color Picker widget in egui_inspector debugtools
- Add Big Bass bomb throwing proper AI
- Make player able to grab Big Bass bomb while fusing
- Add unique sound effects for chain attacks
- Poor performance in Firefox HOT 1
- Update to Bevy 0.9
- Document current Items for wiki HOT 1
- Adjust Slinger ranged attack to remove Knockback HOT 1
- Add a throw strength to fighters
- Health item broken HOT 1
- Boss bomb throw always has another static bomb sprite behind the animated explosion HOT 1
- Entity despawn warning, per run dependent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from punchy.