Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Faux Car  (Read 30863 times)

0 Members and 1 Guest are viewing this topic.

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Faux Car
« on: December 02, 2014, 09:45:16 pm »



Intro

It may be obvious to some that I've become interested in faux/fake/pseudo 3D. I think it shows in the Spinning Card class that I created. I began to investigate more pseudo 3D usage and stumbled upon the old car games that used it.

I felt the need to attempt to see if I could also make this pseudo 3D track effect - using SFML, obviously!

Faux Car is what I came up with.

I'm not sure if I'm going to turn it into a complete game yet, but I do intend to evolve it.

The altitudes and positions are calculated using perspective algorithms but all turns are fake. There are no technically no rotations. Bends are simply accumulations of offsets.

I'm willing to discuss the code and show parts of it too. It's a little impractical to show it all; it's in many files and is reliant on my own library (full version of Hx).

Version Info

(click to show/hide)

(click to show/hide)

(click to show/hide)

(click to show/hide)

(click to show/hide)
« Last Edit: February 06, 2018, 02:40:16 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

achpile

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • Achpile's homepage
    • Email
Re: Faux Car
« Reply #1 on: December 02, 2014, 10:35:02 pm »
CHAAAAASE HQ  ;D I love this game  ;D
And I love the preudo 3D (when I was 13, I wrote a maze game in QBasic with pseudo 3D graphics and first person camera view)

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Faux Car
« Reply #2 on: December 02, 2014, 11:15:56 pm »
« Last Edit: December 09, 2014, 11:16:57 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Faux Car
« Reply #3 on: December 03, 2014, 12:01:09 am »
Here's a runnable (playable?) version for you to try:
http://www.mediafire.com/download/3jbzd9w2ttuie53/Faux+Car+v0.0.2+first+tests.zip
It's Windows only, sorry  :(

Controls:
Up/down: accelerate/brake
Left/right: steer (left + right holds steady)
=/-: change speed of time
+/- (numpad): move forwards/backwards by one segment
0 (zero on numpad): reset car (reset track position, speed, steering, and horizontal position)
« Last Edit: December 03, 2014, 12:11:09 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

MiShu

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Faux Car
« Reply #4 on: December 03, 2014, 08:07:14 am »
Nostalgia ... Just remember "Top Gear" :)

AFS

  • Full Member
  • ***
  • Posts: 115
    • View Profile
Re: Faux Car
« Reply #5 on: December 03, 2014, 07:52:12 pm »
Nostalgia ... Just remember "Top Gear" :)

Oh man, Top Gear 2. I have fond memories of playing this game with my brother when I was a kid. Also, dat music.

http://www.youtube.com/watch?v=Ye-bPvKM7Ac


Anyway, interesting project, Hapax, hopefully it evolves into something great... like a Top Gear remake :P

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Faux Car
« Reply #6 on: December 03, 2014, 08:06:17 pm »
I loved Lotus Esprit Turbo Challenge when I was a kid. This brings back good memories.
Nice work Hapax.

ChronicRat

  • Sr. Member
  • ****
  • Posts: 327
  • C++ programmer
    • View Profile
    • My blog
Re: Faux Car
« Reply #7 on: December 03, 2014, 08:17:12 pm »
I loved Lotus Esprit Turbo Challenge when I was a kid. This brings back good memories.
Nice work Hapax.
Lotus III: The Ultimate Challenge - my favorite. It is ideal! =)

Cirrus Minor

  • Full Member
  • ***
  • Posts: 121
    • View Profile
Re: Faux Car
« Reply #8 on: December 04, 2014, 11:35:50 am »
It looks very good, Hapax !
I've downloaded it, but I cannot try (MSVS libs are missing)  :(

My favorite pseudo-2D racing game was Death Track (but it was First Person view).
(click to show/hide)

marchred

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Email
Re: Faux Car
« Reply #9 on: December 06, 2014, 12:10:58 am »
awsome O_o

PS : what about a minimapor something to peek what's next  ?

Dark2Dragon

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Faux Car
« Reply #10 on: December 08, 2014, 01:24:41 pm »
F-Zero!



I love this game  ;D


Great work!

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Faux Car
« Reply #11 on: December 09, 2014, 12:27:01 pm »
Thanks for the kind responses! I always appreciate feedback  :)

I've downloaded it, but I cannot try (MSVS libs are missing)
I don't know what this means or how to fix it. I assume MSVS means Microsoft Visual Studio but I don't know why it should require Visual Studio. Any suggestions?

what about a minimapor something to peek what's next  ?
This is a HUD element for a game. I'm not even sure if I'll be making this into a game. I probably should but who knows?  ;D
The track (up to about position 2000) is created from a couple of sine waves so the corners alternate equally right then left  ;)
I've added a track position marker to the latest version so at least you'll easily know how far you are from the end...

F-Zero!
Looks like fun but I have to say that the track looks like it's "actual" 3D  :P
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Faux Car
« Reply #12 on: December 09, 2014, 12:31:13 pm »
I improved this somewhat and added road-side objects. This became a technical nightmare because of the way I was drawing the road in segments. To get the objects to appear behind the road (when over a hill), I had to integrate them with the road into a single vertex array. Texture smoothing was also required as the scaling looked terrible without it.

The images used for the objects are random (as are their colours and transparency) from a random tileset which, again, I found online. It was downloaded from here. I use a modified version of that tileset (I added to it).

Here's an image at the starting line, showing how the objects look:


This is also at the starting line but using the alternate "first-person" camera:


A little bit into the track and it shows that the track and objects can even be seen from a following corner:


Some tweaks have been made here and there, including adding extra controls. F1 now display all the controls available.

Here's a more recent video:
http://www.youtube.com/watch?v=ZCn05Lgudvk

The first-person camera is still broken, as you can see in the video. I haven't paid enough attention to it.

I wanted to texture the road but I hit that age-old problem of not being able to stretch textures of a quad equally. I really should investigate how to use shaders as I believe that I need a bilinear filter shader. I may be way off the mark but that's what it looks like I need  :P
I might just stick with plain coloured polygons for the road...

Here's the Windows download for this version:
http://www.mediafire.com/download/pbdt3fidkd7vr1t/Faux+Car+v0.0.5.zip
« Last Edit: December 12, 2014, 02:15:28 am by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10791
    • View Profile
    • development blog
    • Email
AW: Re: Faux Car
« Reply #13 on: December 09, 2014, 12:38:10 pm »
Nice project! :)

It looks very good, Hapax !
I've downloaded it, but I cannot try (MSVS libs are missing)  :(
You most likely need to install the VS redist which can find over at Microsoft's website.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hapax

  • Hero Member
  • *****
  • Posts: 3344
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Faux Car
« Reply #14 on: December 09, 2014, 12:46:49 pm »
Thanks  :)

Does it need to be a specific version of the redistributable depending on which version I used?

EDIT: It looks like it matters so I'm going to include a link to the redistributable (in the original post).
« Last Edit: December 09, 2014, 12:57:01 pm by Hapax »
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

 

anything