Log In  

Cart #dubfusowu-0 | 2022-10-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1
Hi,

This is a work in progress.

Its a little app that allows the user to enter arrow locations on a digital archery target to help keep track of your score. My 11 year old son Dylan is just starting out in archery and we have been using a paper score card to keep track of his efforts to date.

However, we thought that this current method of recording scores was ripe for a little app that we could run on our phone in the field (others may be available in the app stores, not checked but we wanted to make our own!), not only to score, but to also keep track of the approx. location of all 36 arrows shot during a scoring round. This is something the "traditional" recording method doesn't offer, it just captures the score achieved, not the location of the arrows.

The plan is to expand this app so it provides some insight into your performance (e.g. average score, total number of "gold" hits, any bias in arrow location e.g. most land in bottom left quadrant etc...

Plus, it was a good excuse to get Dylan into a bit of coding. He's done a bit of Scratch at school but likes "real" coding with commands etc.. and not just visual blocks! I also love it since it take me back to my days mucking about coding on the ZX Speccy and Atari ST :-)

Anyway, all comments welcomed.

Will keep you posted as we develop this.

Many thanks,
Paul and Dylan :-)

P#119226 2022-10-17 19:57 ( Edited 2022-10-17 20:00)

One slight problem, @paul_knight.

If you shoot the direct center, you get 9 points, if you move the cursor away you get a different value - but then put the cursor right back in the center again and you get 7 points instead of 9 points.

P#119231 2022-10-17 20:51

Thanks DW817!

Yes, that will certainly need looking at! We are using PGET to read the colour of the target that the cursor hoovers over, which is then converted into the score assigned to each colour, but there must be a variable not re-setting somewhere. Hmm... will take a look.

We also need to take a look at the ordering of putting things out to the screen, especially once you've placed multiple green markers down. Obviously, if using PGET to assign scores, its important to read the target colour under the cursor before plonking a green dot over it!

Thanks very much for trying our little app out and commenting - much appreciated :-)

All the best,
Paul

P#119233 2022-10-17 21:24

You don't need to use pget(), you can check the cursor distance from the center to get the score value. So no more problem with the green dot messing with the score.

But you can still reorder the rendering a bit if you want, so the cursor would be drawn on top of the green dot, instead of under it.

Good luck with your project.

P#119246 2022-10-18 12:22

Thanks choo-t!

That's actually a really good idea, and will also introduce the exciting world of Pythagoras to my son. The pget() was a good starting place (easier to grasp colour checking than maths!) but it would be a much more flexible option and allow us to add some graphical detail to the target without having to worry about it impacting on the current colour based scoring system.

As is often the case, there's more than one way to skin a cat, and its interesting to explore them all and understand the relative benefits of each approach.

Thanks again! :-)

PS: that may also get around the issue that DW817 picked up on :-)

P#119247 2022-10-18 13:02 ( Edited 2022-10-18 13:03)

Cart #hneghw-0 | 2022-10-18 | Code ▽ | Embed ▽ | No License
Following comments from DW817 and choo-t, we have made some mods to our archery calculator. Thanks!

The code now uses Pythag theorem to calculate the distance of the cursor from the centre of the target, and in turn, calculate the score achieved from the arrow.

The move away from colour checking to determine the scoring, means we can be more creative with the look of the app without impacting on functionality. Its also just neater coding!

Now we have the fundamentals working, we can add more functionality, including a menu to allow the archer to select their age range (which impacts on the total score needed to achieve a successful round (6 x 6 arrows)), and a playback feature which will allow the user, upon completion of shooting all 36 arrows, to replay all their shots and visualise them on one target, to help identify any trends e.g. bias into say bottom left quadrant, which would suggest benefit in shooting more to the right and upwards direction.

We also want to include some statistical analysis on the shots to provide other useful information to the user.

Anyway, thanks again for taking the time to check out our work - the Pico-8 community really is a very valuable asset and contributes massively to the overall coding experience of this fun little console!

:-)

P#119275 2022-10-18 22:43 ( Edited 2022-10-18 22:43)

bbs help: when you have a new version of a game, you should edit your original post and upload the new cart. you can keep the old carts in the post or not (sometimes people use a «spoiler» tag), and note that they’re still accessible by their ID or through your profile page.

the bbs creates a cart ID for you (like dubfusowu here), but you can pick one (say archery-score), then the bbs will automatically add -0, -1 etc. for versioning. this lets people type load #archery-score in splore and get the latest version!

P#119276 2022-10-19 00:14

Thanks merwok - I must admit I wasn't too sure how to update the post so your help is much appreciated!

I'll be sure to delete both older versions when I am ready to upload the next version.

Thanks very much :-)

P#119296 2022-10-19 07:04

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-03-28 08:09:05 | 0.054s | Q:27