jumpy icon indicating copy to clipboard operation
jumpy copied to clipboard

Re-implement Blunderbus

Open zicklag opened this issue 2 years ago • 15 comments

zicklag avatar Jan 19 '23 14:01 zicklag

Hi @zicklag , I cloned the repo, and see the items that have been reimplemented, and I see the old_assets, so is the task to just reimplement exactly the same but in the new file formats?

Like I could compare an item that's already been reimplemented, like grenades, vs its old json implementation, and just use that as a reference for how to reimplement the other items? Is there anything else I should know?

(Asking as a first time contributor for this project)

michanwalsh avatar May 12 '23 23:05 michanwalsh

Hey @michanwalsh and welcome to the project!

It's actually a bit more complicated to re-implement the items, because we don't have the "easy mode" item creation with JSON anymore.

In the old Jumpy, we had a projectile system that you could describe things like the speed, spread, range, etc. to create different bullet patterns in JSON, and it was somewhat flexible without needing to code.

In the new version items have been mostly implemented in Rust, specifically for what features we've needed so far, so we don't have the options for spread or the number of bullets to fire yet.

We already have a musket implementation, which is similar to the blunderbass in a lot of ways, but it only shoots one bullet, and a blunderbass needs to shoot multiple bullets in a random shotgun pattern.

That means that if you wanted to make a blunderbass, the best option would probably be to add spread and num_bullets options to the musket element metadata, and then modify musket.rs to read the new configuration options and implement the functionality of optionally spawning multiple bullets with an optional spread. The default spread would be 0 and the default number of bullets would be 1, so that way the Musket item we already have would continue to work like normal.

Then you would have to copy the Musket item's assets to the blunderbass asset folder ( which is currently just a placeholder ). Then you can start modifying the musket sprite sheets, bullet metdata to change the size and speed of the bullets, and then setting the new num_bullets and spread options so that we get a shotgun effect.

Finally, you would add the path to the blunderbass.element.yaml file to the list of items in default.core.yaml.


That's a little more complicated than it sounds like you were thinking, but if you want to try it, feel free, and you can ask if you have any other questions!

zicklag avatar May 13 '23 00:05 zicklag

@zicklag Thanks! Ok, that definitely is more complicated than I thought, but your clear and detailed explanation of the approach makes me want to at least give it a shot! As I start to have questions, would you prefer I ask them in this thread, or in a PR?

michanwalsh avatar May 13 '23 00:05 michanwalsh

It's not super critical whether you ask here or in the PR. If it's more general you could do it here, and if it's more about the code you wrote you could do it in the PR.

But again, not super critical.

zicklag avatar May 13 '23 00:05 zicklag

Ok, sounds good

michanwalsh avatar May 13 '23 00:05 michanwalsh

I'm assigning this to you so that it's visible to others, but don't take it as a pressure to get it done or anything, you can bow out whenever if you want, and I'll just un-assign it.

zicklag avatar May 13 '23 00:05 zicklag

Ok! thx

michanwalsh avatar May 13 '23 00:05 michanwalsh

I see both a blunderbass.json and a blunderbuss.json, should I just be referencing blunderbass.json for this?

michanwalsh avatar May 13 '23 02:05 michanwalsh

Also I was going to push a PR of what I have so far but it gave me permission denied

michanwalsh avatar May 13 '23 03:05 michanwalsh

I see both a blunderbass.json and a blunderbuss.json, should I just be referencing blunderbass.json for this?

Good question! @erlend-sh or @legendiguess do you know what the difference between the blunderbuss and blunderbass were? I only ever remember testing out the blunderbass. It was basically a shotgun that looked like a bass.

Also I was going to push a PR of what I have so far but it gave me permission denied

You have to push the code to your fork, not to the main Jumpy repo.

Check out this guide for a complete walkthrough.

zicklag avatar May 13 '23 03:05 zicklag

Ah ok, thanks. Ok I forked and open a pr with a couple of questions, which I'll post here as well:

  • Where can I find the images/media to use for blunderbass and its effects?
  • Should all of the properties I'd need for the new yaml files be contained in the old json? Should I expect to find different variable names for certain properties? Should I just use my best judgement to figure out what corresponds to what?

https://github.com/fishfolk/jumpy/pull/775

michanwalsh avatar May 13 '23 04:05 michanwalsh

Also, do you know if there's a way for me to run/test it locally before making a PR, like with using localhost for node.js? Sorry, this is my first time using Rust!

michanwalsh avatar May 13 '23 04:05 michanwalsh

do you know what the difference between the blunderbuss and blunderbass were?

See #152

erlend-sh avatar May 13 '23 05:05 erlend-sh

Also, do you know if there's a way for me to run/test it locally before making a PR, like with using localhost for node.js?

Absolutely! You can install Rust, and then, in the project directory, you can run cargo run to start the game. It may take a while depending on how powerful your computer is.

zicklag avatar May 13 '23 13:05 zicklag

Good question! @erlend-sh or @legendiguess do you know what the difference between the blunderbuss and blunderbass were? I only ever remember testing out the blunderbass. It was basically a shotgun that looked like a bass.

If i'm not too late - while blunderbuss was just basically a shotgun, blunderbass have more spread and his bullets ricochet off surfaces, and they have green color, like it's some bass slime (that was my last idea about their differences)

legendiguess avatar Jun 17 '23 21:06 legendiguess