PDA

View Full Version : Top Down City - Topic Reboot



JernejL
18-07-2009, 04:37 PM
Old topic turned into a incompenhendable blend of everything, so here's a topic restart.

Milestones reached:
- Car editor partially rebuilt, can now finally open cars it makes.. i still need to replace all my Tbitmap scanline code that is still left there with superior vampyre imaging lib.
- Random city Traffic
- Fixed spawning for pedesterians, they are now smarter and don't get stuck as often as they used to, still need to sort out a few AI things tho.
- OMG proper car physics finally, i wrote this myself - it took me a few months tho.
- Newton 2 latest beta is in, and works flawless.
- Sprite packing for animated sprites such as actors, using: http://fpc4gp2x.eonclash.com/downloads/Partitions.pas, This makes original textures 1/4 smaller.

Some progress videos:

http://www.youtube.com/watch?v=8cWyth324b0
http://www.youtube.com/watch?v=Dan0KMlZNS4
http://www.youtube.com/watch?v=7ekceLilNmQ

And what would all that be for without a demo? :O

http://mathpudding.com/tdc/TDC%20DEMO.rar

Let me know if you have any issues running it.

arthurprs
18-07-2009, 05:15 PM
loved it, good gtaII fell

ps: the shadows looks vert good, how they work?

JernejL
18-07-2009, 05:47 PM
stencil shadows for map, ordinary darkened sprite shadows for the rest.

Wizard
18-07-2009, 07:28 PM
Hi Delfi, I tried your demo. Wow, good work!! I know it's only a demo but here's a couple of ideas:

- The main thing that's missing is skidmarks on the surface when driving a car/truck etc. At the moment it feels 'artificial', the driving sounds help but the feeling of driving a car wasn't there for me.

- This is maybe still in your plans but I think you should show dents etc. from accidents with other vehicles/objects.

- The character looks one dimentional when standing still, it looks like a square with a circle in the middle. This is not the case when moving around, then it actualy looks very good.

- The dead guys...maybe they should vanish a few seconds after being killed? Or maybe you could engineer a "cleanup van" which drives around picking up dead guys?

- I think the explosions needs some work too.

Please, don't get me wrong. I like the "city" very much - it's very realistic and I liked driving over pedestrians.. Maybe you could get them to scream when being hit?

Anyway, I like your game and it works fine on Vista. Keep up the good work 8)

JernejL
19-07-2009, 05:03 PM
Hi Delfi, I tried your demo. Wow, good work!! I know it's only a demo but here's a couple of ideas:

- The main thing that's missing is skidmarks on the surface when driving a car/truck etc. At the moment it feels 'artificial', the driving sounds help but the feeling of driving a car wasn't there for me.

- This is maybe still in your plans but I think you should show dents etc. from accidents with other vehicles/objects.

- The character looks one dimentional when standing still, it looks like a square with a circle in the middle. This is not the case when moving around, then it actualy looks very good.

- The dead guys...maybe they should vanish a few seconds after being killed? Or maybe you could engineer a "cleanup van" which drives around picking up dead guys?

- I think the explosions needs some work too.

Please, don't get me wrong. I like the "city" very much - it's very realistic and I liked driving over pedestrians.. Maybe you could get them to scream when being hit?

Anyway, I like your game and it works fine on Vista. Keep up the good work 8)



* Skidmarks are planned, but they are harder to do than you may think..

* Dents do show, but not on cars which don't have the dented graphics done (like the ferrari and trucks), see that they work fine on the yellow BMW.

* Dead guys are being cleaned up after you go far enough from them.

* True, but do you volunteer to make me better explosions or have another way of getting them?

* No screaming: missing audio :(

dazappa
19-07-2009, 06:33 PM
It's great so far, my only complaint is driving into the water. I realize the car's supposed to be falling as it's flying forward off a cliff, but from the top it looks unrealistic. Maybe you could scale the sprite down or something gradually until it hits the water.

JernejL
19-07-2009, 08:27 PM
The camera moves vertically with you, at the end you just produce a nice splash and car is already gone.

Andreaz
19-07-2009, 09:03 PM
* Skidmarks are planned, but they are harder to do than you may think..

What do you have problems with?

I managed to wrap up something somewhat working with the Phoenix particle system in 15 minutes (of course not counting the countless hours spend writing the particle engine) ;)

You can check it out here:

http://phoenixlib.net/files/Skidmarks.zip

It basically adds a new skid mark every time you press or release the left or right arrow keys by adding a new particle system, its limited to 20 skid marks as it is now, and the start and stop edges of the marks could use some fading.

JernejL
19-07-2009, 09:13 PM
What do you have problems with?


I had more important parts of the game to finish and fix before skidmarks :-[ seriously, this is a very fine detail which isn't difficult to do, so it had a very low priority compared to other stuff.

Thanks for your example, i have mine all planned and textures ready, i just need to start coding it.

JernejL
30-08-2009, 09:00 PM
I'm looking for people to help working on this, if you like the project and would like to work on it let me know here.

I'd especially like to have someone go over the code and resolve some internal memory corruption, which is fatal when compiled with freepascal, without this i cannot move to start working on a linux port.

If you like network programming, this project would also love to see you onboard, the game internal design was always made with netsync in mind, but i'd like to focus on other parts before going there - i cannot work on so many parts at once.

I am also willing to exchange your help on this with helping you with your project.

JernejL
20-02-2011, 03:36 PM
Lack of updates here doesn't mean lack of updates in general ;)

It now compiles and works with FPC, a lot of stuff has been fixed, speed up & improved from physics to renderer, editors..
Beginnings of networking now exists (enet, currently chat kinda-works)

There's still no release, but i plan to release somewhen after duke nukem is released :p

chronozphere
20-02-2011, 03:59 PM
Cool.. looking forward to a new demo/release. :) You have been working on this game for AGES now haha.

Ah, and I loved the vids in your startpost. I could not try the game itsself (unexpected end of archive). :(

wodzu
22-02-2011, 12:05 PM
Cool.. looking forward to a new demo/release. :) You have been working on this game for AGES now haha.


It is amazing that Delfi is still working on this project :)

JernejL
23-02-2011, 05:49 PM
Yeah only about 8 years now ;) it sucks working ALONE on something you like so much.. but i am willing to accept help from you guys..

Chesso
11-03-2011, 11:56 PM
Don't think I would be good enough to be of much help (I'm having a blast and many headaches just making a slot machine game LOL!, though most of the headaches are my inability to create what I need in terms of graphics and sounds).

Out of curiosity, have you done any side projects along the way, general programs or other games/engines etc?

code_glitch
12-03-2011, 01:37 PM
I am often pressed for time, but depending on what you need help with I may be of some use there. Looks good (judging by the first demo and youtube links)...

JernejL
20-05-2018, 03:15 PM
Hello from the null void!

This is still being worked on, i restarted work after 2011.

So now it has networking, uses newton 3, and is being refined weekly, hopefully i can show something useable within a few months.

Here's a youtube channel with some progress:
https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA

Ñuño Martínez
28-05-2018, 03:51 PM
Welcome back. Good to see you're still working in this nice project.

Rodrigo Robles
31-05-2018, 05:05 PM
Nice videos. You mean it has multiplay under network?

JernejL
01-06-2018, 09:49 AM
Yup, proper multiplayer. It's not shown in the videos, but it works rather well (client-server model), i do hope i can make a video showing this in near future, i made a lot of progress and those videos only show the basic functionality and not active gameplay.

JernejL
25-06-2018, 12:58 PM
Some progress:

Weapon pickups:

https://www.youtube.com/watch?v=YeADH7i00ak

Destructible map objects

https://www.youtube.com/watch?v=x-jmRyj8Vic

Bloody skidmarks

https://www.youtube.com/watch?v=Rl_fhxnurTk

And final object crates with pickups made after destroying them:

https://www.youtube.com/watch?v=-XAhboaZ6hU

Ñuño Martínez
28-06-2018, 09:15 AM
You'll have a nice classic GTA clone.

Correct me if I'm wrong but you are using Delphi, aren't you? Or can FPC compile it?

JernejL
28-06-2018, 02:12 PM
You'll have a nice classic GTA clone.

Correct me if I'm wrong but you are using Delphi, aren't you? Or can FPC compile it?

editors are still built with delphi (i am phasing out delphi and making them lazarus-friendly but the game has more priority atm. ).

The game itself however is developed only with lazarus + freepascal for past year or so, which helps ensure future cross platform compatibility :) not that i managed to port it, but i'm hopeful that i will soon in near future, main code is well isolated from platform dependancies.

JernejL
10-07-2018, 10:01 AM
Positive update: i've managed to port map editor to lazarus, which is one of major support tools, it works, which is nice

JernejL
30-08-2018, 08:34 AM
I've implemented automatic damage deformations on vehicles, it looks good:


https://www.youtube.com/watch?v=qNCHR8VSrQQ

Matthias
21-09-2018, 11:35 PM
Amazing project and I like the authentic old school style of this. Hope to see it progressing :)!

JernejL
13-11-2019, 08:23 PM
2 update videos, the engine is finally maturing, after > 10 years of work :)



https://www.youtube.com/watch?v=M71mjxdeT8k&t=1s


https://www.youtube.com/watch?v=evBsQwwltDs&t=14s

Chebmaster
14-11-2019, 08:53 PM
There is so much stuff done to get to this point!
I am glad you are at the most fun part: sculpting the above-water part of your project's iceberg :)

Ñuño Martínez
14-11-2019, 08:59 PM
Nice. Keep up the good work!

JernejL
12-12-2019, 06:29 AM
Thanks for being still interested :)

So, let me share some progress:

ALL editors are now also made in freepascal, no more delphi anywhere, just freepascal + 2 msvc dlls (one is not needed for game but for editor only).

So much little bugs and glitches and improvements were made - stuff like improved objects breaking, tank driving over other vehicles, totally custom compound collisions for vehicles, kicking vehicles and objects is improved, improved AI, pathfinding, optimizations, unified UI, corrections in rendering and fixes in map editor. No screenshots / videos, but after one more fix in physics engine i'm releasing another playable demo.

JernejL
26-01-2020, 03:48 PM
I got a update for this! i released a new demo - it is now much more refined, and is much more closer to a proper release:

Here is a offical 2020 demo:

https://gtamp.com/tdc/tdc_demo.7z


Give this a try, and report how the game works and if you find any issues.

de_jean_7777
27-01-2020, 10:43 AM
Tried to run it, but I get a runtime error. RunClient.cmd, RunServer.cmd and TDC.exe give the same error. The editors work.



An Runtime error 201 ( Range check error ) had occurred in function $00469364 TWINDOW__RECALCSCROLLPPOS, line 816 of game_Gui.pas (Address $00469364) :

Function call trace:
$00469364 TWINDOW__RECALCSCROLLPPOS, line 816 of game_Gui.pas
$00469F25 TWINDOW__ADDGUITEXT, line 1067 of game_Gui.pas
$00469F81 TWINDOW__SETGUITEXT, line 1084 of game_Gui.pas
$0046913B TGUIHANDLE__SETGUITEXT, line 754 of game_Gui.pas
$00467B5C SCREENBUTTONCLICK, line 440 of game_Frontend.pas
$0041B5E5 BUILDSETTINGSMENUTAB, line 914 of tdc_game.pas
$00417609 MAKEGUI, line 2519 of tdc_game.pas
$00421FA6 LOADGAME, line 3672 of tdc_game.pas
$00468C93 FRONTENDEXIT, line 664 of game_Frontend.pas
$00468C1F FRONTENDENTER, line 650 of game_Frontend.pas
$0042229B LOADED, line 3764 of tdc_game.pas
$004416E4 TBASE3DENGINE__ENGINE_CONTEXT_CREATED, line 2966 of Platform.pas
$00440A88 TWIN32ENGINE__CREATEWINDOWWITHGLCONTEXT, line 2518 of Platform.pas
$0044104D TBASE3DENGINE__CREATERENDERER, line 2800 of Platform.pas
$00422923 TDC_GAME_$$_init$, line 4165 of tdc_game.pas
$0040DE34


Here's the log file (and I do know this graphics card does support NPOT textures, so the log entry seems weird):


Debug Log:
>> initializing: Trigger objects
>> initializing: particle struct
>> initializing: Car objects
>> initializing: Actor struct
Tactor instance size 568, TNetwork_packet_actor 10 bytes basic - 6 bytes extended - 48 bits
Tcar instance size 464, TNetwork_packet_vehicle 16 bytes basic - 5 bytes extended 40 bits
TParticle instance size 240, TParticleInstance 25 bytes basic - 0 bytes extended 0 bits
TDC process loaded! Compiled with FreePascal 3.0.4 on: 2020/01/27:09:01:55
Build options: compiler_optimizations off, compiler_io_checks off, compiler_range_checks on, compiler_overflow_checks on, compiler_stack_checks on, compiler_vmc_checks on, compiler_assert_checks on With Debug Symbols
Running by dejan on ALPACAS
[Engine: Support threads changed from 0 to 4]
>> loading settings
>> settings applied!
>> TDC: graphical engine starting up..
Loaded GL Library: opengl32.dll
>> WinMain - SYSinit..
Creating Window
Window_Handle: 657490
Pixel Format: 11
Color Bits: 32
Depth Bits: 24
Stencil Bits: 8
Pixel Type: 0
SetPixelFormat: 0 GetLastError:
GL_Rendering_Context: 65536
wglMakeCurrent: 0
WGL Extensions:
WGL_ARB_buffer_region WGL_ARB_create_context WGL_ARB_create_context_no_error WGL_ARB_create_context_profile WGL_ARB_create_context_robustness WGL_ARB_context_flush_control WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_render_texture WGL_ATI_pixel_format_float WGL_EXT_colorspace WGL_EXT_create_context_es_profile WGL_EXT_create_context_es2_profile WGL_EXT_extensions_string WGL_EXT_framebuffer_sRGB WGL_EXT_pixel_format_packed_float WGL_EXT_swap_control WGL_EXT_swap_control_tear WGL_NVX_DX_interop WGL_NV_DX_interop WGL_NV_DX_interop2 WGL_NV_copy_image WGL_NV_delay_before_swap WGL_NV_float_buffer WGL_NV_multisample_coverage WGL_NV_multigpu_context WGL_NV_render_depth_texture WGL_NV_render_texture_rectangle
>> Setting up openGL..
>> setting up GL extensions
Loading Extensions
EXT: SGI Auto Mipmapping is availible!
GL_MAX_TEXTURE_SIZE = 4096
EXT: card supports DXT/S3TC
EXT: NO support for NPOT images!
EXT: Fragment shaders are availible!
EXT: Enumerating texture compression: ($83F0, $83F2, $83F3, $8B90, $8B91, $8B92, $8B93, $8B94, $8B95, $8B96, $8B97, $8B98, $8B99, $9274, $9275, $9276, $9277, $9278, $9279, $9270, $9271, $9272, $9273, $93B0, $93B1, $93B2, $93B3, $93B4, $93B5, $93B6, $93B7, $93B8, $93B9, $93BA, $93BB, $93BC, $93BD, $93D0, $93D1, $93D2, $93D3, $93D4, $93D5, $93D6, $93D7, $93D8, $93D9, $93DA, $93DB, $93DC, $93DD)
>> Renderer:
OpenGL 4.6.0 NVIDIA 441.87 by NVIDIA Corporation
Device: GeForce GTX 1050/PCIe/SSE2
>> Loading GUI
>> Loading Background Mesh...
>> Creating FRONTEND...
[ENGINE] Screen resolution switched to: 800 600 Screen 0 FS 0
>> Frontend Created.
>> LOADING GAME
>> Creating GUI...
new screen 0
Enumerating display: \\.\Display1

JernejL
27-01-2020, 12:02 PM
Can you try it again - re-download with cleaned browser cache: https://gtamp.com/tdc/tdc_demo.7z

I've added some extra log and checks, the crash seems to be related to getting screen resolutions.

Let me know if it works and please post new crash log if it doesn't.

de_jean_7777
27-01-2020, 12:14 PM
Here is the new log:

https://pastebin.com/at7c1RvM

JernejL
27-01-2020, 01:20 PM
That was one in a million bug - it just so happened that list of screen resolutions that your display supports matched perfectly amout of lines to display in a list box, and the math went haywire.

I've re-uploaded the file and it should be OK now.

de_jean_7777
27-01-2020, 04:07 PM
That was one in a million bug - it just so happened that list of screen resolutions that your display supports matched perfectly amout of lines to display in a list box, and the math went haywire.

I've re-uploaded the file and it should be OK now.

Works now. There are always edge case bugs :D It's an impressive project. I'll play around with it more when I get time, but really gives me that original GTA feeling.

de_jean_7777
27-01-2020, 07:38 PM
Another issue I encountered: https://pastebin.com/Q6VSvu1P

Occured when I went into the water with a truck with police chasing and a one star pursuit level :D Pushed another car into the water as well. Good times :D

JernejL
28-01-2020, 09:50 AM
Fixed that bug - thanks!

davido
07-02-2020, 09:01 AM
Your game looks really cool, I will play it when I have a little time, good job.

https://shareit.onl/ (https://shareit.onl/) https://mxplayer.pro/ (https://mxplayer.pro/)

JernejL
08-06-2020, 05:10 AM
I made some progress :) now includes a lot of improvements in rendering and generally became a more polished game, and less of an prototype game engine.

https://gtamp.com/tdc/tdc_demo.7z

JernejL
08-12-2020, 07:06 AM
Another update!

Now it has night mode lighting and additional city features like firemen and medics!

https://i.imgur.com/B6IUPiR.png
https://i.imgur.com/h1oQbRj.png

Same demo link: https://gtamp.com/tdc/tdc_demo.7z
Discord channel: https://discord.gg/UXmDPzS
Youtube channel: https://www.youtube.com/channel/UCxGfOh3ld7Xm-ic3KEMB6iA

Ñuño Martínez
09-12-2020, 09:35 AM
It looks better and better and better and...