Jump to content

  • Log In with Google      Sign In   
  • Create Account

Zolomon

Member Since 08 Oct 2007
Offline Last Active Apr 08 2014 12:57 PM

Topics I've Started

Announcement with expired coupon code

21 May 2011 - 12:59 AM

Hello!

There's currently an announcement with the 4elem coupon code for the GDNet+ yearly subscription.
When I try to subscribe it says the coupon code has expired.

Should the announcement still be visible or is something wrong with the coupon code?

Cheers.

[.net] Populate TreeView control with data from SQLite database?

04 November 2008 - 09:14 AM

Hello! I'm working on a C# application where I'm trying to populate a TreeView control by reading data from an SQLite database and I have little to no idea how to create a solution. Check this link to see examples in tabbed format: http://gamedev.pastebin.com/m1ecc47d6 Requirements/specification: All of the nodes are tagged with a NodeTag object with an integer "id" identifier and a string "name" identifier. There are three types of nodes. One root node with its ((NodeTag)rootNode.Tag).Name set to "root", any number of "category" nodes with its name tag set to "category" and then the third type of nodes which can have any kind of name. They can be child nodes of any type, except that the root node is always the first node, hence root node. The nodes are stored in the database in two tables. Table 1 is called "categories" and have the fields: id, name, parentId & orderId. Table 2 is called "shortcuts" and have the fields: id, name, categoryId, orderid. The first record in the categories table is the root node, which has no parent and is the first node (order id = 0) in the TreeView control. The second node would then be a category node created by the user and so on. The parentId shows the id value for which category it's a child node to. The orderId shows the order it has in its current depth. 0 = first, 1 = second and so on. See below for example! shortcuts table: id name categoryId orderId 0 Firefox 1 0 1 Filezilla 1 1 2 mIrc 2 0 3 e-Mailer 3 0 4 RandomShortcut 4 0 Visual representation: Shortcuts | +---Internet | | | +---Chat | | | | | +---RandomCategory | | | +---E-mail The shortcuts table looks shortcuts table: id name categoryId orderId 0 Firefox 1 0 1 Filezilla 1 1 2 mIrc 2 0 3 e-Mailer 3 0 4 RandomShortcut 4 0 //////////////// Example ////////////////// Shortcuts (parentId: -1, orderId: 0) | +---Internet (0,0) | | | +---Firefox (1,0) | +---Filezilla (1,1) | | | +---Chat (1,2) | | | | | +---mIrc (2,0) | | +---RandomCategory (2,1) | | | | | +---RandomShortcut (4,0) | | | +---E-mail (1,3) | | | +---e-Mailer (3,0) If this would be saved to the database it would look like the following... categories table: id name parentId orderId 0 Shortcuts -1 0 1 Internet 0 0 2 Chat 1 2 3 E-mail 1 3 4 RandomCategory 2 1 shortcuts table: id name categoryId orderId 0 Firefox 1 0 1 Filezilla 1 1 2 mIrc 2 0 3 e-Mailer 3 0 4 RandomShortcut 4 0 //////////////// End of Example ////////////////// I could really use some concrete example of how to implement this, and I know I'm asking for a lot. But this is beyond me at the moment. Thank you, //Zolomon

Generate a tile based map?

11 October 2007 - 09:34 AM

Hello! I've seen some tile based games use some kind of array which they store the location of their different objects/tiles for their map. I'd like to learn how to create one of these for C# (XNA), but I have no idea where to find good information about this. I've searched a lot on Google and here in the forums, but I didn't really quite find what I was looking for. Any help at all is appreciated! Cheers, Zolomon

PARTNERS