Forum BigDB How to load from index with offset?

Discussion and help relating to the PlayerIO database solution, BigDB.

How to load from index with offset?

Postby Vania » August 9th, 2011, 9:05 pm

So, I made a mapEditor for my game and now I am coding the part of the UI where users can browse the "custom maps".

I have 2 indexes in my "CustomMaps" table: one that orders maps by score, and another by date.

Now, what I want to do is load the maps 10 at a time, like 1-10, 11-20, etc...
The problem is I dont know how to do this since loadRange() does not have an "offset" parameter.

How should I code this?
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: How to load from index with offset?

Postby Vania » August 10th, 2011, 6:57 pm

Any ideas on this? I really have no idea how to do this.
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: How to load from index with offset?

Postby Henrik » August 10th, 2011, 7:07 pm

Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: How to load from index with offset?

Postby Vania » August 10th, 2011, 9:14 pm

Thanks Henrik, that thread helped a lot.

So, my solution for the score index would be using a long and putting the score in the first 4 bytes and the minutes passed since january 1st 1970 in the last 4 bytes (the time of creation of the map).
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm


Return to BigDB