Carnage3D - [yet another] GTA1 remake project

Talk about top down games, GTA V and other crime games here.
Post Reply
User avatar
jericho
Jaywalker
Jaywalker
Posts: 7
Joined: Mon Sep 09, 2019 8:03 pm

Carnage3D - [yet another] GTA1 remake project

Post by jericho » Fri Sep 13, 2019 6:48 pm

Hi!

I've started this project some time ago from scratch, just for fun, and working on it now in my spare time.
Here first progress, nothing special - walking (no physics now), simple collisions with map, debug ui:
https://www.youtube.com/watch?v=91L_CJ0teEA

My goal is to mimic original game (to some degree), single-player only. No multiplayer is planned for now - its too complicated.

Tools and technologies used - C++11, Visual Studio 2015, GLFW, OpenGL3.2, Dear ImGUI and some other helper librarires.

Current task - adding physics and collision detections. I think Box2D physics library will fit perfectly.
Source code is closed for now, but I hope it will be released some day :)

User avatar
Sektor
Boss
Boss
Posts: 1366
Joined: Tue Mar 04, 2008 6:51 am
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Carnage3D - [yet another] GTA1 remake project

Post by Sektor » Sat Sep 14, 2019 1:50 pm

Good luck with your project. I hope it gets passed the alpha/beta stage!

User avatar
jericho
Jaywalker
Jaywalker
Posts: 7
Joined: Mon Sep 09, 2019 8:03 pm

Re: Carnage3D - [yet another] GTA1 remake project

Post by jericho » Sat Sep 14, 2019 9:36 pm

Thanks!
Here little demonstration of how the box2d collision works, exe:
carnage3d_test01.zip
carnage3d test01
(482.88 KiB) Downloaded 4 times
To run this you will need:
1) Microsoft Visual C++ 2015 Redistributable, https://www.microsoft.com/en-us/downloa ... x?id=52685
2) Full version of GTA1 game for windows
3) Hardware that support opengl 3.2
4) Windows 7 preferred

Before launch, edit settings file in gamedata/config/sys_config.json and specify gta1 data location (gta_gamedata_location) and screen params.

I cannot guarantee that this demo will work, but if it does, please let me know.

Btw, press 'C' key for debug panel :)

User avatar
jericho
Jaywalker
Jaywalker
Posts: 7
Joined: Mon Sep 09, 2019 8:03 pm

Re: Carnage3D - [yet another] GTA1 remake project

Post by jericho » Tue Sep 17, 2019 7:16 am

Not sure how to draw peds/cars correctly on slopes.

Im now not using any sorting right now, just enable hardware z-buffer and it makes things drawn correctly depending on how high a object is. But when ped/car gets drawn on slope surface (especially those 45 degrees) part of sprite gets cut off partially - https://gyazo.com/05124c9e641ebd55c9bf83684826fa24
(sideview, grey is slope, red is sprite, dots are for position)
So, in order to fix that problem I must bump up sprite - the larger the sprite the higher it should be bumped up.
I think it is dumb.

The better option is would be:
- enable hardware depth write and depth test, draw first layer map geometry
- disable depth test, draw all peds/cars on this layer
- repeat for each map layer

Does anyone have any thoughts on this?

Post Reply