[gameprogrammer] Re: database for fast games

Oh awesome!

Ruben, if you are only calling srand at the beginning of your program once,
I have some great news for you.

Just store the value you are passing to srand into the database, and then
when you want to re-get the random numbers, just srand with the same number
and then when you call rand() it will return the same sequence of numbers as
it did the first time you ran it (:

kinda cool huh?

On 10/31/06, RÃben LÃcio <rubenlr@xxxxxxxxx> wrote:

srand with time

ty

On 10/31/06, Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:
>
> oh interesting.
>
> Some databases allow you to make multiple inserts into a table with a
> single sql statement, one way to make this process faster would be to store
> a bunch of the random numbers in memory and then every 10 seconds you could
> dump them to the database, or dump them when you have more than 1000 or
> something...
>
> If your random number generation algorithm is reproducable from a seed
> though, you might be better off just storing the seed that started it
> all. How are you generating your random numbers?
>
>
> On 10/31/06, RÃben LÃcio <rubenlr@xxxxxxxxx > wrote:
> >
> > Its a random numbers game. every random is done, i store that state
> > for furure studes.
> >
> > Mysql is too strong for us, we have to use the lessers then possible
> > machine. with i smaller database.
> >
> > its have to run on windows and linux.
> >
> > ty,
> >
> > rÃben
> >
> > On 10/31/06, Roger D Vargas <luo_hei@xxxxxxxx > wrote:
> > >
> > > Perhaps Mysql with transaction support disabled.
> > >
> > >
> > > RÃben LÃcio escribiÃ:
> > > > Hi,
> > > >
> > > > I have to use one database to log some actions in my game. It will
> > > run
> > > > every play, but it's not too much. In my current tests it's 45 for
> > > minute.
> > > >
> > > > I'm using SQLite at this moment. Somebody have other small and
> > > fast
> > > > database for inserts?
> > > >
> > > > Thank you,
> > > >
> > > > RÃben
> > >
> > > --
> > > http://dsgp.blogspot.com | Linux, programaciÃn, juegos
> > > Have no place I can be since I found Serenity
> > > But you can't take the sky from me
> > >
> > >
> > > ______________________________________________
> > > LLama Gratis a cualquier PC del Mundo.
> > > Llamadas a fijos y mïviles desde 1 cïntimo por minuto.
> > > http://es.voice.yahoo.com
> > >
> > > ---------------------
> > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> > >
> > >
> > >
> >
> >
> > --
> > Linux user #433535
> > Linux because we are freedon.
>
>
>


-- Linux user #433535 Linux because we are freedon.

Other related posts: