• What do you need help with? Version 1
    5,001 replies, posted
I could in theory do that - but it'd involve me downloading and setting up both Wine and Steam. And again, can't you just handle the said exceptions by yourself? Your Catch block simply prints out the exception. Make a specialized catch block for those two exceptions and there handle the cleanup of the connection if it's abruptly closed.
[B][del]I am requesting a VB .NET guru who understands networking and Winsock.[/del][/B][del] [B]Urgent request[/B][/del] Don't worry I fixed it.
does any one have a clue why Getforegroundwindow returns a null value in xp and vista causing it to overflow? (in visual basic 2008 ) Private Function GetActiveWindowTitle() As String Dim Str As String = New String(Chr(0), 100) GetWindowText(GetForegroundWindow, Str, 100) 'i get an overflow here Str = Str.Substring(0, InStr(Str, Chr(0)) - 1) Return Str End Function i have done some research and found nothing that helps me though i suspect something to do with active desktop window or something like that,...
[QUOTE=Bull_Frog;23847567]does any one have a clue why Getforegroundwindow returns a null value in xp and vista causing it to overflow? (in visual basic 2008 ) Private Function GetActiveWindowTitle() As String Dim Str As String = New String(Chr(0), 100) GetWindowText(GetForegroundWindow, Str, 100) 'i get an overflow here Str = Str.Substring(0, InStr(Str, Chr(0)) - 1) Return Str End Function i have done some research and found nothing that helps me though i suspect something to do with active desktop window or something like that,...[/QUOTE] Isn't it a function, so you need to call it with () after? E.g. GetWindowText(GetForegroundWindow(), Str, 100)
[QUOTE=Socram;23841484]Did you read my post? Try it.[/QUOTE] Skipped over that part by accident. Try to be kinder when you're asking for help.
[QUOTE=Funcoot;23850927]Skipped over that part by accident. Try to be kinder when you're asking for help.[/QUOTE] You're right I'm sorry. I suppose I am just cranky. I guess I will just stick with Love, it doesn't seem too bad.
How do I check if a falling object ( Y = Y + 5 every frame is gonna 'overlap' the floor? I want it to land exactly on the floor's top.
[QUOTE=SupahVee;23854351]How do I check if a falling object ( Y = Y + 5 every frame is gonna 'overlap' the floor? I want it to land exactly on the floor's top.[/QUOTE] [code] Y = Y + 5 if (Y > FloorY) { Y = FloorY } [/code] ?
My previous problem with resizing my array has not been solved. I thought that a vector would work, but it doesn't because the array is that of a class. How do I increase the class array? I made a class for tiles. I also declared the minimum amount of tiles that there could possible be at the deceleration of the class. How can I add more tiles to that already declared array of tiles?
[QUOTE=ralle105;23855093][code] Y = Y + 5 if (Y > FloorY) { Y = FloorY } [/code]?[/QUOTE] I don't know the Y of the Floor (or the Floor itself) the entity will land on.
[QUOTE=ralle105;23855093][code] Y = Y + 5 if (Y > FloorY) { Y = FloorY } [/code] ?[/QUOTE] I'd do [code] if(Y >= FloorY) { Y = FloorY } [/code] However, take into account that in some / most libraries the Y position is taken from the top left corner of the bounding box (Providing it's in 2D)
Is there any easy way to implement a cancel-able background worker? I have a lot of functions between classes that take 5-20 seconds that are executed in the background worker. Along with a blocking call.
[QUOTE=SupahVee;23855670]I don't know the Y of the Floor (or the Floor itself) the entity will land on.[/QUOTE] Well you must be storing the floors somewhere. Iterate them and test each one for overlapping.
Actually I think ill make my own background worker. With the way .net is designed (garbage collection). It would probably be easier to terminate the thread and raise a canceled event.
Is this a good structure for a Lua game engine? [lua]function GAME:Config( cfg ) cfg.Title = "Test game" cfg.Width = 800 cfg.Height = 600 return cfg end function GAME:Initialize() end function GAME:Update( deltatime ) end function GAME:Draw() render.Clear() render.Present() end function GAME:Unload() end[/lua]
[QUOTE=Overv;23859609]Is this a good structure for a Lua game engine? [lua]function GAME:Config( cfg ) cfg.Title = "Test game" cfg.Width = 800 cfg.Height = 600 return cfg end function GAME:Initialize() end function GAME:Update( deltatime ) end function GAME:Draw() render.Clear() render.Present() end function GAME:Unload() end[/lua][/QUOTE] Seems like pretty traditional logic.
Is there any way to clear The ram of à iPod/pad in objective C? Becous it clears the ram if you reboot the device. but is there any way of doing it in objective C?
[QUOTE=Mega1mpact;23864235]Is there any way to clear The ram of à iPod/pad in objective C? Becous it clears the ram if you reboot the device. but is there any way of doing it in objective C?[/QUOTE] Quick answer with no real knowledge of ipod/pad but with some common sense. No.
[QUOTE=Mega1mpact;23864235]Is there any way to clear The ram of à iPod/pad in objective C? Becous it clears the ram if you reboot the device. but is there any way of doing it in objective C?[/QUOTE] Please learn to spell unless you have ESL.
[QUOTE=Mega1mpact;23864235]Is there any way to clear The ram of à iPod/pad in objective C? Becous it clears the ram if you reboot the device. but is there any way of doing it in objective C?[/QUOTE] There is apps that do that, at least I know there is if you jailbreak it... of course that doesn't really answer you question now does it.
I don't want to jailbreak becous i will lose my Apple dev status. :(
[QUOTE=Mega1mpact;23864235]Is there any way to clear The ram of à iPod/pad in objective C? Becous it clears the ram if you reboot the device. but is there any way of doing it in objective C?[/QUOTE] Uh what. You want to remove everything in memory? You need to execute your functions in kernel space, then. :P
Hey, does anyone know how I can move a rectangle out of another intersecting rectangle? I asked on Stack Overflow and someone posted this: [cpp] Rectangle rectangle1 = new Rectangle(160, 50, 50, 150); Rectangle rectangle2 = new Rectangle(MousePos.X, MousePos.Y, 110, 20); if (rectangle1.IntersectsWith(rectangle2)) { if (rectangle1.Y + rectangle1.Height - rectangle2.Y < rectangle1.X + rectangle1.Width - rectangle2.X) rectangle2.Y = rectangle1.Y + rectangle1.Height; else rectangle2.X = rectangle1.X + rectangle1.Width; }[/cpp] ...but that only works if B is to the right and/or beneath of A. Any help here? [editline]12:33PM[/editline] I'm using C# by the way.
[QUOTE=Ali;23848604]Isn't it a function, so you need to call it with () after? E.g. GetWindowText(GetForegroundWindow(), Str, 100)[/QUOTE] Changing that did nothing, it still dose the exact same overflow,... EDITED: Ok sorry, its now not getting an overflow, although on 32 bit systems the window will not parent to a panel , it just flashes and dose not change parent,. Fixed ,, nevermind...
I'm attempting to make a simple drawing program, but whatever library I am using seems to be too slow to draw a circle at every point when the mouse moves, so I'm thinking I will need to get the last mouse point since last render, and the current mouse point this render, and draw a circle at every point in between (whole integer). Anyone able to show me how to apply this in C++?
[QUOTE=Dlaor-guy;23867021]Hey, does anyone know how I can move a rectangle out of another intersecting rectangle? I asked on Stack Overflow and someone posted this: -snip- ...but that only works if B is to the right and/or beneath of A. Any help here? [editline]12:33PM[/editline] I'm using C# by the way.[/QUOTE] [cpp] Rectangle rectangle1 = new Rectangle(160, 50, 50, 150); Rectangle rectangle2 = new Rectangle(MousePos.X, MousePos.Y, 110, 20); if (rectangle1.IntersectsWith(rectangle2)) { // vvv if (abs(rectangle1.Y + rectangle1.Height - rectangle2.Y) < abs(rectangle1.X + rectangle1.Width - rectangle2.X)) rectangle2.Y = rectangle1.Y + rectangle1.Height; else rectangle2.X = rectangle1.X + rectangle1.Width; }[/cpp]
[QUOTE=ralle105;23868293][cpp] Rectangle rectangle1 = new Rectangle(160, 50, 50, 150); Rectangle rectangle2 = new Rectangle(MousePos.X, MousePos.Y, 110, 20); if (rectangle1.IntersectsWith(rectangle2)) { // vvv if (abs(rectangle1.Y + rectangle1.Height - rectangle2.Y) < abs(rectangle1.X + rectangle1.Width - rectangle2.X)) rectangle2.Y = rectangle1.Y + rectangle1.Height; else rectangle2.X = rectangle1.X + rectangle1.Width; }[/cpp][/QUOTE] Doesn't seem to work, when rectangle2 touches the left/top side of rectangle 1, it snaps to the right/bottom, just like my previous code.
Oh derp, try this. [cpp] top = abs(rect1.Y-rect2.Y-rect2.Height) bottom = abs(rect1.Y+rect1.Height-rect2.Y) right = abs(rect1.X+rect1.Width-rect2.Y) left = abs(rect2.X+rect2.Width-rect1.X) minDist = min(top,bottom,left,right) if (minDist == top) rect2.Y = rect1.Y-rect2.Height if (minDist == bottom) rect2.Y = rect1.Y+rect2.Height if (minDist == right) rect2.X = rect1.X+rect1.Width if (minDist == left) rect2.X = rect1.X-rect2.Width [/cpp] I haven't tested this.
I just want to delete everything in the ram except the stuff that is used by the system itself. So tgat it's in the same state like if you just rebooted it.
[QUOTE=Mega1mpact;23872562]I just want to delete everything in the ram except the stuff that is used by the system itself. So tgat it's in the same state like if you just rebooted it.[/QUOTE] Lol. Not going to happen.
Sorry, you need to Log In to post a reply to this thread.