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.
General
-
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?
-
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:
using Swinxs;
namespace XXX
{
public class SwinxsLink
{
private IpcClientChannel channel;
private SwinxsMethods swinxsServer;
public SwinxsLink()
{
this.channel = new IpcClientChannel();
ChannelServices.RegisterChannel(channel, true);
RemotingConfiguration.RegisterWellKnownClientType(
typeof(SwinxsMethods),
"ipc://SwinxsChannel/SwinxsMethods");
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)
Common Tasks
Troubleshooting
-
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:
rfid.on;
When you're not interested in tags anymore, just issue:
rfid.off;
-
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 )
{
sound.play(...);
state.move(STATE_B);
}
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(...):
state(ST_A)
{
if ( ! sound.playing )
{
sound.play(...)
state.move(ST_B)
}
// 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