Page 1 of 2

Modern Concepts

Posted: Mon Mar 06, 2006 12:30 pm
by Moskito
Hello there
I'm german, so please allow mistakes in my translations onto this forum.
When i first downloaded the Demo and after buying PB in January06 i thought, this is some kinda basic programming - don't expect to much :)
Well, in the german forums i asked for modern concepts in game programming because my knowledge stopped in 1997 on the Amiga with Asm. But all answers were kind of "carefull" answers. Nothing new for me.
Maybe someone of you has some good concepts that he would share here...
My first Projekt should be a City Traffic Simulation with about 250 cars driving around, stoping at traffic lights and so on. My first thoughts about that were, that PB would have much to do with that kinda programm. I thought about 50 or 75 Traffic Lights and a map of 1600x1600 or so. 300 Objects would have to be organized. A lot of work for a basic, i thought...

So i began to learn (and love) PB. At the end of February the simulation did most of the things i wanted, and more. It was sooo much fun to work with Pure but now was the time to test if it could manage 250 cars and 50 traffic lights. I used mousebutton 3 for a flipbuffers(0/1) so i could get some MaxFPS at will.
What should i tell you ? Pure is so damned fast !
But this is my very first programm with PB. Maybe it could be much more powerfull, who knows...

even with 2 5 0 0 cars it still runs at 64 Frames on my internet notebook with 730 Mhz and an onboard 16MB ATI graphic chip.

You don't believe me ?

See yourself and download here. (only 64Kb small)

Thomas

Posted: Mon Mar 06, 2006 12:36 pm
by GedB
That is so nice. I could sit and watch it for hours.

Any chance you could make a screensaver out of it?

http://www.purebasic.fr/english/viewtop ... creensaver

Posted: Mon Mar 06, 2006 12:48 pm
by Dare2
Hehe. Neat. 75fps with 2500 cars here, and stuff running in the background.

Sometimes a faster car will overtake by going over/under a slower leading car. Jump jets or powerful hovercars? :)

Great stuff!

Posted: Mon Mar 06, 2006 12:50 pm
by Moskito
Any chance you could make a screensaver out of it?
Just rename the VKSim.exe to VKSim.scr and copy the small file to the windows/system. That's all.
Sometimes a faster car will overtake by going over/under a slower leading car. Jump jets or powerful hovercars?
Well, car crashes are not planned :) So i let them overtake "this" way. Also in curves and at traffic lights / crossroads this can happen. I hate crowded streets and wish this could be done in reality (sometimes).

bye

Thomas

Posted: Mon Mar 06, 2006 1:02 pm
by Dare2
:D

This is too easy to watch.

And as it builds up past the 500 car mark the traffic congestion on the right hand side reminds me of rush-hour!

Posted: Mon Mar 06, 2006 8:14 pm
by Num3
Very nice!

I really love it!

Posted: Mon Mar 06, 2006 9:06 pm
by Fred
Very good !

Posted: Tue Mar 07, 2006 12:57 am
by Moskito
Very good !
It is only a small topdown gimmick to learn Pure, my first program, not very good.
Maybe when i go on to Isometric, but we will see...



Update to V.00131 alpha :)

Editing Traffic Lights and Crossroads is now possible.

Here is the
Link.


until then
Thomas

Posted: Tue Mar 07, 2006 1:03 am
by techjunkie
Moskito wrote: Update to V.00131 alpha :)

Editing Traffic Lights and Crossroads is now possible.

Here is the
Link.
Die von Ihnen aufgerufene Seite wurde nicht gefunden ...
:cry:

Posted: Tue Mar 07, 2006 10:28 am
by Moskito
Maybe late in the Night, my Provider did a backup...

Posted: Tue Mar 07, 2006 12:06 pm
by doodlemunch
i likes this! are u using the sprite lib for this ?

Posted: Wed Mar 08, 2006 10:04 pm
by Moskito
are u using the sprite lib for this ?
Sure ... something wrong with that ?

Posted: Wed Mar 08, 2006 10:55 pm
by Paul
I have only seen real traffic lights go...
green yellow red, green yellow red, green yellow red

Not...
green yellow red yellow green yellow red yellow green


Did you mean for your simulation to do this?

Posted: Wed Mar 08, 2006 11:10 pm
by Intrigued
That's pretty neat sim.

Posted: Wed Mar 08, 2006 11:14 pm
by Moskito
Sorry, but here in germany the Traffic Lights go that way.
RED = seconds to minutes :)
Yellow= 2 - 3 seconds (not 1 millisecond like in London)
Green = about 15 seconds
Yellow = about 2 until 5 seconds
Red restarts this loop