The NXT Duel is a game that tests your reflexes, entirely built with a NXT 2.0 kit. Play against other person, or play by yourself beating the computer challenges.
How to play
Whoever shoots first after the bell rings wins. Watch out for distractions, like the crows squawking — if you shoot too early, you’ll lose.
During the round, an orange flag will rise. Its purpose is to create tension since the bell is guaranteed to ring sometime before it fully rises.
Single player mode
In single player mode, you’ll need to beat the 9 computer challenges: after the bell rings, you must shoot within the number of milliseconds specified in the round. In the first round, you’ll have 500 ms — that’s actually plenty of time! In the last challenge, though, you’ll be at the edge of standard human reflex times
The record number of tries that you take to complete all challenges is recorded. Can you do it in only 9 rounds, without a single miss?
In this mode, use the gun with the grey handle.
Two player mode
It’s simple: whoever shoots first, wins! You can select the number of rounds you need to win in order to win the game. The response time of the round winner is shown on the screen.
Instruction and Program
First, get everything you need:
- Download program, source, LDD model and resources
- Extract the zip file (check this if you need help)
Buliding the model:
- If you don’t have LEGO Digital Designer, download and install it.
- Double click the duel.lxf file in the folder you have extracted.
- After the file opens in LEGO Digital Designer, press F7 and follow the instructions to build the model.
Downloading the program and files to the NXT:
- Turn on your NXT and connect it to your PC using the USB cable.
- Open the LEGO MINDSTORMS NXT sofware.
- Near “Create new program”, click “Go >>”.
- Open the NXT window (click the upper left button above the “Play” button.
- Click on the “memory” tab.
- Click “Download”. Go to folder you have extracted in Step 2, select the first file and Click OK. Click “Download” again, select the second file, click OK, and so on for all files (sorry, I don’t know any easier way to do this).
- In your NXT, go to “My Files”, “Software Files”, then “Duel”.
- Play!
The program is coded in NXC, you can use the Bricx Command Center if you want to make changes to the code.
Fun Facts About Reaction Time
There is some interesting research on reaction time; check this literature review. Some highlights:
- Reaction time for sound stimuli is smaller than for visual stimuli; 160 ms vs 190 ms on average. (These are simple reaction times. Since there are distractions in the NXT Duel, your response time will be slower.)
- Your reaction time get worse if you’re too relaxed or too tense.
- Your reaction time is faster during expiration.
- Your reaction time is faster with your left hand if you are right-handed, and vice-versa.

Buenas noches!
Me gustaria informate que al compilar el archivo Duel.nxc con Bricx Command Center no funcionan bien los tiempos.
Hi Fernando!
What is exactly wrong with the timings? What happens?
El problema es que a la variable end_time no se suma la variable CurrentTick() si lo pones de la siguiente manera:
long end_time = CurrentTick() + 2000 + rnd + Random(1000);
Para solucionar el problema debemos de poner:
long end_time;
end_time = CurrentTick() + 2000 + rnd + Random(1000);
I think you may be using a older version of Bricx/NXC, try updating it
But thanks for report, other people might have the same issue.
How does it stand up? The base is really flexible. And, the instructions are impossible to understand! *MAD!*
I’m not sure what you mean, the base is somewhat flexible, but it held itself fine on a flat surface.
Sorry for the instructions, LDD instructions are not so good. I’ll try to make my own next time.
But I suggest that you use your creativity, the basic structure is very simple (just motors with axles attached). Most of the model is just decorations, so you can come up with your own
Can you please make better instructions for this particular robot. I really want to build it but the LDD instructions are horrible. Please post this ASAP.
Thanks
Sorry, I’ve already disassembled it. But it is very simple, you can make your own — it doesn’t have to be exactly the same to work.
i made one at school in robotics. it only took two hours and programing was simple. im only twelve and have only porgramed a robot to move foreward before i programed the game.
very cool made it
but can u tell me how to put the files on the nxt so i can play with it
thanks
Open the Memory tab of the NXT window (the upper left button besides the “Play” button) and click Download.
I cannot get the memory tab to give me the download option. Please tell me what I am doing wrong.
Did you find the button, but it’s disabled? Are you sure the NXT is connected?
I found the button and it was grayed out therefore not an option. I am not really good at this. Is the NXT the programming box?:/
Yes, the NXT box needs to be turned on and connected to the PC using the USB cable.
where are the building instructions? I can not find names and I really want it done because he looks very nice Thanks
Open the LXF file in Lego Digital Designer and press F7.
okay thank you but where can I find lxf file and how can I open it and where can I open it??
Click on the “Download program, source, LDD model and resources” link in the post. Extract the zip file. Install LDD. Double click the extracted lxf file.
Thank you and where is the program I need it for?
http://ldd.lego.com/
Conrado….I cannot get the flag to rotate properly. It doesnt rotate like on your video it just sits there and i have to manually push it down to get the next shot to work. Is your program faulty? can you take a look at it and let me know?
I’m sorry, I don’t know what is wrong, the program worked fine for me. Try exchanging motors and cables and see if it persists.
i dont understand how you get all those files from the zip file to the mindstorm program itself.
Extract the zip file.
Open the Memory tab of the NXT window (the upper left button besides the “Play” button) and click Download. Select the extracted files.
I tried changing the cables and every possible combination but still the flag doesnt rotate like it is supposed to. Anyone else had this problem with the program?
That’s too bad! I will try to double check the program to see if it’s OK.
I’ve double checked and everything is fine. If you use batteries, are they fully recharged? Otherwise, it may be a problem in the “A” port of your NXT brick — do other programs work fine?
i think you mean “download” not “upload” don’t you? upload takes programs from the nxt to the pc whereas “download” takes programs from pc and puts it onto the nxt.
Oops, you’re right! Thanks!
how do you open the program? Is on the Mindstorm program things?
You can’t open the program in the NXT software since it was coded using another method. But it runs just fine. If you want to edit the code, you will need to learn NXC.
Thanks but i alreay firgured it out
Have you the programme in C or C++?
Yes, it’s included in the zip. It’s the .nxc file.
But it is the .nxc file, I mean “.c fil”.
The NXC compiler for the NXT, which uses (something like) the C language, uses the .nxc file extension. The source code is in the .nxc file.
Can you make a pdf document instructions?
Are you having trouble generating the instructions, or did you not like the instructions generated by LDD?
on the tool bar in lego digital designer, it lets you make an html version of it which is basically a pdf
look very kewl… seen lots of youtube videos about it… cant wait to try it out
-D
wait. so you download every file to the nxt except for the one that goes on the lego digital designer?
Exactly.
Wow i love the guns! there AMASING!!! how did you come up with the idear? i am going to use them in my next robot!!!! do you have any idears of how i should use them???
Thank-you
Hello,
It works great.
Only the building instructions from LDD are not very easy to follow.
However I would rate it 5 out of 5.
Conrado, my son and I thank you for a super project. We really appreciate that you took the time to imagine, build, document and share your procedure. We were able to get through the building instructions and where the LDD wasn’t perfectly clear, we adjusted our design to suffice. When we wanted to change the look or details, we used our imagination and did it. Basically, I just wanted to let you know that despite some of the frustrated comments posted here, there are rational people in the world who don’t have to have every trivial thing spelled out to them. I hope you are able to look past the whining and continue to build and share. You are an inspiration to kids like my son!
Hi! Thank you very much for the kind comment — it makes all worth it.
Stay tuned, I’ll soon post another project which I think is very fun
Hi! Awesome robot, but I ran into a problem, I cannot open the .nxc file in the Lego Mindstorms NXT 2.0 software. Is there another way of transferring the program into my NXT Brick or am I just doing it wrong?
You’re not supposed to open the .nxc file with the NXT software. It was written using NXC; if you want to edit the program, you will need to use Bricx Command Center.
If you just want to play it, follow the instructions — you just need to download the .rxe file and auxiliar files (i.e. all files except the .lxf and .nxc).
hi i made your game.
however, i can’t get the program. where is the play button
can you help me>
HI really great project
however i can’t download any of the files
which one am i suppose to?
can you reply to this comment with the file that im suppose to download?
all the files says nxc rxe ric rso and when i tried to change those files to an nxt file, it says there is an error.
what am i doing wrong?
I view something really interesting about your blog so I saved to favorites .
Nice project !
everything was just fine from constructing the robot until downloading the program into my NXT.
But problem appeared after I press the orange button to run the program, It doesn’t display anything on the screen. I mean my NXT’s screen. It is blank
May I know what’s the problem ?
Great project.
Everything was working well. My high score was 12 times
i can’t download the program please help?
You can’t download the program to your PC or you can’t download the program to the NXT? What is happening?
i already got the program but the nxt doesn’t schow anything on the screen
btw its show but i cant see anything on the screen
Make sure you transfer all the files to the NXT:
Duel.rxe
reflex_1p.ric
reflex_2p.ric
reflex_bell.rso
reflex_crow.rso
reflex_d0.ric
reflex_d1.ric
reflex_d2.ric
reflex_d3.ric
reflex_d4.ric
reflex_d5.ric
reflex_d6.ric
reflex_d7.ric
reflex_d8.ric
reflex_d9.ric
reflex_error.rso
reflex_gbu.rso
reflex_gunshot.rso
reflex_left_w.ric
reflex_record.ric
reflex_record2.ric
reflex_right_w.ric
reflex_rounds.ric
reflex_tries.ric