Welcome Guest.   Make a donation to an author on the site October 25, 2014, 03:49:39 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2012! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: VPR, visual people randomizer!  (Read 6602 times)
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« on: June 29, 2010, 10:34:26 PM »

Hi there! smiley


I spend a fair bit of time coaching kids in the classroom and I try to make my lessons as much fun as possible.
I normally use a VGA projector or a smartboard. At some point, I begin to ask questions and what I'd love to see to give the kids a bit more motivation.
(ok, that part has been copied and pasted from my clickometer request, but everything stands for this one!).

Often, I have to pick students from a list. Not always, but normally, it's a random process.

To make this simple process more interesting, I thought it would be interesting for the kids and me to have a little program which would pick a name from the list at random, but the process would be visually attractive: a bit like a roulette kind of effect, the names on the list would be highlighted at high speed (one by one) for a couple of seconds, then it slows down and stops at 1. That's the name that has been picked!

More features:

- Optional: if a name has been picked, it can't be picked again.
- A name which has been picked appears in a different colour.
- Ability to choose colours.
- Ability to enter names.
- Ability to set the amount of time that goes by before the randomizer stops / perhaps speed.
- Ability to change the color of a name on the list  by simply clicking on it.
- like gmail, ability to add different stars (icons), by clicking on it (maybe for version 2)

Here's a very simple image showing more or less what I'm thinking about:



Anyway, I think other teachers might find it useful also... lessons can be boring, let's make them a little more fun for everyone! (it could be useful to many other people too...)
Btw, I use windows 7, so compatibility with it would be much appreciated if someone takes this up. smiley

Finally, I don't know if I'm supposed to say this here, but I'm willing to donate at least 50$ for this. I know it's not much, but we've gotta start somewhere. smiley

Cheers.


* graphic.png (2.48 KB, 166x412 - viewed 265 times.)
Logged
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: June 29, 2010, 10:40:27 PM »

Are you looking for something that would run full-screen, or as a small sidebar, or as a normal window?
How many names should it support?
Logged

Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: June 29, 2010, 10:45:33 PM »

I don't really know the difference between "sidebar" or "normal window". If it helps, it would be like the clickometer that I requested.
Number of names: 80 at most.

Oh, another feature: ability to import a list from a text list.

Cheers.
Logged
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: June 30, 2010, 12:19:54 AM »

I'm gonna torture my less favourite designer/flash coder tomorrow to see what 'visually impressive' animation he can come up with.

Also UI teaser time:
Logged

Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: June 30, 2010, 03:25:45 AM »

Thanks scancode! smiley

Just one thing, is that the screen where you add the names and so on? because it is important that the main screen has like table cells so that they can be coloured and you can see the visual effect.
Anyway, it's looking smart!
Logged
vixay
Supporting Member
**
Posts: 137



ViXaY

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: June 30, 2010, 07:22:25 AM »

since you are already using excel... here's a simple module for it, i've tested it and it works well enough.

just put your active cell within your table and run the macro StartRandomizer()

[copy or print]
'Module by Vixay for DonationCoder
Option Explicit
'API for windows sleep
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub StartRandomizer()
'Moves a shape along the cells, and changes color of the final cell
' No exclusivity for now
'30 ms = fast
'100 ms = slow
'150 ms = stop
Dim shpActive As Shape
Dim rCell As Range
Dim lSpeed As Long
Dim lSpeedMax As Long
Dim lWinner As Long
Dim lCount As Long

lSpeed = 30
lSpeedMax = 150
Randomize
lWinner = SelectWinner()
Debug.Print "to be winner:" & lWinner
'get the shape we will use ( must exist or will cause an error )
If ActiveSheet.Shapes.Count > 1 Then
    Set shpActive = ActiveSheet.Shapes(1)
Else
    Set shpActive = ActiveSheet.Shapes.AddShape(msoShapeRoundedRectangle, 10, 10, 10, 10)
    shpActive.Fill.Transparency = 0.8
End If

For lSpeed = 30 To lSpeedMax Step 20
    lCount = 0
    For Each rCell In ListArea.Cells
        lCount = lCount + 1
        AlignShapeTo shpActive, rCell
        'Debug.Print rCell.Address
        DoEvents
        'Application.ScreenUpdating = True
        Sleep lSpeed
        'slow down speed randomly with a low probability
        ' i.e. continue through all cells most of the time at the current speed
        ' except no random slowdowns on the last stage
        If Rnd >= 0.95 And lSpeed < 130 Then
        'can tweak the number here to change how often we randomly switch speeds
            lSpeed = lSpeed + 20
            Debug.Print "random speed slowdown:" & lSpeed
        End If
        'if at winner cell, and at final slowdown stage
        If lSpeed >= lSpeedMax And lCount = lWinner Then
            Debug.Print "Found our winner"
            rCell.Interior.Color = vbRed
            Exit For 'stop here
        End If
        'Debug.Print lSpeed
    Next rCell
    Debug.Print "next slowdown:" & lSpeed
Next lSpeed

End Sub

Sub AlignShapeTo(ByRef shpObj As Shape, rCell As Range)
shpObj.Top = rCell.Top
shpObj.Left = rCell.Left
shpObj.Height = rCell.Height
shpObj.Width = rCell.Width
End Sub

Function ListArea() As Range
'Change this function to suit your needs or just make sure your
' active cell is within your table range
Set ListArea = ActiveCell.CurrentRegion
'Set ListArea = Selection
End Function

Function SelectWinner() As Long
'Randomly choose a cell amongst all the cells
Dim lCellCount As Long
lCellCount = ListArea.Count
Randomize
SelectWinner = Rnd * lCellCount + 1
Debug.Print SelectWinner & " / " & lCellCount
End Function

Sub ClearBackgrounds()
ActiveCell.CurrentRegion.Interior.ColorIndex = xlColorIndexNone
End Sub

Let me know what you think.
Should be easy for you to customize colors and all.
Logged

"Drunk on the Nectar of Life!" -me
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: June 30, 2010, 07:34:13 AM »

Er... wow, thanks a lot for your time.  Thmbsup

I don't have excel. I only use  Open office. Would it work for open office also?

But still, I'm not sure I'm looking for an excel macro, it seems to me that I want to be able to add different features which would be impossible to add to a macro:

run the program in a tiny window,
add features like the gmail thing (you click and you get a star),
getting the coloured cell to move around till it stops on one name on the list and the ability to make sure that that name is not repeated again, 
Perhaps add sound to the next version
etc.

In other words, I think I need a stand alone program.
Logged
vixay
Supporting Member
**
Posts: 137



ViXaY

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: July 01, 2010, 12:49:35 AM »

sorry, my bad. I assumed the screenshot was excel. No as far as i know it shouldn't  work in openoffice, but hmm that gives me an opportunity to try macros in open office smiley
As for stand alone... I don't have enough time for that, though I do have one flash application lying about which did something similar. I'll see if i can find it.
Logged

"Drunk on the Nectar of Life!" -me
steeladept
Supporting Member
**
Posts: 1,056



Fettucini alfredo is macaroni & cheese for adults

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #8 on: July 02, 2010, 10:26:29 AM »

May be opening a can of worms here, but if you don't use the screen at that time for anything else (like showing a question to the class, for example), maybe you could take the kid's picture and have it rotate through the pictures?  The program logic would be the same, just the data would show up differently (like flipping through a photo album at high speed looping through and stopping at a random picture).  Just a thought if you are making it "visual".
Logged
scancode
Honorary Member
**
Posts: 636



I will eat Cody someday.

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: July 02, 2010, 12:40:43 PM »

May be opening a can of worms here, but if you don't use the screen at that time for anything else (like showing a question to the class, for example), maybe you could take the kid's picture and have it rotate through the pictures?  The program logic would be the same, just the data would show up differently (like flipping through a photo album at high speed looping through and stopping at a random picture).  Just a thought if you are making it "visual".

When I first heard about this snack, I thought about something like this.

Logged

daddydave
Supporting Member
**
Posts: 818



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #10 on: July 02, 2010, 03:17:00 PM »

May be opening a can of worms here, but if you don't use the screen at that time for anything else (like showing a question to the class, for example), maybe you could take the kid's picture and have it rotate through the pictures?  The program logic would be the same, just the data would show up differently (like flipping through a photo album at high speed looping through and stopping at a random picture).  Just a thought if you are making it "visual".

When I first heard about this snack, I thought about something like this.

(Mockup in previous post)

I thought of something similar except I pictured a wall of photos and there is a red LED over the nose of each student that flashes when it's their turn, like in "Wallace and Grommit: The Curse of the Were-Rabbit" when they get an incoming call.
« Last Edit: July 02, 2010, 05:21:14 PM by daddydave » Logged
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #11 on: July 10, 2010, 06:06:32 PM »

Wow, thought someone would have picked this up by now  huh

I'll see what I can throw together for you.  Using names, not pictures.

EDIT: I did end up picking this up, so here's a link to the current release!
« Last Edit: September 27, 2010, 12:05:28 AM by SingingBoyo » Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #12 on: July 13, 2010, 06:37:11 PM »

Alright, here's a simple teaser.  Apologies for taking a few days - it was a debugging nightmare.  Ended up hitting dead-lock at one point...  Anyway, its not configurable, but given the number of settings there would be, I've decided to attempt working with XML config and save files, so bear with me as I work on it.  There are also quite a few quirks in the spin when you've got multiple one's going at once, and the lists are fixed, but I am working on it.

My screenies, from the final (and successful... sort of) test... are attached.  Someone tell me how to display attachments inline, and I'll edit this post.  First one is regular winXP theme, second one is my usual dark theme.  (mainly cause it looks cool to me tongue)

All suggestions welcome Wink  Have fun with it!

P.S.  The program is the jar file in the zip file...  can't attach jar files to posts here.

EDIT: Another link to the current release, since this post is so much more visible.   cheesy


* VPR Windows Classic.png (14.05 KB, 218x398 - viewed 216 times.)

* VPR Dark Windows Theme.png (7.89 KB, 218x391 - viewed 234 times.)
* VPR_0_1.zip (18.2 KB - downloaded 127 times.)
« Last Edit: September 27, 2010, 12:05:13 AM by SingingBoyo » Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #13 on: July 13, 2010, 07:46:27 PM »

Forgot to put this in the other post...

Mouser, please let me know if I can use this as a NANY app smiley  Would give me even more reasons to enjoy this little project!
Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: September 17, 2010, 06:42:35 PM »

Oh, this is terrible, I hadn't even seen this, my appologies!!
I thought I was getting an email whenever there was a new reply to this, but I must have done something wrong.  embarassed
I'm gonna check this out right now!
« Last Edit: September 17, 2010, 06:54:13 PM by Chessnia » Logged
mouser
First Author
Administrator
*****
Posts: 33,590



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: September 17, 2010, 06:49:38 PM »

SingingBoyo, sure you could use this as a NANY.
Logged
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: September 17, 2010, 08:57:40 PM »

I've just tested it.
That's so cool!  Thmbsup singingboyo!

I love the idea of being able to display more than one list at a time.Very nice.

Ok, I know this is pretty hard, but here are some features that I'd like to see.

- Sound effects
- Ability to open/save lists with all the data (number of selections, etc.)
- Ability to import or paste a text list.
- Ability to set size for display window (when the list is too large, you don't get to see who gets picked)
- Ability to definer colours: chosen name, background or text changes to #dafaff (whatever)
- Define colours per selection: 1 selecion = green, 2 red, 3 blue (whatever) etc.
- Ability to choose a name manually (clicking on it?)
- Add table column with extra data. The cells on this column behave like this: number goes up every time you click on it. (program's width doesn't need to change, the selections column and this one can be thinner)
- Randomizer effect mode: a) straight line, goes down like now  b) unpredictable (it hops from list name 1 to 7, then 9, then 3, then 24, then 2, then it stops)
- Randomizer safe mode: prevent names on the list from being picked more than once until al the other have been picked. (In fact, maybe the selections column is unnecessary if the text of a name on the list changes colours once is has been picked once, twice, etc.).

Anyway, that's all I can think of right now.

It looks very nice. Nice job singingBoyo!

My apologies again, since nobody replied to this post, I thought nobody was interested and apparently I did not have the notify option activated.



Scancode: that would be awesome indeed, great concept! smiley
Logged
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #17 on: September 20, 2010, 06:22:28 PM »

It's a good thing I read the DC newsletter when I did.  Apparently I wasn't being notified either, and it brought me back to the site...

Anyways, I'll see what I can do. Sound effects will certainly be a while, but I'll try to get that in eventually.

A couple of questions:  Are you looking for any specific actions available when you select a name?  (Edit the name, delete it, etc?)  Also, I need a bit of clarification on that extra column you want.

EDIT:  The original post referred to a NANY release.  Not actually going to do one though, so I had to edit.

« Last Edit: September 21, 2010, 11:27:10 PM by SingingBoyo » Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: September 21, 2010, 01:53:24 AM »

Regarding the specific actions, it would be nice if that could be added (maybe a future version) but I think it might be a lot of work for you right now? But yes, that would be most useful indeed.
Regarding the extra column: I am looking for specific actions here. It's basically going to be used like a scoring system. But editing the numbers manually is kind of painful, so I was thinking of just being able to click on each one of the cells on this column and the number would go up (or right button, number goes down). You know, making it easy to keep a score. And then if the whole thing can be exported / imported onto the program, that'd be cool. (I'm thinking of using it in a classrooms, and I go from one classroom to another, different schools. I have to load/save the data all the time).

Cheers! smiley
Logged
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #19 on: September 24, 2010, 11:55:03 PM »

   Alright, here's the first one I'd really call a release.  Saves/loads, has popup options to select/downselect names, add/delete, etc.  Colors are customizable, and the dialogs are calling the lists spinners now tongue

You can also load lists of names, because the save files are really just lists of names.  There are a couple of quirks:
   A: The first line of the file is considered the name of the list.
   B: With all names of people, if there is an "===" after it, it expects a number after it with the number of selections.  So, don't use === in names.

   Unfortunately, the whole program is very list-name oriented - saving, color setting, and closing all need a name to be selected.  That's the price of not using a panel with tabs I guess.

A few things for the next version that I'll have:
   A: Move list/spinner to a new frame (helps with the name thing)
   B: Save colors.
   C: Clean up the file loader - right now it won't read lines with spaces after the ===
   D: Double-click to 'select' a name. (Increment the selections count)
   E: Even selections (don't select names until everyone has the same number of selections)
   F: Random selections
Bit of a long list, but most of these will take max 15 minutes, so I expect to have it done within a couple of days (bit busy for tomorrow...)

Let me know if there's anything else that you think it needs.

* VPR_1_0.zip (34.71 KB - downloaded 99 times.)
Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: September 25, 2010, 12:46:51 AM »

Just had a quick look and it's looking very nice (color selector and all!).  Thmbsup
I think the list for the first release is fine. Perhaps the "3rd column" which I mentioned...
Logged
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #21 on: September 25, 2010, 01:25:36 AM »

A 3rd column should be fairly easy to do, I just forgot about it as I wrote the list.  For now, if you need to, you could clone the spinner by saving and loading it as a new one, then use the popup menu for scoring (in the cloned spinner).  I'll see if I can finish a third column along with double clicks and the better file loader tomorrow, then I'll work on the rest of the features.
Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
SingingBoyo
Participant
*
Posts: 38

Java is awesome... C++ needs more libraries

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #22 on: September 26, 2010, 11:59:51 PM »

Alright, version 2.0 is done!  (was going to say it was 1.1, but the save files are totally incompatible, so...)

Features:
     1. Scoring column enabled by checkbox
     2. Color saving
     3. Fixed the ugly save dialog (that was a bit of an oversight...  embarassed)
     4. Double clicks now increment or decrement selections or score
     5. Load simple lists of names as just that - a list of names with no name for the list (defaulting to N/A for list name)

(left click to increment, right click to decrement, double-click on name or # of selections for selections, on the score to inc/dec selections)

With the new save files comes a few quirks in writing them, and because of those quirks for adding special data (color, name of the list) comes the ability to load lists of names.  Just open the example.vrs file in the zip for an example - it's self-explanatory through comments. 

One thing that was unintentional but could be a useful quirk with java graphics - if you write something like
Formatted for HTML with the GeSHI Syntax Highlighter [copy or print]
  1. <html><i>Italic</i><b> Bold <u>With</u></b><u> Underline</u></b></html>
it will show up as Italic Bold With Underline[/b].  So, names can include html markup.  It's a bit strange to think about, but it could come in useful. 

The html doesn't need to be well-formed. i.e.
Formatted for HTML with the GeSHI Syntax Highlighter [copy or print]
  1. <html><i>NAME
will still italicize the value NAME.

Apologies for the code boxes - couldn't make it ignore the html tags in the post, and using special variables (&lt;) doesn't seem to work

* VPR_1_1.zip (41.07 KB - downloaded 121 times.)
Logged

So you came along and found Java(insert programming language here)? Randomly?  Well then, you're just like me! Java fiends rule.  (Though other languages do have their uses.)
Chessnia
Supporting Member
**
Posts: 40


View Profile WWW Give some DonationCredits to this forum member
« Reply #23 on: September 29, 2010, 03:11:59 AM »

Wow, it's looking pretty sleak!  smiley

Ok, here are some of the things which I think need improving:

- Score column: most of the time, when I click on it, the number doesn't go up. Sometimes I have to click several times for the number to go up. (Same thing with right click, number doesn't go down unless I click on it several times).

- If the list is longer the the height of the names column, you don't get to see who's been chosen unless you scroll down, which is a bit annoying.

- The ramdom routine is not so effective if you get a very long list (i.e. more than 25 people), as the highlight doesn't reach the end sometimes. (maybe add ability to choose speed of the rouitine + how long it lasts?)

Other than that, great work!  Thmbsup
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.056s | Server load: 0.1 ]