Frequently Asked Questions
If you have a question, or if you want to report a problem, first see if you can find an answer in the list below. If that doesn't help, follow the link at the bottom of this page.
What is the target group of developers.swinxs.com
This site is for all people who are enthusiastic about Swinxs as a game console and who have new ideas and/or want to develop new games, educational quizes or other interactive experiences.
What languages does Swinxs support?Swinxs applications are written using the SwinxsTalk programming language which can be downloaded from http://www.swinxs.com/en/swinxs/downloads.php
Can I write code for Swinxs using C/C++?Swinxs only supports applications written using the SwinxsTalk programming language.
What is SwinxsTalk?SwinxsTalk is the development language for Swinxs. Using SwinxsTalk anybody with a basic knowledge and experience in programming can write, test and share new games, quizes and other type of experiences for Swinxs.
Can I control Swinxs attached to a PC
This is a FAQ item for C# programmers who want to control Swinxs by there own applications.
Firmware 494 supports Swinxs as HID device. The SwinxsEmulator contains the assembly Swinxs.dll. You can use it in your own C# application the following way:
public class SwinxsLink
private IpcClientChannel channel;
private SwinxsMethods swinxsServer;
this.channel = new IpcClientChannel();
this.swinxsServer = new SwinxsMethods();
These are the methods of swinxsServer you can use:
public ushort Firmware
public uint SerialNumber
public bool ButtonGreenPressed
public bool ButtonRedPressed
public bool ButtonWhitePressed
public uint Rfid
public uint RfidFlags
public uint RfidCounter
public void SetLed(int red, int green, int blue)
How do I play sounds using SwinxsTalk?
To play a single sample, use
To concatenate more sampes,use
See the SwinxsSDK documentation for the details.
How do I reload my game in the SwinxsEmulator?
Just press shift-F5 to stop and F5 to re-run your game.
This way, all registered tags are still registered and your game restarts. So source-code changes you just made (and saved) are executed.
Is it possible to download more games in the SDK after you already installed the SDK? Just reinstall the SDK. Reinstalling preserves the previous installation (nothing gets deleted). Deselect all games you already have and select the ones you want to add.
How do I get the color of an arbitrary XS?
To get the color of an arbitrary (registered) XS, you use the score.get(n) statement. The next control cycle, rfid.last.lo % 10 will hold the ID of the color of XS n. Games 60001 and 60002 (Animal Battle and Picto Cards) use this trick.
To know which color maps to which ID, see the documentation.
Why won't my game detect XSes?
You test on rfid.xs.detected, but it won't return true when you use an XS...
Most probably you forgot to enable the RFID detection. In order to save energy, RFID-detection is turned off by default. You should set it yourself:
When you're not interested in tags anymore, just issue:
Samples are repeated again and again
You you issue a sound.play() command, Swinxs will repeat playing the sample.It is the programmers task to prevent this. Typical code:
state ( STATE_A )
state ( STATE_B )
if ( ! sound.playing ) sound.off;
How to execute code during sound.chain(..)?
If you use sound.chain to let Swinxs say a sequence of samples, it is difficult to do something else like detecting a tag. Although it is possible (using a second state machine), a better approach is to switch to sound.play(...):
if ( ! sound.playing )
// some other code like testing a button
My game is too big to fit into the Swinxs intstruction memory
The amount of instruction memory is rather restricted: only 6000 bytes. Some games, like Relay (00047) won't fit. In that case you need to split your games into two or more parts. Use the instruction game.start(...) to load another part of your game. Check out Relay for an example. In Relay, the end of the race, including telling which team won, is done in a separate overlay.
Perhaps in the future we might build a firmware with a bigger instruction set. This will limit your game to Swinxses with updated firmware releases only. Another approach would be to let the SwinxsTalk compiler handle the splitting of the source into multiple parts. For the time being, it is something you have to do yourself...
No, all these answers are not helping me:Consult the FAQ of swinxs.com