Page 2 of 3

Re: Game test v0.01

Posted: Sun Jul 06, 2025 12:35 am
by miso
aerial perspective (false isometric) perspective to limit view zone
Still has some similarity, not the camera collide is the one I find hard. For example, the camera is centered at the player character.
It can take into account the facing for example, to show more what is in the front, and show less what is not in sight, but keeping the player model on screen. And this is just the top of the iceberg. It can consider for example if player getting attacked from behind, it can slightly goes back a bit to give more view of the back.
limit entity view in distance
I might not understand this. Maybe if you describe an example event where you want to use it and why.

Edit: Question: the blockmesh map you use in the tests is generated, or modeled?

Re: Game test v0.01

Posted: Sun Jul 06, 2025 1:18 am
by minimy
Question: the blockmesh map you use in the tests is generated, or modeled?
Hi miso, is create on the fly with this procedure

Code: Select all

Procedure   decoradoTEST()
  Protected.f o
  Protected   mate,mesh,enti, p
  Protected   tt3D= CreateTexture(#PB_Any,256,256)
  StartDrawing(TextureOutput(tt3D))
    DrawingMode(#PB_2DDrawing_AllChannels)
    Box(0,0,OutputWidth(),OutputHeight(),$ff888888)
    Box(0,0,256,4,$ff555555)
    Box(0,0,4,256,$ff555555)
    For p= 0 To 256 Step 64
      Box(p,0,8,32,$ff555555)
      Box(0,p,32,8,$ff555555)
      LineXY(p,0,p,OutputHeight(),$ff555555)
      LineXY(0,p,OutputWidth(),p,$ff555555)
    Next p
    StopDrawing()
    
  mate= CreateMaterial(#PB_Any,TextureID(tt3D));suelo
  mesh= CreatePlane(#PB_Any,20,20,10,10,20,20)
  enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),0,0,0)
  CreateEntityBody(enti,#PB_Entity_StaticBody)
  SetEntityCollisionFilter(enti,1<<1,1<<1)
  
  mesh= CreateCube(#PB_Any,1)
  BuildMeshLOD(mesh, 1,30,100)
  
  For p= -10 To 9 ;muros
    o= Random(15) * 0.02
    enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),p+0.5,0.5-o,10.5)
    CreateEntityBody(enti,#PB_Entity_StaticBody)
    SetEntityCollisionFilter(enti,1<<1,1<<1)
    enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),p+0.5,0.5-o,-10.5)
    CreateEntityBody(enti,#PB_Entity_StaticBody)
    SetEntityCollisionFilter(enti,1<<1,1<<1)
    enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),10.5,0.5-o,p+0.5)
    CreateEntityBody(enti,#PB_Entity_StaticBody)
    SetEntityCollisionFilter(enti,1<<1,1<<1)
    enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),-10.5,0.5-o,p+0.5)
    CreateEntityBody(enti,#PB_Entity_StaticBody)
    SetEntityCollisionFilter(enti,1<<1,1<<1)
  Next p
  
  For p=1 To 10 ;obstaculos
    x= Random(19)-10 : While x>-3 And x<3 : x= Random(19)-10 : Wend
    y= Random(19)-10 : While y>-3 And y<3 : y= Random(19)-10 : Wend
    enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),x+0.5,0.5,y+0.5)
    CreateEntityBody(enti,#PB_Entity_StaticBody)
    SetEntityCollisionFilter(enti,1<<1,1<<1)
  Next p
  
  enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),-1.5,0.02,-1.44)
  ScaleEntity(enti,0.9,1,4.5,#PB_Absolute):RotateEntity(enti,12.8,0,0)
  CreateEntityBody(enti,#PB_Entity_StaticBody)
  SetEntityCollisionFilter(enti,1<<1,1<<1)
  enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),-1.5,0.5,-4)
  CreateEntityBody(enti,#PB_Entity_StaticBody)
  SetEntityCollisionFilter(enti,1<<1,1<<1)
  enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),-1.5,0,-5)
  CreateEntityBody(enti,#PB_Entity_StaticBody)
  SetEntityCollisionFilter(enti,1<<1,1<<1)
  enti= CreateEntity(#PB_Any,MeshID(mesh),MaterialID(mate),-3.5,0.5,-3.5)
  CreateEntityBody(enti,#PB_Entity_StaticBody)
  SetEntityCollisionFilter(enti,1<<1,1<<1)

  CreateLine3D(#PB_Any, -20,0,0,$0000ff, 20,0,0,$00ffff)
  CreateLine3D(#PB_Any, 0,0,-20,$ff0000, 0,0,20,$ffff00)
  CreateLine3D(#PB_Any, 0,0,0,$004400, 0,20,0,$00ff00)
  
  CreateLine3D(#PB_Any, -10,0,-10,$004400, -10,20,-10,$ffffff)
  

EndProcedure
For a large map I think creating groups of entities and when the player approaches show them and hide them when they move away.
But it can be very heavy for the speed, when running so many conditions. Any way, problems one by one hehe.
Now I'm trying to get the player into the vehicle

Re: Game test v0.01

Posted: Sun Jul 06, 2025 1:31 am
by miso
1 big mesh with 1 texture is probably better than a lot of small ones. It depends on a lot of things. Selecting what to hide and what to show with best performance can be done with a data structure that is called quadtree. (Octree if 3D, but a topview game can be considered as a 2d field I think.)
Those can reduce the number of required iterations to a really small number.

If you want a simpler structure, you can divide your space to imaginary tiles of 20x20 for example. if your whole map is 10.000 unit, you know which tile your camera is in. you show props that is in your tile and those 1-2 away from the camera tile.

You can create an array of 20,20 that refers to a list. You add the entitynumber of the props to the list that are in the tile, so you can hide those that goes out, and show that goes in.

(Also don't animate enemies that are outside of view)

PS:Regarding the generated map: Cool ;)
PS2: Also you can create the sections on the fly. if those are map elements. I have my own tests for that with great results. Textures must be pre-created, but mesh generation can be very fast.

Re: Game test v0.01

Posted: Sun Jul 06, 2025 1:25 pm
by minimy
1 big mesh with 1 texture is probably better than a lot of small ones
Hey miso, yes i need limit scenary draw. Test scene have many block to stress the game and later when put real scenary the game run as is. Is my bad solution to keep speed more or less.

New test with the boys and the car.
Added, the guy can enter and exit from the car. And can drive when is in.
Added, now kicks work too.
Added, the guy use steering wheel.
Fixed, bug when enemy die animation stack.
Added, limited draw into screen.

Here is the video:
https://youtu.be/3kxOttWep1o

Re: Game test v0.01

Posted: Mon Jul 07, 2025 3:51 pm
by pf shadoko
it makes me happy to see such a demo!

shadows and skeletal animations have been very slow since PB 6.20, so I've made 2 functions to manage them via shader
viewtopic.php?p=642095#p642095
for your characters use: CreateMaterialEx(...,#SO_Txcolor|#SO_Anim,...)
if you use WorldShadowsEx, all materials created with CreateMaterialEx will manage shadows

Re: Game test v0.01

Posted: Mon Jul 07, 2025 8:31 pm
by minimy
Hello im happy too with results.
Thank you very much!
I've continued with 6.02 because I have problems with shadows on my models, I don't know why. I've used makeuman which is free and powerful to generate a model and export it to mesh to make sure it's not my CAD that exports wrong. But the result is the same. It's explained in this post :( viewtopic.php?t=87120

I would love to be able to use your shaders, they are very good and the shadows are realistic, really nice. The problem is that I make mistakes with all the models I make.

Next movie soon. :mrgreen:
Added to the game:
Blood splash.
The guy can jump.
Kick no produce blood, weapons and car yes, a lot, is a carnage :lol:

To be continued... :lol:

Re: Game test v0.01

Posted: Mon Jul 07, 2025 9:55 pm
by minimy
Here the new video, the title is ketchup party :mrgreen:
I need improve NPC colisions system

https://tvcry.net/downloads/TESTgame7.mp4

Game test v0.02

Posted: Wed Jul 09, 2025 3:31 pm
by minimy
Textures and environment added to the project.
Todo, improve colisions and animations.

This is the new video with PB and OGRE logo hehe. :mrgreen:
Original music for any part of the game... i dont know where, i will see..

https://tvcry.net/downloads/TESTgameV2.mp4

Re: Game test v0.01

Posted: Wed Jul 09, 2025 3:51 pm
by Fred
That's wild haha

Re: Game test v0.01

Posted: Wed Jul 09, 2025 4:22 pm
by CDXbow
Brilliant work minimy. The NPC are just how I like them, dumb and lot's of blood. Keep up the good work.

Re: Game test v0.01

Posted: Wed Jul 09, 2025 4:55 pm
by Caronte3D
Your project is growing very fast! 8)

Re: Game test v0.01

Posted: Wed Jul 09, 2025 7:26 pm
by idle
That's looking great.

Re: Game test v0.01

Posted: Sat Jul 12, 2025 9:08 am
by threedslider
Awesome ! Nice work :P

Re: Game test v0.01

Posted: Sat Jul 12, 2025 2:35 pm
by minimy
Thank you very much to every one. This start like a test but is growing hehe. :lol:
I did an scenary editor for the game because put one by one every element with coordinates is a nightmare. 8)
Scenary now just show visible objects.
Now with one file can load full maps with all items and colision system.
Ilumination was changed to directional light, result is better. And no change shadow orientation in long distance

In progress:
- IA for NPCs.
- Improve inventory.
- Multi mision system with primary and secondary mision objetives. (many types of misions)
- Dialogue for NPCs
- Sound system
- (will be nice a video system to play movies, i will see)

Was a little fight with mass and friction (car) but now is more realistic and control is better. If you have license.. :mrgreen:

A question: In 6.21 change any thing in pivot commands? because give me an error in 'GenericJoint' ??? idk why. In 6.02 work perfect.
I hope you enjoy the video as much as I do. (sounds is not from the game, is from the kitchen :lol: )

This is the result:
https://tvcry.net/downloads/TESTgame8.mp4

Re: Game test v0.01

Posted: Wed Jul 23, 2025 1:06 pm
by minimy
Im near to finish my NPC v2 now with physics (work really nice).
news:
The player now can walk and run while is shoting.
All NPCs are affected by physic forces, like explosions, collisions, falls and others.
NPCs now are included in factions to know who is enemy and who is friend.
Player and NPCs now have normalmap and look better.
Player control now is softly and quick to control.
All weapons now include more attributes, distance effective, damage, ratio action, cadence, and more.
New weapon grenades.. BOOOM!! :mrgreen: With realistic physics effects.
System of particles and animations (spritesheet) for explosions, smoke, sand storm and more.
Included new screen FX: Fade to black (pasue all the game for menus, dialogues, etc) and bars to make cinematic aspect for cinematics and others.

Here is a litle example of total annihilation :lol:
https://tvcry.net/downloads/TESTgame8.mp4