Development

Official forum for open source FreePIE discussion and development.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Development

Post by CyberVillain »

To avoid cluttering the General Thread, general discussion about dev goes here!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Brantlew, intellisense is coming along nicely, would be nice with full WiiMote support in next release, is it any showstoppers with tracking Yaw, Roll, Pitch?
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: Development

Post by brantlew »

Probably not too difficult, but I have very little free time recently. I will need to upgrade from WiimoteLib 1.7 to WiimoteLib 1.8 beta in order to gain access to the WiimotePlus gyroscopic data. Otherwise the values will be very inaccurate and useless. Not sure when I will add this. I usually add FreePIE features when I need them for my other projects, so I may add XBox 360 gamepad support first.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

brantlew wrote:Probably not too difficult, but I have very little free time recently. I will need to upgrade from WiimoteLib 1.7 to WiimoteLib 1.8 beta in order to gain access to the WiimotePlus gyroscopic data. Otherwise the values will be very inaccurate and useless. Not sure when I will add this. I usually add FreePIE features when I need them for my other projects, so I may add XBox 360 gamepad support first.
I've used SlimDX for joysticks/gamepads, works very well, the 360 is a standard DirectX device right?
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: Development

Post by brantlew »

Yes, gamepad support should be easy through the SlimDX library and XInput
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

brantlew wrote:Yes, gamepad support should be easy through the SlimDX library and XInput
I can look into it this weekend, maybe, lots of stuff todo..

What we also need is ppJoy emulation
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

btw, I added you as contributor, do you have access to change wikis and stuff?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Do we have anyone with Delphi knowledge here on the forum?
The Freetrack emulation of TrackIR is the one that works with the most titles so would be nice to use that code, but I cant find any code that looks like actual implementation :D
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Just added ppJoy support, no binary yet...
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Fixed so that plugin globals can use their actual Enms and not int's
This better in alot of ways, but why I did it was for the upcoming codecompletion, bool getKeyDown(int key) is no help for the user, but bool getKeyDown(Key key) is :P
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Must have been drunk or something when I tried to get properties to work with Lua, now it works!
Changed all plugins to use Properties where it applied
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

I added a help file system to FreePIE, all you need todo to get a help file for a specific plugin is to add a .rtf document to the Help folder under FreePIE.Core.Plugins, it will be copied to the outputfolder

Its important that you name it exactly like the type of the plugin
User avatar
mahler
Sharp Eyed Eagle!
Posts: 401
Joined: Tue Aug 21, 2012 6:51 am

Re: Development

Post by mahler »

Has anybody tried to open the full solution into Visual Studio 2012 (Compatibility) yet?
I just tried it and get a migration report with the following error
FreePIE.Setup
Message
FreePIE.Setup\FreePIE.Setup.vdproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=123 ... A0C9A8B90C
I am able to run it though, but the project FreePIE.Setup won't open.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

mahler wrote:Has anybody tried to open the full solution into Visual Studio 2012 (Compatibility) yet?
I just tried it and get a migration report with the following error
FreePIE.Setup
Message
FreePIE.Setup\FreePIE.Setup.vdproj: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?prd=123 ... A0C9A8B90C
I am able to run it though, but the project FreePIE.Setup won't open.

Hmm looks like they have made the old framework for Setup programs obsolete. I have 2012 installed but I choose not to convert since they are team members that do not own a MSDN license. If everyone is OK with 2012 I can migrate the project to 2012
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: Development

Post by CyberRascal »

Can I recommend the wix toolset for the installer? Have you considered it before? I've used it before, pretty easy to use.

http://wixtoolset.org/
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

CyberRascal wrote:Can I recommend the wix toolset for the installer? Have you considered it before? I've used it before, pretty easy to use.

http://wixtoolset.org/
From what I gather they have a new tool built in to 2012 that will take over from Visual Studio setup projects.

I use WIX at work to deploy our system to test and production env, but it might be overkill for a client app like this :D

edit: Nope, looks like they have totaly removed setup tools in 2012
User avatar
mahler
Sharp Eyed Eagle!
Posts: 401
Joined: Tue Aug 21, 2012 6:51 am

Re: Development

Post by mahler »

I think I'll be able to have the code for the Android-plugin tonight, but I'd like to test it myself in FreePIE, unfortunately I couldn't find documentation on how to include the Plugin-file into FreePIE. Should I include it in the source and build it? Or can I add it to the installation?
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: Development

Post by CyberRascal »

I won't swear to it, but I think that if you've implemented the plugin using the correct interfaces, you can just put the compiled dll in the plugin folder (in the freepie folder) and it should be available in FreePIE.. The code completion should kick in and show confirm that the plugin has been imported if you write the first letter or two (in the GUI).
User avatar
mahler
Sharp Eyed Eagle!
Posts: 401
Joined: Tue Aug 21, 2012 6:51 am

Re: Development

Post by mahler »

CyberVillain wrote:
CyberRascal wrote:Can I recommend the wix toolset for the installer? Have you considered it before? I've used it before, pretty easy to use.
http://wixtoolset.org/
From what I gather they have a new tool built in to 2012 that will take over from Visual Studio setup projects.
edit: Nope, looks like they have totaly removed setup tools in 2012
They recommend installing the free "InstallShield Limited Edition"
http://msdn.microsoft.com/en-us/library/2kt85ked(v=vs.110).aspx?lc=1033

All you have to do is follow the steps on that website
In Visual Studio 2012 wrote:
  • 1. On the menu bar, choose File, New, Project.
    2. Expand the Other Project Types node.
    3. Expand the Setup and Deployment node.
    4. Choose Enable InstallShield Limited Edition, and then choose the OK button.
    5. Choose the Download Now link.
It then takes you to the InstallShield website. If you register with a valid e-mail address, a free license key will be sent to you.
You can there download the software, install it on your machine. And after you restart Visual Studio, you can create a setup-project.

Note: Above the direct download link it says "InstallShield Limited Edition Download For Visual Studio 2010 and 2012" ...
So I'm assuming that if you use Visual Studio 2010 you can skip the steps and go directly to the InstallShield website mentioned above.
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Not sure if this is the right thread for bug reports, but owell theres some development ideas in here too.

While using the software, the intellisense thing is to the left half out side of the program window, not sure if thats designed that way or not, but thought id mention it.
With that, the scrollbar on the intellisense causes the program to crash whenever i click on it, i can use the mouse scroll wheel to select an item, but cant clicking on the scroll bar with the mouse.

With the output, have you though of how your going to fix that up?
One idea i had was to initialize an array of about 100 as the program starts up, then from there any diagnostics.debug commands will get added to the next free array spot.
When the array is full you pop one off the front, and add the new one to the end.
That way it always says at 100.

From there you just print all 100 array elements when you update the output.
This way you may add 2 - 5 debug commands in one output update command, so it shouldnt slow the program down as the input and output are different.

This way you might be able to print out raw sensor data and watch it change without the debug area getting overwhelmed.

Is it possible to have a clear on the output and error message box? If there is one i may have just missed it.
And is it possible to have line numbers on the error messages? Being told that you have an indent problem, but no idea where isnt much fun.

Last thing, is there away to import files from the local directory? Standard import x or from x import y dont work for files in the same directory as the user created script.
While playing around i had to put a file into the pylib directory, but any time i changed the file, i had to restart the whole program so the changes took effect.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

About the bug could you please add a screenshot? I will look into the other stuff you mentioned. Nice finding.

about the python libs, we only load them the first time, we could fix so they reload if files have changed.
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Pic added.
i should add i do have python 2.6 installed and in my %Path% listing.

The pylibs isnt a big deal, i doubt many people will change those files once there installed
You do not have the required permissions to view the files attached to this post.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Lol, that looks strange, what steps do I need todo to reproduce the bug?
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Its happened like that ever since i first loaded it up.

All i do, load up the program, hit d or any letter thats got something assigned to it, and it shows up over there.

Just thought it might be a dual screen issue, but does the same thing on all my screens

Maybe it's something else i have installed. I might have a look at getting the source and compiling it myself to see if that changes it at some point, but that might not be for a while.
It just looks weird, it dosent stop functionality.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Very strange, I have tested it with multiple screen without problem, do you get the same result in fullscreen mode?

Whats your screen res and DPI settings in windows?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

If i change DPI i get the same behaviour, but i cant get it to crash when clicking on the item

edit: The crash and the dropdown dislocation are not related, it always crashes when scrolling. The dislocation of the dropdown as nothing todo with DPI if the Code completion window cant fit to the right (end of screen) it will be forced to be moved to the left.

Will start with the crashing bug
You do not have the required permissions to view the files attached to this post.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Commited a fix for the crash bug to Github. About the window postion, Visual Studio actually works the same if the dropdown does not have enough space to the right it will render outside of the window so I will keep it like this since we aim to have a similar CC to VS
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

With the intellisense, that screenshot was the very left edge of my screen. The program is no where near the right hand side.
My screens are at 96 dpi, 1920x1080
Windows 7 64bit if that matters.

Just installed it on my Win 7 32bit tablet and it does exactly the same thing, thats running at 120 dpi 1366x768
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

StreetRat wrote:With the intellisense, that screenshot was the very left edge of my screen. The program is no where near the right hand side.
My screens are at 96 dpi, 1920x1080
Windows 7 64bit if that matters.

Just installed it on my Win 7 32bit tablet and it does exactly the same thing, thats running at 120 dpi 1366x768
Do you by any chance have access and knowledge about Visual studio? Since we cant reproduce your bug its very hard to find out whats causing it
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

I have VB, C#, and VC++ express 2010 installed and i understand most languages to a certain degree, so i can have a look at it to see what the problem is.
Might not be for a few days to a week or 2 though.

If im the only one suffering from the bug then its not a big deal, the functionality is still there.
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: Development

Post by CyberRascal »

Regarding the positioning of the code completion window:

I'd put a breakpoint inside Gui.CodeCompletion/Event/Action/PositionAction, inside the function Handle, and check what happens there. That is where the position is calculated and set. I don't know if it's the positioning code that is wrong, on the calculation that returns the wrong value though.

Cheers :)
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Thanks for giving me somewhere to start CyberRascal.

Not sure if this is much help or not, but in the PositionAction.cs page inside Handle function the Rect rect = view.Target.GetVisualPosition(); line is returning a width of 1.0. The X, Y and height all seem to be ok, just the Width is always 1.0, not sure if thats meant to be that or not.

If i add rect.width = 400 before the view.PlacementRectangle line then everything works as it should.
400 being the width of the intellisense popup.

I cant seem to find any code for textArea.Caret.CalculateCaretRectangle() that GetVisualPosition() calls so i cant see why its returning 1 for the width when the others are ok.

Ive only spent about an hour looking though the small part, and have no real idea what im doing, so where would i go to look to see why view.target.GetVisualPosition is returning 1 instead of what its meant to? Or is it meant to return 1 and i have a problem else where?

I have noticed as i type across the page the intellisense does move, but the top right hand corner is under the letter, not the top left corner
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

i Get rect.Width == 1 too and it works for me, but I will let CyberRascal answer because he's the designer behind the CC window
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: Development

Post by CyberRascal »

I'm the one who should be thanking you :) would be hard to solve this bug without your help.

GetVisualPosition returns the position and size of the caret, so a width of 1 seems reasonable. Only the X/Y should be applicable when setting the placement, since the value of the Placement variable I talk about below is 'Bottom' currently (it adds/subtracts the height of the GetVisualPosition value to place it below the caret.

Since the popup moves with the caret, the code is probably working correctly, but the PlacementRectangle that is being set is used incorrectly by the WPF framework (which is the rendering engine we use). If you check the file CompletionPopupView.xaml.cs you should see a line of code close to the top that says

Code: Select all

Placement="Bottom"
Try to change to other values (intellisense will tell you the valid ones if you press Ctrl-Space). I'd recommend trying Relative, or Absolute for kicks. You should at least be able to change the behaviour, and hopefully one of the values will give you the right one. Please let me know if you manage to get it working :)
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Just to be absolutely sure were working with the right values from the start, using the following debug string in CalculatePoint function in PositionAction.cs just before the return i get the following
Debug.Print(rect.X.ToString() + " - " + scroll.HorizontalOffset.ToString() + ", " + rect.Y.ToString() + " - " + scroll.VerticalOffset.ToString() + " + 1");

X - hOffset, Y - vOffset + 1

7.33 - 0, 2.28 - 0 + 1 - First Character top line
14.66 - 0, 2.28 - 0 + 1 - Second Character top line
21.99 - 0, 2.28 - 0 + 1 - Third Character top line
29.32 - 0, 2.28 - 0 + 1 - Forth Character top line

7.33 - 0, 17.8933333333333 - 0 + 1 - First Character second line
14.66 - 0, 17.8933333333333 - 0 + 1 - Second Character second line
21.99 - 0, 17.8933333333333 - 0 + 1 - Third Character second line
29.32 - 0, 17.8933333333333 - 0 + 1 - Forth Character second line

Everything scrolls accordingly with the scrollbars, so it just seems for some reason my pc uses the right hand side instead of the left hand side of the popup

With the CompletionPopupView.xaml page, Absolute works as expected, puts the popup in the top left hand corner of the primary screen at 0.0
Left, Right, Bottom, Center are in the image.
Relative and Mouse align using the right hand side instead of the left as well.
You do not have the required permissions to view the files attached to this post.
CyberRascal
Two Eyed Hopeful
Posts: 74
Joined: Fri Sep 21, 2012 4:46 am

Re: Development

Post by CyberRascal »

That's extremely weird. Looks like the values are correct (it follows the cursor after all, just in different ways), but the behaviour for right/left is inverted - when you set it to Right, the popup is displayed to the left, and vice versa.

On my computer, and that of CyberVillain, it works as expected. Right causes the popup to be displayed to the right of the assigned area.

You wouldn't happen to have any interesting configurations on your computer, such as... I don't know, some globalization options like japanese/chinese (displays text right to left?)

I'll try to figure out what could cause something like this by reading the MS docs etc, but it seems weird...
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

StreetRat i committed some changes to the Console window, please try it out.
To clear the window Right click in it and select "Clear"
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

On this computer it might be because something is installed, but my slate is a very basic Win7 setup so it has very little on.
Theres not much the same between the two.
If you have any ideas though, id be happy to check them out.

The console works much better than before, although it does start to get very slow after a little while.

Running a simple bit of code:

if starting:
*** counter = 0
counter += 1
diagnostics.debug("Hello World " + str(counter))

(*** = formating)

after 30 seconds or so, the update started to take a second. And even after a clear it dosent speed up again.
The background on the popup copy/clear box isnt set either. looks odd if you click over text or close to the edge of the screen.

Im not sure how you have it set up, but at the moment, it seems to be printing every 100 and jumping per 100 rather than constantly printing everything limited to 100 items.

Also, just another quick thing, is it possible to have the console/error/watch window left/right docked rather than bottom?
I use debug windows alot and have this problem with fighting between code windows and debug windows, so to have the two side by side rather than top bottom works very well on widescreen monitors.
Its only a minor annoyance so if theres more important things to work on i understand :)
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Development

Post by CyberVillain »

Changed the code a bit please try it out, it now keeps 1000 lines in the console and removes the old ones at the end as new ones come in.
Might fix the slow down for you, but i didnt notice any slowdown on my laptop. Also, have you checked out the watch feature? It very often better to use than the console window. It updates to a grid in realtime instead of the lag you get with debug window.

About the background, good catch missed that one, the silly thing is that I couldnt solve it :D If I got the background the white border dissaperad and vice versa. Some times I reallt hate styling in WPF, I would love a WPF guru on the team. Will look at it some more later.

About the docking, we dont have any Visual Studio style docking library, and as far as I know the free ones are crap. But if you find a stable one please let us know.
StreetRat
Two Eyed Hopeful
Posts: 65
Joined: Sun Oct 24, 2010 11:11 pm

Re: Development

Post by StreetRat »

Awesome
Just changed the WorkerDoWork Thread.Sleep in ConsoleViewModel.cs to 10 instead of 500 and the consoleStack.Count to > 500 instead of 1000 and its incredible.

I admit i hadnt used the watch function until just then, but i prefer the debug printout. Dont know why i just enjoy seeing a history of the numbers changing.
But now the debug works just as well as the watch.

In regards to the docking, i didnt mean anything as advanced as the C# IDE thing where you can remove pages and put them in different spots.
Just a simple menu thing that says
Dock
-- Top
-- Bottom
-- Left
-- Right
and the text area and console change accordingly. It wouldent be a problem if it only took effect on a restart

Is it possible to also have the tab key as part of the auto complete for the intellisense popup?

With the clear popup box, couldn't you add another blank box behind it that does exactly what the first one does with the same dimensions? That way it has no border and a set background, where the top one has the border set and no background. Might be a little overkill for such a small thing though.
Post Reply

Return to “FreePIE”