Main Menu

News:

SyntaxBoom, now with pwetty syntax highlighted code boxes! \o/ 

https://www.syntaxboom.com/forum/index.php?topic=96

Shoutbox

Jackdaw

Today at 20:00:40
Going to have to try bourbon and beans. That should be an explosive combination.

Baggey

Today at 13:15:42
I sometimes mix a chicken vindaloo and a Tika Masala together. Awesome  :P

Dabzy

Today at 05:49:34
And doing the act was the realisation I went for an indian when out... 20mins I was in the thunderbox waiting for me back chaff to cool down!

Dabzy

Today at 05:48:11
When I was on my "Year On The Blur", aka drinking after getting divorced, I was minging one night, couldnt remember getting home. Anyway, next day, went to work, and needed a poo...

GfK

2025-10-15, 21:39:05
I overdosed on jelly babies once and my arse was like the shooty gun bit at the start of James Bond

Amon

2025-10-15, 20:16:38
lol

Jackdaw

2025-10-15, 19:40:48
Never had a Phall or a tinderloo. But I have heard that your backside feels like that map at the start of every episode of Bonanza.

GfK

2025-10-15, 19:22:25
Never confuse phall with phallus

Baggey

2025-10-15, 18:30:58
My mate ate a phall one night. Even that was to hot for me. I bet he suffered in the morning!  :-[

Dabzy

2025-10-15, 18:02:52
I like nice and toasty bit of fire in my bait as well, I used to eat really red hot gear, but nowadays if I do... Heartburn happens! :(

Members
Stats
  • Total Posts: 1,810
  • Total Topics: 224
  • Online today: 26
  • Online ever: 232 (Oct 08, 2025, 09:18 AM)
Users Online
  • Users: 1
  • Guests: 5
  • Total: 6
  • Amon
Welcome to SyntaxBoom. Please login or sign up.

Recent

PureBasic programming

Started by Unseen Ghost, Jul 03, 2025, 04:48 PM

Previous topic - Next topic

Unseen Ghost

Hi everyone,

I have been working on a European Football game called European Football Simulator written completely in PureBasic. I will be using Sqlite3 for the database of everything.
Attached are a couple of images of some results of testing 3D objects in PureBasic. Image on the right I loaded an untextured player I created in MakeHuman and scaled it down to fit the scene better. Image on the left is the football stadium I want to use in the game. I have a couple of dots I need to put in the pitch though. one is the penalty shot spot and the other is the center dot in the middle of the pitch. I got the pre-made stadium on turbosquid website.
Here is the test code:
#MOVEMENT_SPEED = 0.1

Global MouseXRotation.f,MouseYRotation.f,KeyX.f,KeyZ.f

InitEngine3D()
InitSprite()
InitMouse()
InitKeyboard()

OpenWindow(0, 0, 0, 1280, 780, "European Football Simulator", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 1280, 780, 0, 0, #PB_Screen_WaitSynchronization)
Add3DArchive("C:\Users\Brian\Documents\PUREBASIC PROJECTS\3D Programs\3Dfield\Media", #PB_3DArchive_FileSystem)

Parse3DScripts()
CreateLight(0,RGB(55, 55, 55), 0, 400, -10, #PB_Light_Directional)
LoadTexture(0, "Stadium_blue.png") 
LoadTexture(1, "Stadium_field.png")

bluemat=CreateMaterial(#PB_Any,TextureID(0))
fieldmat=CreateMaterial(#PB_Any,TextureID(1))
defmat = CreateMaterial(#PB_Any,0)

LoadMesh(0, "StadiumNew_obj.mesh")
LoadMesh(1, "Test1_dae.mesh")


CreateEntity(0, MeshID(0), #PB_Material_None)
CreateEntity(1, MeshID(1), #PB_Material_None)
ScaleEntity(1, -0.03, -0.03, -0.03)
ScaleEntity(0, 4, 3, 3)

For x = 0 To 30
  Select x
    Case 1
      tmat = fieldmat
    Case 4
      tmat = defmat
    Case 5
      tmat = defmat
    Case 9
      tmat = defmat
    Case 10
      tmat = defmat
    Case 11
      tmat = defmat
    Case 12
      tmat = defmat
    Default
      tmat = bluemat
  EndSelect
  SetEntityMaterial(0,MaterialID(tmat),x)
Next x

;RotateEntity(0, 6, 45, 0, #PB_Absolute)
RotateEntity(1, 180, 0, 0, #PB_Absolute)
MoveEntity(1, 0, 0.137, -36, #PB_World)

CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 0, 20, 40, #PB_Absolute | #PB_Local) ; absolute + local positive Z coordinate moves camera backwards
CameraRange(0,0.1, 1000)
CameraLookAt(0, 0, 0, 0)
Repeat
  Repeat : event=WindowEvent() : If event = #PB_Event_CloseWindow : End : EndIf :Until Not event
  If ExamineMouse()
    MouseYRotation = -MouseDeltaX() / 10
    MouseXRotation = -MouseDeltaY() / 10
  EndIf
  RotateCamera(0, MouseXRotation, MouseYRotation, 0, #PB_Relative)
  ;Update Key Presses and position the Camera accordingly
  If ExamineKeyboard()
    If KeyboardPushed(#PB_Key_Left) : KeyX = -#MOVEMENT_SPEED : EndIf
    If KeyboardPushed(#PB_Key_Right) : KeyX = #MOVEMENT_SPEED : EndIf
    If KeyboardPushed(#PB_Key_Up) : KeyZ = -#MOVEMENT_SPEED : EndIf
    If KeyboardPushed(#PB_Key_Down) : KeyZ = #MOVEMENT_SPEED : EndIf
    If KeyboardPushed(#PB_Key_Escape) : ReleaseMouse(#True) : EndIf
    MoveCamera(0, KeyX, 0, KeyZ)
    KeyX = 0
    KeyZ = 0
  EndIf
  RenderWorld()
  FlipBuffers()
  Delay(1)
ForEver
Being popular is way too much work, I just want to be me, myself and I. Oh no, does that mean I'm bipolar?

No one cares how much you know, until they know how much you care.

Baggey

is it going to have the women's teams in it  ::)
Running a Pc that just aint. Faster nough. I7-4Ghz, 32Gb Ram, 4Gb Nvidia, 2 x 1Tb SSD's, 2 x 24" LCD's

RETRO everything!

Jesus was only famous because of his Dad

Dabzy

Looks well! :)

I still remember New Star Soccer, that was a big success for the Monkey Language and a lovely little job at that... It really deserved all the success in the world!

Quote from: Baggey on Jul 03, 2025, 05:15 PMis it going to have the women's teams in it

If it doesnt have Alisha Lehmann, I'll be major disappointed. Not to be a creep or out (Ahem), but she rocks mind!

Dabz
 
Intel i7-13620H, nVidia GerForce RTX 4060 Laptop GPU (8GB GDDR6), 16GB LPDDR5X, 1TB SSD, Windows 11 x64 piss flap of an OS!

Baggey

Quote from: Dabzy on Jul 03, 2025, 08:34 PMLooks well! :)

I still remember New Star Soccer, that was a big success for the Monkey Language and a lovely little job at that... It really deserved all the success in the world!

Quote from: Baggey on Jul 03, 2025, 05:15 PMis it going to have the women's teams in it

If it doesnt have Alisha Lehmann, I'll be major disappointed. Not to be a creep or out (Ahem), but she rocks mind!

Dabz
 

For me its Merle Frohms im a big fan.
Running a Pc that just aint. Faster nough. I7-4Ghz, 32Gb Ram, 4Gb Nvidia, 2 x 1Tb SSD's, 2 x 24" LCD's

RETRO everything!

Jesus was only famous because of his Dad

MikeHart

That is a cool start for sure. Keep us updated please.

Unseen Ghost

Quote from: Baggey on Jul 03, 2025, 05:15 PMis it going to have the women's teams in it  ::)

This version will not have women in it. At some point later down the road I can always make a women's version
Being popular is way too much work, I just want to be me, myself and I. Oh no, does that mean I'm bipolar?

No one cares how much you know, until they know how much you care.

Unseen Ghost

Quote from: Dabzy on Jul 03, 2025, 08:34 PMLooks well! :)

I still remember New Star Soccer, that was a big success for the Monkey Language and a lovely little job at that... It really deserved all the success in the world!

Quote from: Baggey on Jul 03, 2025, 05:15 PMis it going to have the women's teams in it

If it doesnt have Alisha Lehmann, I'll be major disappointed. Not to be a creep or out (Ahem), but she rocks mind!

Dabz
 

I'll have to look into the New Star Soccer game some time. I never tried it
Being popular is way too much work, I just want to be me, myself and I. Oh no, does that mean I'm bipolar?

No one cares how much you know, until they know how much you care.

Unseen Ghost

Quote from: MikeHart on Jul 04, 2025, 04:28 AMThat is a cool start for sure. Keep us updated please.

I will definitely keep you updated here
Being popular is way too much work, I just want to be me, myself and I. Oh no, does that mean I'm bipolar?

No one cares how much you know, until they know how much you care.

pfaber11

I was wondering how many have moved to PureBasic from AGK as AGK has been put into feature freeze. They do pretty much the same thing although PureBasic maintains all of the basic language of the eighties and nineties AGK studio has a scaled down version of Basic but can still get the job done due to it's many advanced commands. I think AGK Basic is the best language I have tried it's very small and it is easier to learn compared to PureBasic, and I would say easier and nicer than Python especially if you know a bit of Basic to start with. I do like PureBasic as well and play with it often to keep it fresh.     

Baggey

Id be wondering how many have moved to BlitzmaxNG  ;)
Running a Pc that just aint. Faster nough. I7-4Ghz, 32Gb Ram, 4Gb Nvidia, 2 x 1Tb SSD's, 2 x 24" LCD's

RETRO everything!

Jesus was only famous because of his Dad