Advertisement Jump to content
  • Advertisement

Matthew Shockley

  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Matthew Shockley

  • Rank
  1. Matthew Shockley

    [Java] Rectangle Collision

    What is the best way to find if two rectangles are colliding if one of them is always axis-aligned and the other is rotated? Both classes have a size and position vector and the rotated rectangle has an angle property. I don't want to implement physics on these rectangles, just to see if they are colliding.
  2. Matthew Shockley

    [Lua] Proxy table and #t...

    Just set the __len metamethod to return the size of the vector.
  3. Matthew Shockley

    Have/Want List Matching Algorithm

    Quote:Original post by Telamon User 1 HAS A,C WANTS B,D User 2 HAS D WANTS A User 3 HAS A,B,D WANTS C When you say "HAS A,C", "HAS D", and "HAS A,B,D", do you mean they are willing to trade those items for the wanted item, or that they are the only items the user has?
  4. Matthew Shockley

    XML Help [C++]

    I am having trouble getting info from some XML using TinyXML. Here is my code: const char *GetCookie(const char* pFilename, const char* root, const char* name) { TiXmlDocument doc(pFilename); bool loadOkay = doc.LoadFile(); if (loadOkay) { TiXmlHandle docHandle(&doc); TiXmlElement* xRoot = docHandle.FirstChild(root).Element(); if (xRoot) { TiXmlNode* xElement = xRoot->FirstChild(name); if (xElement) { return xElement->ValueStr().c_str(); } else { return 0; } } else { return 0; } } else { return 0; } } Here is the XML file: <?xml version="1.0" encoding="utf-8"?> <login> <i1>aljkklsafjd</i1> <i2>jaklshdkfla</i2> <i3>jhjklsadjfl</i3> </login> Here is what it "cout"s: ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ ▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌▌ì[▓'
  5. Matthew Shockley

    VB Freezing

    Here is what I am trying to do: When I call the LoadPage function, the WebBrowser(Browser) starts to load the page. When it is done loading, it returns the document text.
  6. Matthew Shockley

    VB Freezing

    I am trying to get a web page's text with, and I am having a few problems. Can someone please help me with this: Public Class Main Dim Loading As Boolean = False Public Function LoadPage(ByVal url As String) Browser.Navigate(url) Loading = True While Loading End While Return Browser.DocumentText End Function Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load TextBox.Text = LoadPage("") End Sub Private Sub Browser_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles Browser.DocumentCompleted Loading = False End Sub End Class
  7. Matthew Shockley

    Data-access like Data[x]["Key"] = Value

    You don't have to be so rude about it. I mean seriously, I'm only fourteen. I'm just trying to help.
  8. Matthew Shockley

    Data-access like Data[x]["Key"] = Value

    I may be wrong, but I believe you have to settable after every time you push a value.
  9. Matthew Shockley

    Lua Read Bitmap

    Well... One problem. I don't have access to the io library. How else can I get the bytecode into a string without losing any data. Like a program gets the data and makes it where I can copy and paste it into a string for my lua program.
  10. Matthew Shockley

    VC++ 2010 Pro Root Help

    I am using Visual Studio 2010 Pro, and when I compile and run my programs, if I want to load an image file, the root directory is where the vcproj file is located. How can I make the root directory where the exe is located?
  11. Matthew Shockley

    VB Help

    I'm new to this, but in VB, I want to read this XML file: <?xml version="1.0" encoding="utf-8" ?> <forum> <signature>Hello</signature> </forum> I have this code: Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Sign As XmlReader = New XmlTextReader("UserInfo.xml") While Sign.Read() End While End Sub I'm trying to get the Forum Signature.
  12. Matthew Shockley

    Lua Read Bitmap

    How would I parse it in Lua? All the resources I look at show how to read it in C++ or they are libraries.
  13. Matthew Shockley

    Lua Read Bitmap

    Lets say I open a bitmap file in notepad, copy everything in it, put it in a string, and call that DrawBitmap function it.
  14. Matthew Shockley

    Lua Read Bitmap

    Is it even possible?
  15. Matthew Shockley

    Lua Read Bitmap

    This is for an experiment I am doing. I want to read a bitmap in Lua. I don't know anything about them, so this is what I was asking for help. Each loop, I want it to call a function, DrawPoint(x, y, color). function DrawBitmap(bytecode) for i = 1, length do DrawPoint(x, y, color) end end This is not meant for efficiency, and I don't want to use any other pre-made libraries or anthing like that.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!