Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - ZaPPZion

Pages: 1 2 3 ... 9
Wiimote Interactive Whiteboard / Re: SIMPLE QUESTION
« on: May 18, 2008, 05:03:34 AM »
yes it will work, it works everywhere, it's not about the screen, it's about the wiimote + ir-pen ;) so you can use it on any surface, as long as the IR light gets reflected :)

Wiimote Desktop VR/Head Tracking / Re: Random (stupid?) Idea...
« on: May 14, 2008, 04:01:44 AM »
It would be cool to have something like this:

that's certainly a cool idea

I've got a couple things that are important to think about:

- What programming language are you going to use?
- What 3d engine fits with that language?
- Cloth physics are quite hard to program, and you should probably put gameplay at a higher priority then graphics.
- I think you just need 1 controller, but with a nunchuk plugin, that'll basicly give you 2 wiimote accelero meters.
- I'd sugest to first make the feet being controlled by the joystick of a nunchuk, and maybe later with a wiifit, since i've not yet seen any libraries for the wiifit.

About the programming language and 3d engine i've got a couple suggestions. If you're learning java at school, there's not much of a change when using C#, that language is almost identical to java syntax. C++ will take a lot more time getting used to, and there are already libraries for the wiimote input for .NET languages as C#, so that saves some time. If you are using C#, there is a pretty good 3d engine that i'm already using, called truevision3d. It's a cheap engine, even free if you don't plan to sell your game. That makes it pretty cool, since you can just try the engine and experiment without having to spend about 500$. Anyway, if you need help on the programming part, you can just ask about it, I'm willing to help/give advice.


IR Pens / Re: What's wrong?
« on: April 24, 2008, 05:27:40 AM »
yea, wiki:

IR Pens / Re: What's wrong?
« on: April 23, 2008, 06:17:38 AM »
the IR Led has a polarity. You need to connect the + to the long pin, and the - to the shorter pin (ofcourse with a resistor).

Wiimote Interactive Whiteboard / Re: Star-Thrower Program?
« on: April 22, 2008, 06:22:55 AM »
Might be usefull to give a little more information. Who's he? and what project ;D
maybe you can supply a link or something :D

Programmers Den / Re: getting past C# (not a good start)
« on: April 22, 2008, 06:20:43 AM »
you should declare some variable HIDImports somewhere in the class.
like this:

public HIDImports HIDImports;

then in your form_load method, put this line:

HIDImports = new HIDImports();

then you'll have to add the class HIDImports.cs to your project. I don't have a clue where to get it, but usually helps :D

Babelfish translation:
With the Windows Vista Ultimte64, the Wiimote detects to me... When executing the CALIBRATION program, detects the 4 points to me of the calibration, but despues... does not do anything but.... The microrruptor of the PEN does not detect cuado jam... but if that in the control. appears as if it detected it... but it does not do anything. Somebody knows like solucionarlo.. Thanks... i if they can contectar enespañol to me, gradecere... somo also many those of Hispanic speech that we are in subject.

Programmers Den / Re: getting past C# (not a good start)
« on: April 20, 2008, 08:41:47 AM »
If you want to edit stuff, then you should use Visual C# express 2005 or 2008. It's free ;)

It's quite hard to get 3D positions of an IR LED with just 1 wiimote. It's possible to get the size of the IR blob that's being tracked, but that doesn't say everything about the z-axis (if you mean the axis that's pointing away from you, so distance to the screen). If you tilt the IR LED, the intensity will decrease as well, so it's not accurate at all. I think it would be better to use 2 wiimotes. 1 for the x/y picture, and 1 for the y/z picture for example. That's already been done and shouldn't be too hard to implement (i think)

Wiimote Interactive Whiteboard / Re: Newb questions..
« on: April 18, 2008, 12:01:54 PM »
There is no IRC channel for these boards (yet). I think it could be a good idea though.
I'm going to talk to the other moderators/admins to see what we can do;)

you've posted this question before, where do you want it to continue? I'll delete the other thread.

Say Hi! / Re: hi from saarbrücken germany
« on: April 10, 2008, 03:25:24 AM »

Programmers Den / Re: getting past C# (not a good start)
« on: April 09, 2008, 09:21:37 AM »
I tidy'd up your code :)
it still gives a "HIDImports does not exist in this context" error, but that's because i dont have that class in the project i tried with.

here's the tidy code:

Code: [Select]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Microsoft.Win32.SafeHandles;

namespace WindowsFormsApplication1
    public partial class Form1 : Form
        // read/write handle to the device
        private SafeFileHandle mHandle;

        // a pretty .NET stream to read/write from/to
        private FileStream mStream;
        bool found = false;
        Guid guid;
        uint index = 0;

        // sure, we could find this out the hard way using HID, but trust me, it's 22
        private const int REPORT_LENGTH = 22;

        // report buffer
        private byte[] mBuff = new byte[REPORT_LENGTH];

        public Form1()

        private void BeginAsyncRead()
            // if the stream is valid and ready
            if (mStream.CanRead)
                // create a read buffer of the report size
                byte[] buff = new byte[REPORT_LENGTH];

                // setup the read and the callback
                mStream.BeginRead(buff, 0, REPORT_LENGTH, new AsyncCallback(OnReadData), buff);

        private void OnReadData(IAsyncResult ar)
            // grab the byte buffer
            byte[] buff = (byte[])ar.AsyncState;

            // end the current read

            // start reading again

            // handle data....

        private void Form1_Load(object sender, EventArgs e)
            // 1. get the GUID of the HID class
            HIDImports.HidD_GetHidGuid(out guid);

            // 2. get a handle to all devices that are part of the HID class
            IntPtr hDevInfo = HIDImports.SetupDiGetClassDevs(ref guid, null, IntPtr.Zero, HIDImports.DIGCF_DEVICEINTERFACE);// | HIDImports.DIGCF_PRESENT);

            // create a new interface data struct and initialize its size
            diData.cbSize = Marshal.SizeOf(diData);

            // 3. get a device interface to a single device (enumerate all devices)
            while (HIDImports.SetupDiEnumDeviceInterfaces(hDevInfo, IntPtr.Zero, ref guid, index, ref diData))
                // create a detail struct and set its size
                diDetail.cbSize = 5; //should be: (uint)Marshal.SizeOf(diDetail);, but that's the wrong size

                UInt32 size = 0;

                // get the buffer size for this device detail instance (returned in the size parameter)
                HIDImports.SetupDiGetDeviceInterfaceDetail(hDevInfo, ref diData, IntPtr.Zero, 0, out size, IntPtr.Zero);

                // actually get the detail struct
                if (HIDImports.SetupDiGetDeviceInterfaceDetail(hDevInfo, ref diData, ref diDetail, size, out size, IntPtr.Zero))
                    // open a read/write handle to our device using the DevicePath returned
                    mHandle = HIDImports.CreateFile(diDetail.DevicePath, FileAccess.ReadWrite, FileShare.ReadWrite, IntPtr.Zero, FileMode.Open, HIDImports.EFileAttributes.Overlapped, IntPtr.Zero);

                    // 4. create an attributes struct and initialize the size
                    HIDImports.HIDD_ATTRIBUTES attrib = new HIDImports.HIDD_ATTRIBUTES();
                    attrib.Size = Marshal.SizeOf(attrib);

                    // get the attributes of the current device
                    if (HIDImports.HidD_GetAttributes(mHandle.DangerousGetHandle(), ref attrib))
                        // if the vendor and product IDs match up
                        if (attrib.VendorID == VID && attrib.ProductID == PID)
                            // 5. create a nice .NET FileStream wrapping the handle above
                            mStream = new FileStream(mHandle, FileAccess.ReadWrite, REPORT_LENGTH, true);

                // move to the next device

            // 6. clean up our list

btw: i modified your posts a bit, it was getting a long page, because you were using quote tags instead of code tags. It's not a big deal, but can you please use code tags instead of quote's on large code snippets? thx in advantage;)

Programmers Den / Re: getting past C# (not a good start)
« on: April 08, 2008, 02:14:39 PM »
in the graphical part of visual C# (the one where you can place buttons etc) double click the form. That'll generate a Form_Load event handler. Put your code in there, leave the InitializeComponent() method where it is, since it's incredibly handy :P it kindof makes your program show like a program (i know there's a lot more to it, but it's not worth explaining;))

so what you'll get is:
Code: [Select]
namespace WindowsFormsApplication1
    public partial class Form1 : Form
        public Form1()

        public void Form1_Load()
            yourMethods(); // <<<<<<<<<in here :)

Pages: 1 2 3 ... 9