Home AMX User Forum NetLinx Studio

Multiple TP's and one master

tom.lammitom.lammi Junior MemberPosts: 2
Hello all!

I dig this forum a lot and now I have a tricky project coming up so I thought I'd give it a shot here:

I'm looking at programming a game taking place in one large room. There are four wall-fixed TP's runnning a one-minute countdown with different questions to answer. There will be one multiple choice question at each of the panels - 4 correct out of 10 for example. The idea is that there is a group of kids at each panel, trying to answer as many times as they can to find the correct ones.

At this stage the plan is to have one NI4100 receiving input from all the panels, running the program and controlling lighting, music and so forth.

My question is: what happens when I get input from many panels at the same time or close to that? Will some of the button presses get ignored or do they get in a some kind of waiting line? Is it even possible to achieve a stable, reliable program to do this all? Or is it imperative to have multiple masters to reduce pressure?


Any thoughts - bearing in mind that I'm fairly new to programming :)

Thanks for your time!

Comments

  • DHawthorneDHawthorne Old Timer Posts: 4,584
    There is an event queue, but it is processed so fast that for button presses, you really don't need to worry much about it; they will seem simultaneous to an observer. Your program will only actually be handling one at a time, but we are talking milliseconds here before it moves on to the next. I wouldn't run a twitch game off a NetLinx, but questions and answers should be just fine.
  • jjamesjjames Just another dude Posts: 2,905
    Tom,

    Sounds like a fun project! Though I'd be scared they break the touch panels . . . hitting the buttons so hard just to get the next question - haha!

    I do remember doing some testing on this. Buttons being pressed & released at the "same" time. I'm not sure how you're handling it in code, but this *might* be worth looking at. http://amxforums.com/showthread.php?t=1473

    This is an older thread . . . I'm a little embarrassed to read it now but . . . I think the overall gist and point is still applicable. (BTW - I'm a big GET_LAST fan today . . . boy how we change.)
  • Spire_JeffSpire_Jeff Formerly Caffeinated Programmer Posts: 1,917
    As far as the touch panel use goes, if there was a fear of the kids banging on the touch panel too hard, you could always just put 4 (or however many answers there are) big buttons under the touch panel. I am sure you can find all kinds of buttons targeted at kids (maybe big plastic A, B, C, D) and just have them drive I/O contacts. The touch panel could be used to display the necessary info, and an adult could use the touch panel to start/control the game.

    Jeff
  • Jimweir192Jimweir192 Junior Member Posts: 502
    I've put in a load of similar exhibits in attractions over the years, as Jeff says, a TP is an expensive consumable and in any visitor attraction the interface is a consumable item!

    I'd suggest putting in hard buttons (plus a start button / Presence start) plus a small LCD screen driven from an MPEG player - there are several that will play seamlessly from clip to clip / loop until command etc and can be triggered from Serial IP or Contacts.

    You could use a Netlinx backend - but again there are other options out there designed purely for the task, have a look at Gilderfluke and Alcorn McBride, on many recent jobs I've used a combination of both with AMX!

    Enjoy
  • Jimweir192Jimweir192 Junior Member Posts: 502
    Spire_Jeff wrote: »
    an adult could use the touch panel to start/control the game.

    Jeff

    From experience it isn't just Kids that bang!!!
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    Jimweir192 wrote: »
    From experience it isn't just Kids that bang!!!

    'tis true. I found one MVP-8400 obviously hurled across a floor. This by a 72 year old man who still thinks it's the height of stupidity that a touch panel should need to have it's batteries recharged on occasion.
  • Spire_JeffSpire_Jeff Formerly Caffeinated Programmer Posts: 1,917
    I would argue that I am correct in saying that the kids will do the banging. I never restricted my definition of kid to mean a person that was of a certain age. I know of a couple of "kids" that are older than me in terms of raw age. Which leads me to a theory: The number of logical adult decisions made compared to the actual number of decisions made by an individual in a day is directly proportional to the ratio of money earned to total net worth of that individual.

    This theory still needs a little work, and it may only apply to a certain subset of the population, but I think it's close :)

    Jeff
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    Spire_Jeff wrote: »
    I would argue that I am correct in saying that the kids will do the banging. I never restricted my definition of kid to mean a person that was of a certain age. I know of a couple of "kids" that are older than me in terms of raw age. Which leads me to a theory: The number of logical adult decisions made compared to the actual number of decisions made by an individual in a day is directly proportional to the ratio of money earned to total net worth of that individual.

    This theory still needs a little work, and it may only apply to a certain subset of the population, but I think it's close :)

    Jeff

    Sound's like a good working theory. You may have to add a 'sense of entitlment' constant as well as a 'new money vs. old money' metric to get the equation to work.
  • tom.lammitom.lammi Junior Member Posts: 2
    You're right Jeremiah, it's going to be a blast with this project! :)

    I'm not too concerned about the panels getting beat to death, though, for the game room is going to be under strict supervision and the atmosphere of the situation is going to be more mysterious than any disco-frenzy-type that would get them that hyped up.

    The thing i'm a bit nervous about is wheter i can manage to make the code with the panels run smoothly and reliably with this setup or not.

    I'm glad to hear about the event queue and the fact fact that even if two button events were to occur at the exact same one thousandths of seconds time, the netlinx will still process them both, one at a time.

    Most of the programming techniques discussed in the threads linked are new to me at this point of my career, but i'll definately look into those, hopefully with the aid of a massive boost of information from the PII course next month :)
Sign In or Register to comment.