Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » Wiimote Projects » Wiimote Desktop VR/Head Tracking » Small changes to the WiiMote DesktopVR Images
Pages: [1]
  Print  
Author Topic: Small changes to the WiiMote DesktopVR Images  (Read 3165 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 2
Offline Offline
View Profile
« on: August 26, 2008, 12:59:35 PM »


Hi All,

I am still learning to get to grips with C#. I am working in Visual Studio 2008 which is making following and locating peices of code fairly easy, but I am still a long way off being competant!

I did manage to change the target.png and stad_2.png using instructions from this site, and from there worked out where to change the number of targets and background colour.

Now for my question...

Ok, I know you can change the target.png for another image by saving the new image under this file name in the WiiDesktopVR folder, but how could I insert another image into the Desktop VR program without just saving it under the target.png file name in the WiiDesktopVR folder?

Also... Is there a way to put two different images in the DesktopVR program, for example having both a reg target and a yellow target?

I hope this doesn't turn out to be a really silly question for you all!

Thanks,

JB 

Logged
Support Admin
*
Karma: +11/-3
Posts: 566
Offline Offline
View Profile WWW
« Reply #1 on: August 26, 2008, 03:34:28 PM »

Easy  - search in the code for target.png - replace that with the text of your liking...

And the 2nd part...

You need an array of images of some sort and then you have to populate your targets with this array of images

Logged

*
Karma: +0/-1
Posts: 22
Offline Offline
View Profile Email
« Reply #2 on: August 27, 2008, 11:30:26 AM »

And the 2nd part...

You need an array of images of some sort and then you have to populate your targets with this array of images


I'm sorry but this sounds confusing to me. I have been asking the same questions as JamesB78 and wondering how to have multiple different targets on screen at once also.

Could someone please tell me how in a silly-proof way OR could someone just do there own and upload the code?

Thanks beautiful people.
Logged
Support Admin
*
Karma: +11/-3
Posts: 566
Offline Offline
View Profile WWW
« Reply #3 on: August 27, 2008, 02:43:20 PM »

I cannot show you the code as I don't have it but the concept is something like this

create an array with images 1.jpg, 2.jpg, 3.jpg, 4.jpg, 5.jpg

start a loop
create a target and assign an image you choose (1.jpg is the 1st position in array)
move to the next position in the array


this feature is repeated for all targets


another way(better) is to use a random feature

start a loop
create a target and assign an image from the array but you use random to calculate witch image to use every time


If you aren't used to programming I can understand that it is hard to understand...


//UndCon
Logged

*
Karma: +0/-1
Posts: 22
Offline Offline
View Profile Email
« Reply #4 on: August 28, 2008, 05:32:08 AM »

Thanks UndCon.

I get the 'make jpeg's in numerical order' part. Its the 'make a loop' code that eludes me.
Thanks. I do love this stuff!
Logged
Support Admin
*
Karma: +11/-3
Posts: 566
Offline Offline
View Profile WWW
« Reply #5 on: August 28, 2008, 09:51:30 AM »

here is a simple for-loop

for (int i = 0; i <= targets; ++i)
            {
                code to assign the target image here

                myImageArray.Next();
            }


what this do(should do) is:

assign i =0 (used as a counter in this case and we set it to 0)
as long as i is less or equal to targets - increase i with 1 (i++)

(target is the same variable in the program that tells how many targets to show, I have this adjustable by keypress)

when the code of getting an image and using it as target (drawing target) is done
you move to the next target-image with myImageArray.Next();



here you will need something that warns/ignores or tell you when your array of images are out, If you try to move to the next image and there is none you will get error/crash
Logged

*
Karma: +0/-0
Posts: 13
Offline Offline
View Profile Email
« Reply #6 on: September 03, 2008, 07:57:44 PM »

where do i put the image and loop?? in what carpet?
Logged
*
Karma: +0/-0
Posts: 83
Offline Offline
View Profile
« Reply #7 on: October 02, 2008, 06:11:06 AM »

i think shld put in the showTarget method
Logged
Pages: [1]
  Print  
 
Jump to:  

Clicky Web Analytics