Tag Archives: Nintendo Wii

Play Virtua Tennis like WiiSports!

here it is another script for play virtua tennis. remember to calibrate the wiimote as usual.. move the player with nunchuk.

————————————–

// Lotti’s Virtua Tennis Script

// X/Y offsets for Analog. If it’s too sensitive then make the numbers larger.
var.xNunchukOff = .07
var.yNunchukOff = .07

//Switch off the leds
Wiimote.leds = 0

// Motion Mouse
// Manual Configuration
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6

var.xOffset = 5
var.yOffset = -2
var.zOffset = 4

var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset

debug = ‘X:’ + var.xRot + ‘, ‘ + ‘Y:’ + var.yRot + ‘, ‘ + ‘Z:’ + var.zRot

// Automatic Configuration
// Simple press – and + buttons on wiimote before start playing
if Wiimote.Minus && Wiimote.Plus then
var.xOffset = -Wiimote.RawForceX
var.zOffset = -Wiimote.RawForceZ
var.yOffset = -Wiimote.RawForceY + 28
debug = debug + ‘ Autocalibration’
endif

//
// Game buttons.
//

key.Enter = Wiimote.Home
key.a = Wiimote.A
key.s = Wiimote.B
key.a = Wiimote.Nunchuk.ZButton

key.Tab = Wiimote.One
key.Space = Wiimote.Two

//
// Analog Movements
//

if Wiimote.Nunchuk.JoyX < -var.xNunchukOff then
key.Left = true
else key.Left = false
endif
if Wiimote.Nunchuk.JoyX > var.xNunchukOff then
key.Right = true
else key.Right = false
endif
if Wiimote.Nunchuk.JoyY < -var.yNunchukOff then
key.Up = true
else key.Up = false
endif
if Wiimote.Nunchuk.JoyY > var.yNunchukOff then
key.Down = true
else key.Down = false
endif

//
// Wiimote Movements
//

if abs(var.zRot) >= 20 && var.yRot >= 20 && var.yRot <= 35 then // For Forehand/Backhand
key.a = true
Wiimote.Rumble = True
Wait abs(var.zRot) ms
Wiimote.Rumble = False
key.a = false
endif
if var.yRot >= 50 && var.zRot >= -5 && var.zRot <= 5 then // For Lob
key.s = true
Wiimote.Rumble = True
Wait var.yRot-25 ms
Wiimote.Rumble = False
key.s = false
endif

GlovePIE FPS Script without SensorBar

hellu :) this is a script for control fps games without sensorbar (a bit difficult but.. just try it). Rember to read the comments for calibrate your wiimote with the script. enjoy it them.

————————————————–

// FPSGame by Kasten, improved by Lotti
// Thanks to TaggeD for the automatic configuration of the wiimote’s offsets

// Motion Mouse
// Manual Configuration
// When configuring the offsets please put the wiimote flat and do not move it.
// These are offsets change them so that your debug output reads 0,28,0
// The debug output is at the top of this window.
// Ex if you get -7,33,-6 then change the offsets to 7,-5,6

var.xNunchukOffset = 5
var.yNunchukOffset = -3
var.zOffset = 4

var.xRot = Wiimote.RawForceX + var.xNunchukOffset
var.yRot = Wiimote.RawForceY + var.yNunchukOffset
var.zRot = Wiimote.RawForceZ + var.zOffset

debug = ‘X:’ + var.xRot + ‘, ‘ + ‘Y:’ + var.yRot + ‘, ‘ + ‘Z:’ + var.zRot

// Automatic Configuration
// Simple press – and + buttons on wiimote before start playing

if Wiimote.Minus && Wiimote.Plus then
var.xNunchukOffset = -Wiimote.RawForceX
var.zOffset = -Wiimote.RawForceZ
var.yNunchukOffset = -Wiimote.RawForceY + 28
endif

// Change this if you would like your mouse to go faster
var.xMinSpeed = 1
var.xMaxSpeed = 5
var.xSpeedDivision = 27 //default 27
var.zMinSpeed = 1
var.zMaxSpeed = 5
var.zSpeedDivision = 27 //default 27

// change these to a higher number if your hands are not steady or lower if they are
var.xCutoff = 4
var.zCutoff = 4

// X/Y offsets for Analog. If it’s too sensitive then make the numbers larger.
var.xNunchukOff = .07
var.yNunchukOff = .07

//Switch off the leds
Wiimote.leds = 0

//
// Game buttons.
//

mouse.LeftButton = Wiimote.B
mouse.RightButton = Wiimote.A
mouse.WheelUp = Wiimote.Plus
mouse.WheelDown = Wiimote.Minus
mouse.WheelUp = Wiimote.Right
mouse.WheelDown = Wiimote.Left
key.Escape = Wiimote.Two

key.e = Wiimote.Down
key.Space = Wiimote.Up
key.q = Wiimote.Nunchuk.CButton
key.Shift = Wiimote.Nunchuk.ZButton

//
// Analog Movements
//

if Wiimote.Nunchuk.JoyX < -var.xNunchukOff then key.a = true else key.a = false endif if Wiimote.Nunchuk.JoyX > var.xNunchukOff then
key.d = true
else key.d = false
endif
if Wiimote.Nunchuk.JoyY < -var.yNunchukOff then key.w = true else key.w = false endif if Wiimote.Nunchuk.JoyY > var.yNunchukOff then
key.s = true
else key.s = false
endif

//
// Reload
//

if Wiimote.Nunchuk.RawForceY > 60 then
key.r = true
Wiimote.Rumble = true
Wiimote.Leds = 15
else
key.r = false
Wiimote.Rumble = false
Wiimote.Leds = 0
endif

// This is the code that moves your mouse
var.xSpeedInc=(var.xMaxSpeed-var.xMinSpeed)/var.xSpeedDivision
var.zSpeedInc=(var.zMaxSpeed-var.zMinSpeed)/var.zSpeedDivision

var.xSpeed=var.xMinSpeed+abs(var.xRot)*var.xSpeedInc
var.zSpeed=var.zMinSpeed+abs(var.zRot)*var.zSpeedInc

if var.xRot > var.xCutoff then mouse.x = mouse.x – .001 * var.xSpeed * (var.xRot – var.xCutoff)
if var.xRot < -var.xCutoff then mouse.x = mouse.x - .001 * var.xSpeed * (var.xRot + var.xCutoff) if var.zRot > var.zCutoff then mouse.y = mouse.y – .001 * var.zSpeed * (var.zRot – var.zCutoff)
if var.zRot < -var.zCutoff then mouse.y = mouse.y - .001 * var.zSpeed * (var.zRot + var.zCutoff) //debug = ‘X:’ + var.xRot + ‘, ‘ + ‘Z:’ + var.zRot

Homemade Wii SensorBar 2


i found my gpu fan burned on sundey and only yesterday i could buy a new one.. well.. i haven’t do the sensorbar because i missed some component and i lost my car on a car accident 1 week ago..

now i’ve got all. maybe tomorrow i’ll start to do it. here a photo about the circuit that i’m going to solder.

Homemade Wii SensorBar 1

Here is the circuit..
and those are the specifications..
Resistor: from 70 to 82 ohm (i found 82 ohm)
infrared led: 1.3-1.8V & 10-20mA
USB: 5V

well, i did it and it’s working well.. and i discovered that i bought 2 burned out led on 4.. :\

tomorrow i’ll go to buy some new led and i’ll start to craft a better bar.

everything will be documented :)

Homemade Wii SensorBar 0

hello guys! i went to 15 shops to search the wii and i didn’t find one! :\ now i booked one on the net.. i think that i have to wait a month..

well but i’m also building my own sensorbar for play on pc with my wiimote! (i found the last wiiplay XD)

The House of the Dead is the ideal title!
and now some images about the WIP lotti’s sensorbar

SensorBar Scheme:
WIP SensorBar Front:
WIP SensorBar Back: