Modern Concepts

Advanced game related topics
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Modern Concepts

Post 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
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post 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
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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!
@}--`--,-- A rose by any other name ..
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Post 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
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post 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!
@}--`--,-- A rose by any other name ..
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Very nice!

I really love it!
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Very good !
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Post 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
techjunkie
Addict
Addict
Posts: 1126
Joined: Wed Oct 15, 2003 12:40 am
Location: Sweden
Contact:

Post 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:
Image
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Post by Moskito »

Maybe late in the Night, my Provider did a backup...
doodlemunch
Enthusiast
Enthusiast
Posts: 237
Joined: Tue Apr 05, 2005 11:20 pm

Post by doodlemunch »

i likes this! are u using the sprite lib for this ?
my english is horribel i know - SORRY i am dyslexic - i uses pb 3.94
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Post by Moskito »

are u using the sprite lib for this ?
Sure ... something wrong with that ?
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post 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?
Intrigued
Enthusiast
Enthusiast
Posts: 501
Joined: Thu Jun 02, 2005 3:55 am
Location: U.S.A.

Post by Intrigued »

That's pretty neat sim.
Intrigued - Registered PureBasic, lifetime updates user
Moskito
User
User
Posts: 41
Joined: Mon Mar 06, 2006 11:56 am
Location: Germany
Contact:

Post 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
Post Reply