Roulette challenge - Forum

Forum Navigation
You need to log in to create posts and topics.

Roulette challenge

I would like to propose a challenge that I think could be interesting.

It's to make a simple app that works as a roulette:
https://visualneo.com/tutorials/roulette

You can download here the necessary graphic files. Both in .svg and .afpub format (the latter for Affinity Publisher, which is only necessary to customize the design). The svg object to rotate has the name (id) "wheel".

The appp has only 6 lines of code, but it can be made with only 2. We must try to make it responsive. Do you want to participate?

I think it's a good exercise. Questions and different solutions are welcome.

Uploaded files:
  • You need to login to have access to uploads.
Vadim, farhad2008 and 3 other users have reacted to this post.
Vadimfarhad2008CDY@44DarbdenralGary Chike

just as a curiosity ;-) the non standard way

Uploaded files:
  • You need to login to have access to uploads.
Gary Chike has reacted to this post.
Gary Chike

@emmanuel-fernandez very good! That's expert mode :)
Anyone would like to try with just VisualNEO Web commands and not JavaScript?

emo has reacted to this post.
emo

This is an interesting challenge..  The timing is such a coincidence! The night before you mentioned this I was looking into roulette wheel JavaScript libraries and such on the web and experimented with quite a few.

I was specifically looking at a way to display the wheel segments from a configurable command..  I wanted to label the segments and values from command.  Making hundreds or even thousands of records if wanted in memory!  But as the wheel turns, only display a configurable amount of segments and label values that rotated. Specifically, as the wheel turned the closest records would display on the wheel.  Finally displaying the winner..  I never found anything that would work for me like this yet but was amazed at the amount of open source stuff out there..

Anyways, I haven't played with the animation abilities of VisualNeoWeb yet.  So, I feel overwhelmed by this one without using JavaScript libraries.  But I'm excited to see how easy this is done!

thanks!!

 

luishp and emo have reacted to this post.
luishpemo

With VisualNeoWeb command

much easier ;-)

Uploaded files:
  • You need to login to have access to uploads.
Vadim, CN_Iceman and Gary Chike have reacted to this post.
VadimCN_IcemanGary Chike

@emmanuel-fernandez wow! just one line of code!
I didn't know about RandomInt trick :O

emo and Gary Chike have reacted to this post.
emoGary Chike

@emmanuel_fernandez  Amazing!