Ooops
October 17, 2021, 09:56:35

Author Topic: ASR3D (racing game with airships)  (Read 601 times)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
ASR3D (racing game with airships)
« on: May 23, 2021, 22:08:52 »
hi !

the other day, when watching some cryptos news, i had an idea for a game. :)

the basic idea is to make a racing game with airships and cryptos avatars.

components required :
sky
horizon
farawayterrain
terrain
water
track + checkpoints
borders of the track (flares)
buildings
rocks
trees and bushes
airships
items (armor, missile, turbo, repair)

let's see how far i can go this time.  ;D
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: ASR3D (racing game with airships)
« Reply #1 on: May 23, 2021, 22:11:46 »
some experiments with terrain :

colorsmap :

rd-stuff.fr/blitz3d/ASR3D-terrain-Cmap-20210524-1228.png

lightshademap :

rd-stuff.fr/blitz3d/ASR3D-terrain-LSmap-20210524-1228.png

colorsmap + lightshademap :

rd-stuff.fr/blitz3d/ASR3D-terrain-Cmap-LSmap-20210524-1228.png
« Last Edit: May 25, 2021, 20:50:03 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: ASR3D (racing game with airships)
« Reply #2 on: May 25, 2021, 20:49:26 »
texture blend mode 5 (multiply 2x) looks much better for lightshademap, the fully lighted colors (of the colormap) look like the fullbright colors, and the fully shaded colors look like the fullbright colors + ambient light color.

also i have added a water effect using an animated texture (derived from the example by cybergoth)


rd-stuff.fr/blitz3d/ASR3D-terrain-animatedwater-20210525-2141.png
« Last Edit: May 25, 2021, 20:51:02 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: ASR3D (racing game with airships)
« Reply #3 on: June 01, 2021, 12:02:51 »
still stuck at the heightmap generation...

i have read several articles / code examples about noise generation to generate heightmaps, but some parts are quite complicated to me, and i don't want to generate a 100% random heightmap, i want to generate heights around a track (which will be at ground level, low heights), so i am currently thinking to develop my own procedure to generate mountains around the track, and then generate noise maps to alter the main heights with smaller heights.

maybe it will work ???

DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2477
Re: ASR3D (racing game with airships)
« Reply #4 on: June 01, 2021, 12:47:27 »
1. start with a general grid of XxY
2. make the grid all 1
3. draw your track path making the grid points 0

4. do some smoothing on the grid. E.G. 1,1,1,0,1,1,1 becomes 1,1,0.5,0,0.5,1,1
5. repeat the above maybe changing the values a bit

6. Create you height grid using the same XxY size
7. just do a quick multiply of your general grid with your height grid

:)

or - just use your general grid and randomize the points by the stored value - very quick and dirty ;)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: ASR3D (racing game with airships)
« Reply #5 on: June 02, 2021, 08:29:46 »
my current idea to generate a heightmap is :

draw the track (a line with 1pix radius) manually on an image (1024x1024)

draw the tops of mountains (separate lines with 1 pix radius) around the track

code a procedure to create for each shape (line), outlines representing different levels of height
the track is at the bottom level, so let's say a grey value of 30
the tops of mountains is at the top, so let's say a grey value of 250
for each level of height, merge all outlines
merge all levels of height (layers) from bottom to top

create the terrain from the generated heightmap

code a procedure to add variations to the heightmap
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 2477
Re: ASR3D (racing game with airships)
« Reply #6 on: June 02, 2021, 08:55:14 »
I know I say it a lot around here, but simplify and potentially do it in 2d first

what I mean is a 128x128pix map should be fine, 32x32 would be even better (with each cell relating to an 8x8 pixel? 256x256 in total)

ignore the 3d work in 2d on the 32x32 map - something like this


the red is your ship - use rotation and forward to move with each tile being 8x8 or 10x10
if the ship hits the green - game over
you can add markers that the ship should go over do you know its going the right way
You can also add power ups, etc

This can be tested super quick, you can add wind and test and see how the movement works etc

Once you've got something that feels right you can think about a quick translation into 3d - BUT (and this is the big one) you are doing all your hit testing here, you can now use this as a mini map.

The 3d is just a display... think of it as a canyon- I know that it's slighty different from your concept, but that sort of thing can be added later:
« Last Edit: June 02, 2021, 08:59:06 by iWasAdam »

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1290
Re: ASR3D (racing game with airships)
« Reply #7 on: June 02, 2021, 12:48:14 »
a heightmap is 2d...

except each pixel has a grey value which corresponds to a height in 3d

and can be used to create a terrain in 3d (a grid made of quads/triangles with the vertices positionned up/down depending on the grey value on the heightmap at x,y)

it is as if the green pixels, on the 2d map example that you posted, were of different shades of grey, but with a progressive interpolation.


the screenshot of the 3d terrain that you posted, looks nice but too primitive for what i want to do.
but good for testing, indeed.
« Last Edit: June 02, 2021, 12:50:57 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal