What in What Order?
Blitz3D Forums/Blitz3D Beginners Area/What in What Order?
| ||
How do you tell what command goes where when designing a game. Is it in the steps of how you design the game? I know you have to set the scene, lighting, camera etc up first, but after that? Thanks.. |
| ||
I'm pretty new but the way i'v been reading is:; Set video mode Graphics3D 640,480,16,2 SetBuffer BackBuffer() ; Setup cameras cam1 = CreateCamera() CameraViewport cam1,0,0,640,480 ; Load level objects, e.g. meshes, lights, terrain, water plane, skybox, set collisions... light1=CreateLight() cube1=CreateCube() PositionEntity cube1,-2,-2,10 ; The MAIN GAME LOOP While Not KeyHit(1) ; Keyboard/Mouse Controls ; 3D Stuff, e.g. move/animate meshes, launch projectiles, check collisions... UpdateWorld RenderWorld ; 2D stuff here, update HUD, text, stats... Text 50,50,"Hello Cube!" Flip Wend End ; Subroutines & Functions can be here Thats what a basic game code stucture looks like This code was from a tutorial at http://jnoodle.com/Blitz3D/index.html thats a realllyyy good tutorial read through it good, it covers most of the basics, when i'm messing about with code i normal try to keep it nice and tighty by using functions. |
| ||
Basicly the order is(for me anyways) Graphics stuff set the back buffer global stuff collisions cameras lights types Loading stuff, and creating stuff basicly non-realtime stuff main gameloop realtime stuff render and update the world 2d stuff HUD ect the "Flip" code end the game loop functions and data that kinda of stuff that isnt in the main program |
| ||
Little Addition to Tahfree's code, I would use the same thing but limit the framerate to 60 fps ... As well as forgetting cls. |
| ||
Thanks folks and Happy New Year! |