|
Post by alwichita2 on Jan 23, 2023 11:48:35 GMT -5
Liberty Basic is more powerful than most people think ! Here's a YouTube link for some Dart Board Software that I've been working on for quite some time ! Check it out ! youtu.be/uXccOxXJBPoThanks ! Al
|
|
|
Post by Carl Gundel on Jan 24, 2023 21:00:40 GMT -5
Hey Al! Thanks! Can you tell us a little bit more about your darts application?
-Carl
|
|
|
Post by alwichita2 on Jan 25, 2023 14:48:46 GMT -5
My LB Testimonial – Avatar Dartboard
I’m a retired old fart with an electrical/software background, that makes projects and writes software for a hobby.
I gutted an old dartboard, installed a new computer, adapted a new interface to an existing interface and wrote all new software and games using Liberty Basic. ( I Love LB !!!)
(My creation exists, only in my garage, and I have no intention to build any dartboards for commercial use or sale. I’m too old for obligations, commitments, schedules, or deadlines…)
Along with the standard games, Cricket and ’01, I have made several games (not available anywhere else in the world)- Combat, Baseball, Football, Showdown, and Horserace. All of them are super fun and challenging !!! I’ll make videos of the other games soon.
One of the best features of the dart board is the Avatar (Player Sim) !!!
During Covid I could no longer go to the VFW to play darts with my friends, so I created some “Imaginary Friends”, Larry, Moe, and Curly. I then began making Avatars of my real friends and family to play against & with.
An avatar is exactly as it implies – a dart replica of a human.
If a human shoots 1 in 5 Bulls, his Avatar shoots 1 in 5 bulls. If he shoots 1 in 7 Triple 20s, his Avatar shoots 1 in 7 triple 20s, and so on.
A person’s strategy and indecisions can also replicated. For example, some people like to “Close”, or have a small “Point lead”, or a big “Point lead”. One never knows exactly what the avatar is going to do when more than 1 possibility exists !
The Avatars have their own dart board so it shows what they are aiming for and what they hit. You get to watch your opponent’s darts for more realism; with commercial boards you just watch the score change when playing Sims.
There are many fun advantages to using avatars… 1) Training/Practice I use avatars to teach my girlfriend to play without her having any anxieties, shyness, or embarrassment when playing with skilled humans. A LOT of people don’t even try, for those reasons. We team up together and play against two avatars so we can play together. Also, she’s a level 5 and I’m a level 10 player, so I pair up with a level 5 avatar and she pairs up with a level 10, so we can also play against each other without handicaps.
2) Fill in for Human An avatar can fill in for ‘his’ human. I play in a Thursday Fun league and we use avatars to fill in when someone cannot make it.
Note: You can have any number of avatars – 4 avatars, 1 human w/ 3 avatars, 2 humans w/ 2 avatars, 3 humans w/ 1 avatar, no humans. 1 human vs. 1 avatar, etc.
You can make an Avatar of anyone – I made an avatar of my late Dad and sometimes I play against him, sometime with him, it’s not real, but it not nothing, and still has meaning !!! Sometimes I set up an Avatar vs. Avatar game and just watch the fun !
3) Designed for Older People, (And sometimes people drink when playing darts.)
The dartboard displays a pic of who is ‘up’ and who is ‘next’, so you never need to ask, who’s turn is it? If a player does not have an avatar his name will be displayed.
I can go on and on…. But Liberty Basic is a perfect language for this application !!! Thanks Carl and Team !!!
I’ll be adding more videos and will be happy to answer any questions…
|
|
|
Post by Rod on Jan 26, 2023 3:17:55 GMT -5
A quick run down on the dartboard to computer interface? Is it automatic, are you manually keying the dart position or is it sensed automatically?
|
|
|
Post by tenochtitlanuk on Jan 26, 2023 4:25:27 GMT -5
Great project- and some well-thought out extensions with the avatars.
Exactly the kind of project I too have found LB excels at- electro-mechanical tinkering, and easy production of graphic output!
|
|
|
Post by alwichita2 on Jan 28, 2023 17:26:46 GMT -5
Hi Rod / LB Colleagues,
The physical dartboard has a membrane switch panel (like a microwave oven) behind it. There are 84 switches matrixed down to an 10x9 switch matrix = 19 wires.
I built a homemade interface circuit (power supply, diodes, voltage comparators, and timers) to read the switches and output binary code for 10 wires (1-2-4-8) and the 9 wires (1-2-4-8) creating 2 binary outputs (4 bits ea). I interfaced those to off the shelf binary input cards (Velleman PVM110N) which have a USB interface. To read the cards there is a DLL provided. I then wrote software to decode the binary inputs that represent each switch (Number and whether its a Single Triple or Double, + Bulls) on the dartboard.
After that its just a matter of creating games using sprites.
The Avatars software figures out what's best to shoot at and then randomly hits the target number depending on skill level selected. There are 15 skill levels from beginner to Pro level.
Games- Horserace - Easy for beginners, 1st to score 301 or more points.
Combat - Shoot opponents military but your numbers are next to his so its painful to miss next door and hit yourself (lots of cussing in this game) !
Football - It's 1 yard per point, so if you are 80 yards to the end zone you need 80+ points to score a touchdown. If you miss and say hit a 1, 5, 4 you only moved the ball 10 yards leaving your opponent only 30 yards(points) to score. Soooo, When you do bad, it directly helps the other team to score more easily. (lots of cussing in this game too) !
Showdown - Hit your number until you have fully loaded your gun, then shoot your opponent until he has zero. This goes back and forth until someone leaves his opponent with 0.
Baseball - Shoot at 1 in the 1st inning, 2 in the 2nd inning, and so on. If you hit all three darts in your number you get to keep shooting until you miss. After 9 innings the player with the most runs wins. Goes to extra innings as necessary.
There is also the Standard games of- Cricket 301/501/701
|
|
|
Post by johnnyrockets on Nov 5, 2023 16:59:24 GMT -5
Such a neat idea!
Wow! You're quite a masterful programmer!
I think once I retire (not too long now!), I'd like to write some LB/Machine interfaces!
My first one will be a "rain detecter" - don't ask me why! It just seems cool!
J
|
|
Kuron
New Member
Posts: 20
|
Post by Kuron on Nov 18, 2023 0:15:50 GMT -5
This is amazing and I am really impressed by the combat, baseball and football options. I am extending a challenge to you. Add a golf option. Hands down the coolest and best thing I have ever seen created in LB. You, my friend are a master. Thank you for your service to our country. God Bless You.
|
|
|
Post by Marco Kurvers on Dec 4, 2023 4:16:29 GMT -5
Hello, I have an another power for Liberty BASIC. The word$() function is very powerful, because with this function I have made a tuple function where you can return more than one value in a function. My function SetTuple(tuple$) converts a string to a tuple array. Very useful for working with tables and records for a random access file. I make Liberty BASIC powerful with al these functions. I have made a GetF$(s$) function where you can use a format in the string. For example "{20 + 20}" returns the value 40 and a \n does a newline in the string. In the next message, I will place my functions and also in my account forum: makurvers.freeforums.net/
|
|
|
Post by Marco Kurvers on Dec 4, 2023 8:52:28 GMT -5
Here is my function. Maybe I will make it bigger so the function can work with more arrays.
To get a tuple, say: length = SetTuple("1, 2, 3, A, B")
SetTuple can work with GetF$ if you will A not as a string, but as a variable: length = SetTuple("1, 2, 3, GetF$("{A}, {B}"))
Later, I come with the code GetF$() function if the function works complete.
function SetTuple(tuple$)
n$ = ""
i = 1
do
n$ = word$(tuple$, i, ",")
i = i + 1
loop until n$ = ""
redim tuple$(i - 1)
n$ = ""
i = 1
n$ = word$(tuple$, i, ",")
do while n$ <> ""
if n$ <> "" then
tuple$(i) = n$
i = i + 1
end if
n$ = word$(tuple$, i, ",")
loop
SetTuple = i - 1
end function
|
|
|
Post by tsh73 on Dec 4, 2023 10:50:26 GMT -5
Marco, this thread is probably not the right place to post much code. If you think your function is useful, could you please start another thread and post some code showing what cool things one could do with it (demo), there?
|
|