Search Results

Search found 10 results on 1 pages for 'goneale'.

Page 1/1 | 1 

  • Create indefinitely oscillating pendulum in Farseer Physics 3.3.1/Box2d

    - by GONeale
    I am new to Farseer Physics and using version 3.3.1. I am after some help and would even be happy to receive Box2d answers just to ensure I get a response as I should then be able to convert it! -- Thanks ...After a lot of tinkering around I have managed to produce a thin vertical rectangle shape on the screen and I wish this to swing back and forth pinned at the top up to an angle I set (90 degrees would be fine for this sample). When it is approaching the top I wish it to slow down, then fall back the way it just came, increase speed then obviously slow to a stop at the top again. Almost how a swinging pirate ship would work at a theme park. This is the code I have so far which swings the shape, but it is seeming to lose speed on each swing eventually grinding to a halt: float playerWidth = ConvertUnits.ToSimUnits(5), playerHeight = ConvertUnits.ToSimUnits(68); playerPosition = ConvertUnits.ToSimUnits(-350, 0); playerBody = BodyFactory.CreateRectangle(World, playerWidth, playerHeight, 2f, playerPosition); playerBody.BodyType = BodyType.Dynamic; // create player sprite based on player body _rectangleSprite = new Sprite(ScreenManager.Assets.TextureFromShape(playerBody.FixtureList[0].Shape, MaterialType.Player, Color.Orange, 1f)); // Create swinging joint var joint = JointFactory.CreateFixedRevoluteJoint(World, playerBody, ConvertUnits.ToSimUnits(0, -34), playerBody.Position); If somebody could also provide the command I would need to pause the shape on a mouse click or keyboard command at it's current angle and then continue when I let go of the mouse click that would be super fantastic! (I actually posted this on StackOverflow as well before I realised there was a dedicated game development forum) Cheers

    Read the article

  • "Run As Administrator" on program right click failing and not launching program

    - by GONeale
    This problem lies within a relatively fresh x64 Windows 7 install ~4 weeks, but is also a problem I have seen on Windows Vista machines (x86 versions). Since the other day, any programs attempted to be launched via right clicking on a shortcut (.lnk)'s context menu and pressing - "Run As Administrator" for instance, in the Quick Launch/Jump List in Windows 7 has failed, screen has not dimmed, no UAC popup. In fact the program does not even load. There is no way around this unless I use the shortcut version from "All Programs" which appears to work, very strange? I have performed no major software installs, nothing out of the ordinary. Has anybody encountered this or know what would be causing it? Here's an example of somebody else experiencing this problem in Vista with no solution: http://www.vistax64.com/vista-general/131918-strange-run-administrator-problem.html and I believe this problem is related, I also cannot right click - "Manage" on my computer): http://windows7forums.com/windows-7-support/5501-run-administrator-broken.html I am running the latest version of Avira AntiVir Virus Scanner and pretty concious of what I download, I don't think it is a virus, nor do I believe it is due to the RC Version of Windows 7, because I have seen the problem across multiple Operating Systems versions. Thanks guys.

    Read the article

  • What software license to use for commercial software?

    - by GONeale
    Hey there, Under what license agreement should you release software under if it's closed-source and for commercial use only? Are there multiple license types? (such with open source you have BSD, GNU/GPL etc..) If so, which one do I choose, and are there samples out there to get you started? I have heard the term and seen documents named EULA.txt for an End User License Agreement, but can't seem to find a definitive guide on the net as to how to structure one but do see this included with nearly every commercial app I have installed and don't know if it's as simple just to "change to suit your business". Can anyone shed some more light on this? Thanks guys. For further details - our software is non-redistributable, non-modifiable and the user is charged yearly.

    Read the article

  • cannot convert 'b2PolygonShape' to 'objc_object*' in argument passing

    - by GONeale
    Hey there, I am not sure if many of you are familiar with the box2d physics engine, but I am using it within cocos2d and objective c. This more or less could be a general objective-c question though, I am performing this: NSMutableArray *allShapes = [[NSMutableArray array] retain]; b2PolygonShape shape; .. .. [allShapes addObject:shape]; and receiving this error on the addObject definition on build: cannot convert 'b2PolygonShape' to 'objc_object*' in argument passing So more or less I guess I want to know how to add a b2PolygonShape to a mutable array. b2PolygonShape appears to just be a class, not a struct or anything like that. The closest thing I could find on google to which I think could do this is described as 'encapsulating the b2PolygonShape as an NSObject and then add that to the array', but not sure the best way to do this, however I would have thought this object should add using addObject, as some of my other instantiated class objects add to arrays fine. Is this all because b2PolygonShape does not inherit NSObject at it's root? Thanks

    Read the article

  • List of objects sent over WCF, but null list received?

    - by GONeale
    Hey there, I have an object containing a list of custom objects which I am returning over a response in WCF, however on the receiving end, the list is null? But it contains 112 objects just prior to stepping out of the service on the server. This wasn't always the case, I have seen it return a list. I've just recently upgraded it to use NET TCP bindings, but I can't confirm when I started losing the data or if it was since the conversion from wsHttpBinding to netTcpBinding as it moved along with about four other services. I have looked on the WCF Service messages and trace file and also the WCF client's messages and trace file, no exceptions reported, and both message logs indicate they are sending the List<T> and for client, receiving the list - very frustrating! It's not a super light array, but not huge either, around 100KB. it has about 12 properties each and as stated 112 items are being sent. I have tried everything I can think of on client and server, note: Client: this.binding = new NetTcpBinding(SecurityMode.None) { MaxReceivedMessageSize = int.MaxValue, ReaderQuotas = { MaxStringContentLength = int.MaxValue, MaxArrayLength = int.MaxValue } }; ... Server app.config (sorry I have no idea if the quota settings have any bearing on net tcp? I only just added it similar to what I use for wsHttpBinding to test, but still list is null): <netTcpBinding> <binding name="SecurityByNetTcpTransportBinding" sendTimeout="00:03:00" maxReceivedMessageSize="2147483647"> <readerQuotas maxStringContentLength="2147483647" maxArrayLength="2147483647" /> <security mode="None" /> </binding> </netTcpBinding> and something else I tried in my net tcp binding behavior: <dataContractSerializer maxItemsInObjectGraph="2147483647" /> <serviceTimeouts transactionTimeout="05:05:00" /> <serviceThrottling maxConcurrentSessions="400" maxConcurrentInstances="400" maxConcurrentCalls="400"/> I hope somebody can help, I hate 5 steps forward 3 steps backward which always seems to be the case with WCF :P In the interim until I [hopefully] get a response I will now try reducing this array just to see if it's a sizing issue.. Ok, It seems I have bigger problems. Because the list was the only thing I was sending, I thought it was an array issue. I am even setting an int to "25" and it's coming back as 0 - Anybody? I know I must have done something obviously stupid.

    Read the article

  • Box2d Documentation - Outdated, any better api refs?

    - by GONeale
    Hi guys, I am working with cocos2d + box2d and as I look through the 'Hello World' tutorial and attempt others I am finding many constructs which do not seem to be documented in the latest api ref. Would anybody be able to shed some light on what's going on? or point me in the right direction to someone who has covered the new constructs such as b2PolygonDef changing to b2PolygonShape and likewise for circle + who knows what else, seems there has not been any doc updates since August '09. This is the only information I could find on the issue, of another user stating they have found many mismatches also. http://www.cocos2d-iphone.org/forum/topic/1683

    Read the article

  • Calculate total batch upload transfer percent with limited information

    - by GONeale
    Hi there, I have a system which uploads to a server file by file and displays a progress bar on file upload progress, then underneath a second progress bar which I want to indicate percentage of batch complete across all files queued to upload. Information and algorithms I can work out are: Bytes Sent / Total Bytes To Send = First progress bar (eg. 512KB of 1024KB (50%)) That works fine. However supposing I have two other files left to upload, but both file sizes are unknown (as this is only known once the file is about to commence upload, at which point it is compressed and file size is determined) how would I go about making my third progress bar? I didn't think this would be possible as I would need "Total Bytes Sent" / "Total Bytes To Send", to replicate the logic of my first progress bar on a larger scale, however I did get a version working: "Current file number we are on" / "total number of files to send" returning the percentage through the batch, however obviously will not incrementally update and it's pretty crude. So on further thinking I thought if I could incorporate the current file % with this algorithm I could perhaps get the correct progress percentage of my batch's current point. I tried this algorithm, but alas to no such avail (sorry to any math heads, it's probably quite apparent why it won't work) ("Current file number we are on" / "total number of files to send") * ("Bytes Sent" / "Total Bytes To Send") For example I thought I was on the right track when testing with this example: 2/3 (2nd of 3rd file) = 66% (this is right so far) but then when I added * 0.20 (for indicating only 20% of 2nd file has uploaded) we went back to 13%. What I need is only a little over 33%! I did try the inverse at 0.80 and a (2/3 * (2/3 * 0.2)) Can this be done without knowing entire bytes in batch to upload? Please help! Thank you!

    Read the article

  • Duplicate LINQ to SQL entity / record?

    - by GONeale
    Hi guys, What would be considered the best practice in duplicating [cloning] a LINQ to SQL entity resulting in a new record in the database? The context is that I wish to make a duplicate function for records in a grid of an admin. website and after trying a few things and the obvious, read data, alter ID=0, change name, submitChanges(), and hitting an exception, lol. I thought I might stop and ask an expert. I wish to start with first reading the record, altering the name by prefixing with "Copy Of " and then saving as a new record.

    Read the article

  • Casting to derived type problem in C++

    - by GONeale
    Hey there everyone, I am quite new to C++, but have worked with C# for years, however it is not helping me here! :) My problem: I have an Actor class which Ball and Peg both derive from on an objective-c iphone game I am working on. As I am testing for collision, I wish to set an instance of Ball and Peg appropriately depending on the actual runtime type of actorA or actorB. My code that tests this as follows: // Actors that collided Actor *actorA = (Actor*) bodyA->GetUserData(); Actor *actorB = (Actor*) bodyB->GetUserData(); Ball* ball; Peg* peg; if (static_cast<Ball*> (actorA)) { // true ball = static_cast<Ball*> (actorA); } else if (static_cast<Ball*> (actorB)) { ball = static_cast<Ball*> (actorB); } if (static_cast<Peg*> (actorA)) { // also true?! peg = static_cast<Peg*> (actorA); } else if (static_cast<Peg*> (actorB)) { peg = static_cast<Peg*> (actorB); } if (peg != NULL) { [peg hitByBall]; } Once ball and peg are set, I then proceed to run the hitByBall method (objective c). Where my problem really lies is in the casting procedurel Ball casts fine from actorA; the first if (static_cast<>) statement steps in and sets the ball pointer appropriately. The second step is to assign the appropriate type to peg. I know peg should be a Peg type and I previously know it will be actorB, however at runtime, detecting the types, I was surprised to find actually the third if (static_cast<>) statement stepped in and set this, this if statement was to check if actorA was a Peg, which we already know actorA is a Ball! Why would it have stepped here and not in the fourth if statement? The only thing I can assume is how casting works differently from c# and that is it finds that actorA which is actually of type Ball derives from Actor and then it found when static_cast<Peg*> (actorA) is performed it found Peg derives from Actor too, so this is a valid test? This could all come down to how I have misunderstood the use of static_cast. How can I achieve what I need? :) I'm really uneasy about what feels to me like a long winded brute-casting attempt here with a ton of ridiculous if statements. I'm sure there is a more elegant way to achieve a simple cast to Peg and cast to Ball dependent on actual type held in actorA and actorB. Hope someone out there can help! :) Thanks a lot.

    Read the article

  • Set value of textarea in jquery

    - by GONeale
    I am attempting to set a value in a textarea field using jquery with the following code: $("textarea#ExampleMessage").attr("value", result.exampleMessage); The issue is, once this code executes, it is not altering the text in the textarea? However when performing an alert($("textarea#ExampleMessage").attr("value")) the newly set value is returned?

    Read the article

1