It is currently Wed Jun 19, 2013 9:34 pm



Reply to topic  [ 180 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 GlovePie replacement ? 
Author Message
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
Brantlew have done a great work with the mouse and keyboard plug-ins. So I think we are soon ready for a first alpha binary release!


Thu Feb 16, 2012 3:10 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2081
Location: Irvine, CA
I believe the keyboard is not "quite" ready for alpha. Currently you can only emulate keyboard presses on keys A-Z and 0-9. I will fix this soon.


Thu Feb 16, 2012 1:30 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
brantlew wrote:
I believe the keyboard is not "quite" ready for alpha. Currently you can only emulate keyboard presses on keys A-Z and 0-9. I will fix this soon.


Have you looked anything into Wiimote? How much effort would it be to do that?


Thu Feb 16, 2012 1:40 pm
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2081
Location: Irvine, CA
Not that much work if you leverage it on a pre-existing project like WiimoteLib, but I need to spend some time on some of my other projects for a while. My telepresence robot needs a wireless upgrade and FriiSpace is way behind schedule.


Thu Feb 16, 2012 3:35 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
brantlew, can you get latest and check if you can build? I've committed a pretty advanced batch script that should set the version of the program using SVN revision number. Try to build and see if the revision number is reflected into the core dll and the gui.exe version number

Thanks


Mon Feb 27, 2012 11:08 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2081
Location: Irvine, CA
I'm out of town on business right now, but I can do it when I get back home.


Mon Feb 27, 2012 7:53 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
My brother gave the FaceTrackNoIR TrackIR code a try, but he couldnt get it to work, and hes a pretty experienced Cpp developer.
Anyone else wanna give the TrackIR plugin a shot? We need atleast WiiMote and TrackIR support before a official beta release


Wed Feb 29, 2012 3:11 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Did he get it to build? What part was he stuck on?

I hate setting up new build environments. I pulled down the source and had a look at the source... it looks pretty decent, theres a fair bit I dont understand exactly but generally speaking it looks like it sets up a fake trackir.exe, loads a couple of dlls, gets a memory mapped handle and uses that to do the tracker movement pushes with one of them. Thats just a guess tho based on a quick read through.

Whats the legality of using most of it verbatim, and just changing a few strings, removing a crapload of GUI specific stuff, and some other things, and massaging it into the format we require...? Full credit given etc of course...


Thu Mar 01, 2012 1:34 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
That code is crap, 90% of the code in those files arent even used (I hate it when people leave code that is not used), the memory mapped stuff is not used, they use the TIR dlls.. He ported the code using the TIR dlls code, but no go, since there is so much static noise in those code files from stuff not being he has probably overseen something. But I'm happy if you want to take a crack at it, but I will never allow code of that standard commited to FreePIE :P

So the best approach is to port it and clean it up, I will check on my brother to see the status of his progress to night...


Thu Mar 01, 2012 1:50 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Let us know how he gets on. Personally nowadays I like to start with a solution, then iterate it for efficiency if required. The perfect is the enemy of the good...


Thu Mar 01, 2012 5:47 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
WiredEarp wrote:
Let us know how he gets on. Personally nowadays I like to start with a solution, then iterate it for efficiency if required. The perfect is the enemy of the good...


I agree, BUT that code is below any standard that you can accept.


Thu Mar 01, 2012 6:17 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Are you intending to rewrite it completely? Because, if not, my question still is, what is the legality of using it at all? You should probably suss that stuff out...

What you have said your brother was doing was exactly what I am talking about, taking out the gui stuff and that other crud and massaging it into useful code. Thats what I'll be doing for my own purposes anyway. Doing any more than cutting and pasting things into your own new routines and cleaning up some variable names (such as rewriting everything) is probably just a waste of time, unless you need to do so for a particular purpose (such as legal reaons), or you have spare time to waste on stuff like that.

I'm surprised theres no properly written library to use fake TrackIR easily already. All that code should be able to be simplified into a few base routines that would take care of everything else.


Thu Mar 01, 2012 6:59 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
He's just using the code to reverse engineer it to something we can use for our TIR plugin. Let me know if you can use it to get something working, then my brother (Or you) can use that for FreePIE aswell

edit: Btw, you can still be nitty picky about code quality and coding standards, that does not mean you're overdoing it, or as you stated "The perfect is the enemy of the good".. Those two are not the same.. Clean code is always the right way togo, especially in big projects with many projectmembers...

edit2: Thats why I seldom use comments in my code, it tend to add noise that takes away focus from the behavior. Names of methods and members should be so good that you can understand what the codes does without adding alot of noise in form of comments...


Thu Mar 01, 2012 7:42 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2081
Location: Irvine, CA
Have to disagree there. Nothing is more important to code readability than commented code. Not necessarily every input parameter and variable, but having 2 or 3 descriptive sentences before logical sections of code is enormously helpful for code comprehension. Verbose function names and meta-programming constructs can be helpful, but for even moderately complex code they offer almost no help when trying to unravel someone else's logic (or even your own code that you haven't looked at in years) - especially if there are obscure side-effects or intentionally non-obvious code flow. Those things have to be documented.


Thu Mar 01, 2012 9:30 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
Yeah, Im talking about standard business code like this

Code:
//List all VIP customers
var customers = customerRepository.ListAllCustomersBy(CustomerTypes.VIP);


One improvement you can do though to the above code to make it more readable without comment is
Code:
var vipCustomers = customerRepository.ListAllCustomersBy(CustomerTypes.VIP);


The code is perfectly understandable without that comment :P
I also dont like it when people uses comments to group code blocks, put the blocks in own methods or even own classes instead

Anyway, i agree with you somewhat, but not completely, code with lots of comments are usually an attempt to make bad code more readable.

edit: this is a topic that is very close to my heart so I'll throw in more examples.. This is a live example from our FreePIE code
Code:
var usedPlugins = scriptParser.InvokeAndConfigureAllScriptDependantPlugins(script);


Do not be afraid of long method names, this is alot nicer then

Code:
//Lists all plugins that are referenced from the script
var plugins = scriptParser.ListPlugins(script);


Thu Mar 01, 2012 9:40 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
I disagree actually, at least with your first example.

IMHO, there is no way it is made more readable by removing the comment.

Quote:
Code:
//List all VIP customers
var customers = customerRepository.ListAllCustomersBy(CustomerTypes.VIP);

One improvement you can do though to the above code to make it more readable without comment is
Code:
var vipCustomers = customerRepository.ListAllCustomersBy(CustomerTypes.VIP);


I believe in long, descriptive method and variable names, but comments are a good thing. I can look down a screen of code, and just read the comment sections until I get to the code I wish to work on. Otherwise, I have to read every line and understand what is is doing. Now, while you can make this better by putting it into descriptive methods/functions etc, I'd still want comments in those functions. Comments are there so you don't HAVE to read all the code, and can thus save you significant time, especially when reading something written by someone else (who, while they may have used long function names etc, may not have chosen the names you would have logically used).

Re the TrackIR code, i'll let you know if I get something useable out of it. Unfortunately, i've broken my Hydra (stupid flex cables!!!) so until I've repaired it I can't work on the Hydra side of things. Do you have any TrackIR testing programs or know of a good quick loading app to test things with? I'll probably start by building FaceTrackNOIR, and confirming it actually works, before I bother doing anything more...


Thu Mar 01, 2012 9:06 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
WiredEarp wrote:
I disagree actually, at least with your first example.

I believe in long, descriptive method and variable names, but comments are a good thing. I can look down a screen of code, and just read the comment sections until I get to the code I wish to work on. Otherwise, I have to read every line and understand what is is doing. Now, while you can make this better by putting it into descriptive methods/functions etc, I'd still want comments in those functions. Comments are there so you don't HAVE to read all the code, and can thus save you significant time, especially when reading something written by someone else (who, while they may have used long function names etc, may not have chosen the names you would have logically used).


Well if you have that amount of comments you're talking about it will be as much (Probably more) text as the code, which means you have to read the same amount of text to find the place you want, the difference is that well structured code is faster to read and understand than comments, so its actually faster just to read the code (If its well structured).
Oh, and Visual studio comes with very good refactor tools, so its not a problem to rename a method, even if its used on 200 places. So if someone has selected a bad name thats not descriptive enough, you can easily change it. If your interested to know more about these concepts google the term "clean code", its a very good topic to read up on for any developer.

WiredEarp wrote:
Re the TrackIR code, i'll let you know if I get something useable out of it. Unfortunately, i've broken my Hydra (stupid flex cables!!!) so until I've repaired it I can't work on the Hydra side of things. Do you have any TrackIR testing programs or know of a good quick loading app to test things with? I'll probably start by building FaceTrackNOIR, and confirming it actually works, before I bother doing anything more...


I use Freetrack to test reading with, once we have reading working you can use GlovePIE or a game to test writing... (THe game has to be using the older trackir dll's that are uncrypted)

edit: By the way, this i a better name for the returned list to make it more readable then the comment, also keep in mind that the comment needs to be duplicated everywhere the list is used (If it does not have a good name explaining whats in it)
Quote:
var allVipCustomers = customerRepository.ListAllCustomersBy(CustomerTypes.VIP);


Fri Mar 02, 2012 2:09 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Quote:
well structured code is faster to read and understand than comments


An English summary of a function (for example), is always going to be quicker to read than the more voluminous code in the function, even if that code has been simplified into logical and obvious routines. The same applies to code blocks. All I could agree on, would be that I hate those who comment everything. It should be kept to summarize a segment, to save you having to look at the individual elements unless you have to.

Visual Studio's built in refactoring support actually does not exist in VB.Net (among maybe others).

edit: yeah im not interested in the reading side of TrackIR, just the writing. Using GlovePIE could be a plan. I just want something quick that will show me its working for real. I think you can hack many of the encrypted interface games to support the unencrypted interface (people with older TrackIR's need to do this I believe).


Fri Mar 02, 2012 7:08 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
WiredEarp wrote:
Quote:
well structured code is faster to read and understand than comments


An English summary of a function (for example), is always going to be quicker to read than the more voluminous code in the function, even if that code has been simplified into logical and obvious routines. The same applies to code blocks. All I could agree on, would be that I hate those who comment everything. It should be kept to summarize a segment, to save you having to look at the individual elements unless you have to.

Visual Studio's built in refactoring support actually does not exist in VB.Net (among maybe others).

edit: yeah im not interested in the reading side of TrackIR, just the writing. Using GlovePIE could be a plan. I just want something quick that will show me its working for real. I think you can hack many of the encrypted interface games to support the unencrypted interface (people with older TrackIR's need to do this I believe).


Google TackIr Fixer, its a program that has to be running along side the game and your TrackIR emulator, it intercepts the messages and encrypts them.. Downside is that TrackIR fixer has to be updated for each new game :/

Its clearly that we have different views here, but if you were correct that would mean languages like basic would be easier to read because its more close to reading actual text, but C# is a much easier language to read, so.... You're wrong! :P Its offcurse a matter of taste..


Fri Mar 02, 2012 7:41 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Yeah, thats the app. I believe it supports most important TrackIR applications (which are mostly sims) so as long as you don't require multiplayer, its probably a good way to use fake TrackIR.
I notice that Carl Kenner claims hes using a new method with the latest glovePIE to do the TrackIR stuff. Does anyone know what he is referring to? I'm wondering if his new method works without TrackIRFixer. Looks like glovepie.org has been hacked currently, so I can't quote what he said.

Not sure what you were saying about basic... i was talking about comments, not the language? I really don't find either of those two easier to read, you can have crap code in both. C# does have more structure to it however, which is useful with undisciplined coders (makes it harder to use lots of global variables and such).

IMHO, whatever works for you and your colleagues, is properly laid out, and easily maintainable and extensible, is the important thing. The world wont end with or without the comments. However, you could always script a VS addon to hide all comments, letting those of us who like them continue to use them :)


Fri Mar 02, 2012 8:08 pm
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 10155
I used to place a comment above every single line of code, which was helpful in a sense but over-kill. Now I rarely comment, but I find that is even worse. If you read Code Complete 2, the author makes a fair point that the better way to code is to write the comments, and *only* the comments first (as in english psuedo code). This helps you to better understand the problem and think it through before you commit to a certain structure or algorithm. Then you write the code. Seems like a solid method, but I haven't tried it yet.

I think the key thing is that it is *much* quicker to skim though english comments and quickly find the line of code you need. Otherwise you have to basically read and understand whole blocks of code, made harder when the original coder does unorthodox things, or you have a bunch of cryptic variable names. Comments help a whole lot in those cases.

_________________
Image


Fri Mar 02, 2012 10:16 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
wired: I just meant that Basic is closer to English then C# but still Basic code is harder to read just for that it IS close to a real language (They even made a Swedish version of the language, horrible :D)

cyber: Well, blocks of code are never good, refactor them into classes or methods ;) If you need comments put them in the method or class header using 3 /// Then it will be readable from code completion... In well structured code its never hard to find the right place because he only looks on the flow of the code (calls for method and objects) and when he do find the place of interest he only needs to look at the code for that part, nice and easy, without the use of too much comments :P

By the way, you guys do not need to feel afraid to commit Plugins to FreePIE i wont bash you for not coding like I want :P


Sat Mar 03, 2012 4:51 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
Neither FreePIE or GlovePIE seems able to send TrackIR commands to Grid Race Driver, but Freetrack can.
For Future pinball all 3 works.. Any ideas?


Thu Mar 22, 2012 11:30 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
CyberVillain wrote:
Neither FreePIE or GlovePIE seems able to send TrackIR commands to Grid Race Driver, but Freetrack can.
For Future pinball all 3 works.. Any ideas?


Anyone good at Delphi wanna give a crack at porting Freetrack TrackIR emulator to C#?

http://dl.dropbox.com/u/33026505/FreeTrack.rar


Thu Mar 22, 2012 11:55 am
Profile
Golden Eyed Wiseman! (or woman!)

Joined: Fri Jul 08, 2011 11:47 pm
Posts: 1235
Quote:
Neither FreePIE or GlovePIE seems able to send TrackIR commands to Grid Race Driver, but Freetrack can.
For Future pinball all 3 works.. Any ideas?


Does FaceTrackNOIR work for sending commands to Grid Race Driver?


Thu Mar 22, 2012 5:59 pm
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
WiredEarp wrote:
Quote:
Neither FreePIE or GlovePIE seems able to send TrackIR commands to Grid Race Driver, but Freetrack can.
For Future pinball all 3 works.. Any ideas?


Does FaceTrackNOIR work for sending commands to Grid Race Driver?


Nope, if it did it would mean I had missed something in my port ;)


Fri Mar 23, 2012 2:09 am
Profile
Petrif-Eyed
User avatar

Joined: Sat Sep 17, 2011 9:23 pm
Posts: 2081
Location: Irvine, CA
:roll:


Sat Oct 27, 2012 7:23 am
Profile
3D Angel Eyes (Moderator)
User avatar

Joined: Sat Apr 12, 2008 8:18 pm
Posts: 10155
brantlew wrote:
:roll:

The spammer is now gone. :D

_________________
Image


Sat Oct 27, 2012 2:19 pm
Profile
One Eyed Hopeful

Joined: Mon Nov 12, 2012 12:45 am
Posts: 1
FreePie is good choice i vote for FreePIE dapfor. com


Mon Nov 12, 2012 1:00 am
Profile
Certif-Eyable!

Joined: Mon Jun 22, 2009 8:36 am
Posts: 1036
Location: Stockholm, Sweden
What did I miss? :)


Mon Nov 12, 2012 12:11 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 180 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by STSoftware.