TileCity3D

User projects written in or related to FreeBASIC.
oog
Posts: 124
Joined: Jul 08, 2011 20:34

TileCity3D

Postby oog » Nov 03, 2011 19:18

TileCity is a tile based 3D world, using OpenB3D.
You can define the world layout with a simple text file. TileCity generates a 3D world, which you can explore.

Image

That's a very early version V0.01, so don't expect too much.

Download of program including sources at proog.de

http://www.proog.de/joomla/index.php/projekte/73-tilecity
Lachie Dazdarian
Posts: 2337
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Postby Lachie Dazdarian » Nov 05, 2011 11:12

Nice and smooth. I like the rotating map.

But...what's the status with train simulator?
badidea
Posts: 1299
Joined: May 24, 2007 22:10
Location: The Netherlands

Postby badidea » Nov 05, 2011 17:09

I want to load a SimCity map and drive around in it :-)
oog
Posts: 124
Joined: Jul 08, 2011 20:34

Postby oog » Nov 06, 2011 18:04

TileCity V0.02 now support waypoints.
Simply place lower case letters "a"-"y" on a street to define waypoints of a race track. "z" defines the finish.

You will also find a short video at proog.de.
However, there's no driving physics. You can just simulate a race by moving the camera, bu you can define your own track by a simple ASCII file.

@badidea: That would be cool.

@Lachie: Actually I'm extracting the vector graphics lib from the train simulator and make a test program for documentation how to use it.
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 10, 2011 15:48

i have made a version with car/flight sim + map edit,load,save if you are interested

=> http://chungswebsite.blogspot.fr/search/label/TileCity_chung

Image

Image
Last edited by chung on Sep 15, 2012 10:17, edited 16 times in total.
Mihail_B
Posts: 271
Joined: Jan 29, 2008 11:20
Location: Romania
Contact:

Postby Mihail_B » Nov 10, 2011 17:02

chung wrote:i have made a version with car/flight sim + map edit,load,save if you are interested



nice
oog
Posts: 124
Joined: Jul 08, 2011 20:34

Postby oog » Nov 10, 2011 19:57

chung wrote:i have made a version with car/flight sim + map edit,load,save if you are interested


Of course I am. That looks really good. I will download and check it.

Edit
It's amazing, what you made out of this demo. I specially like the way you detect if a car is on street. It's not an easy task. The street tiles are painted with street and grass next to the street on the same tile. The virtual car begins to rumble, when driving on grass, no matter if the position still is on the street tile but has left the grey ground.
You probably check the ground color to decide if the car is on street? I tried to find out from the lib source, but did not get it.

I've put a link to your version on proog.de.
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 12, 2011 18:17

its right, i check the pixels color (getpixel clear grey <=> street)

i have added a 2nd plane and machine-gun shooting
+ skydome + shipcarrier (13/11/2011)
=> https://docs.google.com/open?id=0B6GM9ay7ImZLZDVjZWU2MmEtNWQ2Ny00ZjJkLWI0MTEtMWZjNDhhNzMwYzM4
Last edited by chung on Nov 19, 2011 21:47, edited 12 times in total.
oog
Posts: 124
Joined: Jul 08, 2011 20:34

Postby oog » Nov 13, 2011 16:10

chung wrote:i have added a 2nd plane

Looks great. I've made a new video about your version of TileCity, which shows flying around and also the 2nd plane.
http://www.proog.de/joomla/index.php/projekte
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 15, 2011 21:00

Last edited by chung on Dec 02, 2011 13:41, edited 3 times in total.
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 19, 2011 11:35

openb3d is compatible with gui_chung !
here's a demo with tilecity_gui (sample openGL window+some buttons)

=> https://docs.google.com/open?id=0B6GM9ay7ImZLNjg4NTcwMjQtZDE1NS00YzljLTkxMzUtY2RhMDc2ZWExNDFl

+inkey edit map bug corrected (21/11/2011)
Last edited by chung on Nov 23, 2011 22:16, edited 4 times in total.
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 19, 2011 21:54

(19/11/2011) maxfps set to 30 ( ancient value was 0, default to 10, excuse me ...)
oog
Posts: 124
Joined: Jul 08, 2011 20:34

Postby oog » Nov 20, 2011 17:58

I like the traffic in the streets, especially how cars find their way on the streets, drive on the right side, and drive around obstacles.
I made some videos about your new mod.
I also built a very simple airport, available as download version 0.02a and a little video showig it (proog.de, TileCity3D - Alle Videos / TileCity3D - All Videos).

Image

@chung:
Can you put your mod into separate subroutines? This would make it easier to include the mod into newer versions.

We can use #define and #ifdef to include the mod, so compilation with and without the mod is possible.

Example:

Code: Select all

#define tcmod

#ifdef tcmod
  #include "tcmod.bas"
#endif


We can include files at different positions, if necessary.

Example for tcmod.bas:

Code: Select all

#Include "windows.bi"
#include "openb3d.bi"
#Include "sound.bi"
#Include "gui_chung.bi"
#Include "filechung.bi"
#Include "gl_chung.bi"
#Include "texture.bi"

Dim Shared As Integer edit=0,isky=1,ncar2=30
#Include "movecar.bi"

Dim As String ficin
Dim As String ficini="tilecity.ini"
Dim As Integer File

...


It would be the easiest, if we just need two calls like that:

1. Mod initialization

Code: Select all

#ifdef tcmod
  tcmodini
#endif


2. Mod call in a loop

Code: Select all

#ifdef tcmod
  tcmodloop
#endif


You did lot's of changes, so this would not be enough, but we should try to make it as easy as possible (if you're interested, of course).

btw:
Version 0.02 of TileCity allows the definition of racetracks. You added some cars. It would be nice, if we could put that together.
chung
Posts: 584
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Postby chung » Nov 21, 2011 21:00

(21/11/2011) i have added your updates (airport, new keys, waypoints, double towers) + car 3D cockpit to my version
(press R(eset) to reinit race position)

you can find it there

=> https://docs.google.com/open?id=0B6GM9ay7ImZLNjg4NTcwMjQtZDE1NS00YzljLTkxMzUtY2RhMDc2ZWExNDFl

(22/11/2011) textures in media\ folder
(23/11/2011) performances enhanced by twice
Last edited by chung on Nov 23, 2011 22:18, edited 7 times in total.
oog
Posts: 124
Joined: Jul 08, 2011 20:34

Postby oog » Nov 21, 2011 22:15

chung wrote:(21/11/2011) i have added your updates (airport, new keys, waypoints, double towers) + car 3D cockpit to my version
(press R(eset) to reinit race position)

Great, I will check it. I've been busy too.
There is a version "TileCity3D - Chung mod interface v.0.02c" for download at proog.de.
It's not complete working, I didn't really finish it, but it's an example of how we can interface our codes.

The file "tcmod.bas" is the interface to your code. TileCity just include it (as an selectable option) and do only some calls to your code (actually just some parts of it).
I think it's much easier to proceed if we keep the sources in separate files, than mixing code in one file.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 2 guests