Thread: 2D Multiplayer Games - Best Way To Store Items

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 2D Multiplayer Games - Best Way To Store Items 
    Registered Member
    Jokerrr's Avatar
    Join Date
    Jun 2012
    Posts
    469
    Thanks given
    56
    Thanks received
    52
    Rep Power
    108
    I am making a multiplayer 2D game and I'm wondering, what would be the best way to store items and all their data?

    Thanks.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Apr 2011
    Age
    26
    Posts
    1,363
    Thanks given
    370
    Thanks received
    184
    Rep Power
    0
    Most likely how RS does - which (I believe, but may be wrong) is either in an XML document or something of the sort and then unpacking the data with a java class.
    Reply With Quote  
     

  3. #3  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,881
    Thanks given
    1,854
    Thanks received
    4,741
    Rep Power
    5000
    Quote Originally Posted by Versuprace View Post
    Most likely how RS does - which (I believe, but may be wrong) is either in an XML document or something of the sort and then unpacking the data with a java class.
    Hell no, proper use of RDBMS is the best way to go



    Reply With Quote  
     

  4. Thankful users:


  5. #4  
    Registered Member
    Jokerrr's Avatar
    Join Date
    Jun 2012
    Posts
    469
    Thanks given
    56
    Thanks received
    52
    Rep Power
    108
    Quote Originally Posted by S Quare Quxx View Post
    Hell no, proper use of RDBMS is the best way to go
    Care to elaborate please?
    Reply With Quote  
     

  6. #5  
    Community Veteran

    Purehit's Avatar
    Join Date
    Oct 2006
    Posts
    960
    Thanks given
    445
    Thanks received
    645
    Rep Power
    5000
    Quote Originally Posted by Jokerrr View Post
    Care to elaborate please?
    Use a database.
    Reply With Quote  
     

  7. #6  
    0x2P | ~0x2P
    Google rapes bing's Avatar
    Join Date
    May 2013
    Posts
    598
    Thanks given
    120
    Thanks received
    62
    Rep Power
    0
    Quote Originally Posted by Jokerrr View Post
    I am making a multiplayer 2D game and I'm wondering, what would be the best way to store items and all their data?

    Thanks.
    Using java.util.zip.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #7  




    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    27
    Posts
    16,200
    Thanks given
    7,190
    Thanks received
    12,174
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by Google rapes bing View Post
    Using java.util.zip.
    [Only registered and activated users can see links. ]
    no .

    [Only registered and activated users can see links. ]



    Reply With Quote  
     

  9. Thankful users:


  10. #8  
    Registered Member
    Join Date
    Oct 2014
    Posts
    122
    Thanks given
    101
    Thanks received
    39
    Rep Power
    44
    Compression shouldn't matter for something like this, nor how it's stored beforehand, and assuming it's only loaded once at startup - just do whatever suits your needs and is easiest for YOU to work with.

    Edit:
    Meh.......
    Code:
    	private void loadSomeItemsPlz() {
    		try {
    			StreamTokenizer tokenizer = new StreamTokenizer(new BufferedReader(new FileReader(new File("items.txt"))));
    			while (tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
    				int id = (int) tokenizer.nval;
    				tokenizer.nextToken();
    				tokenizer.nextToken();
    				int price = (int) tokenizer.nval;
    				tokenizer.nextToken();
    				tokenizer.nextToken();
    				System.out.println("loaded item #" + id + " and the price equals=" + price);
    				// do what you gotta do yo
    			}
    			// print total amount of items loaded or something or how long it took, who cares
    		} catch (Exception e) {
    			// you done goofed
    		}
    	}
    I came here to promote my lwjgl morpg, but no, 90% of you are neanderthals and this forum is weird. Glad I realized it before I finished my project because I sure don't want a bunch of flaming boneheads coming to my community
    Reply With Quote  
     

  11. #9  
    Donator

    Mr. Brightside's Avatar
    Join Date
    Oct 2008
    Age
    25
    Posts
    475
    Thanks given
    182
    Thanks received
    96
    Rep Power
    97
    I'm personally a fan of MySQL databases to store data. But I believe you should only use MySQL if you're actually ready to release. Otherwise, I'd use some easy way to store data like .xml or .txt etc for just testing purposes because it's easier to manually edit.
    ​Maybe I have no clue what I'm on about
    Reply With Quote  
     

  12. #10  
    ???

    funkE's Avatar
    Join Date
    Feb 2008
    Posts
    2,606
    Thanks given
    242
    Thanks received
    977
    Discord
    View profile
    Rep Power
    1281
    Quote Originally Posted by Mr. Brightside View Post
    I'm personally a fan of MySQL databases to store data. But I believe you should only use MySQL if you're actually ready to release. Otherwise, I'd use some easy way to store data like .xml or .txt etc for just testing purposes because it's easier to manually edit.
    if you have the right tools, anything is easy to edit manually.

    i choose mysql, but someone might choose some other db software. databases are meant for storing data. it is worthwhile.
    .
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 7
    Last Post: 05-18-2014, 06:41 PM
  2. The best way to start a 2D game?
    By Gamma in forum Application Development
    Replies: 8
    Last Post: 10-15-2013, 01:52 AM
  3. Best way to store player variables
    By relex lawl in forum Help
    Replies: 5
    Last Post: 09-08-2012, 11:28 PM
  4. Replies: 1
    Last Post: 01-25-2008, 08:55 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •