largo_winch
06-12-2011, 18:23
hello tbgl friends. this is my first little tbgl game. I have had in my mind to create a kind of slot machine last week but didn't know where to start. this project is work in progress so I placed it here at board. this is my first result, but first demo it's only for start/stopping four boxes with textures in correct horizontal line order.
=> your aim should be to get all four cubes in one straighten line. by starting the app three cubes are rotating (right top, left bottom, right bottom). F1/F11 for going on, F2/F12 for stopping boxes and F5 to stop other one ;)
more to come next days. the tbgl example based upon the entity example with "tbgl_customFanEntity" by petr schreiber's explorations some month ago.
have fun with this first, very easy (level) of game
note: 2. update of new version with a) second light source, b) fonts for bb) fps rate and bbb) mouse coordinates
bye, largo
Petr Schreiber
06-12-2011, 18:53
Interesting gallery of women of science :p
It seems to me the textures are a bit dark, do you use light in your scene?
Petr
largo_winch
07-12-2011, 10:26
hello petr. do you have played to get all cubes in right horizontal order (after the rules?) ;)
yes, the girls are really beautiful! my son looked at the soccer girl and decided to apply they for the cube faces :)
a) there is from beginning a light source in my example, I add another one, so it's getting brighter.
b) but I have problem with displaying text with
1)
TBGL_ClearFrame
...
TBGL_UseLighting %FALSE
TBGL_UseDepth %FALSE ' -- So text will be always rendered on top of other objects
TBGL_Color 50,255,50
TBGL_PrintFont "FPS:"+Str$(FrameRate), 8,1,1.9
TBGL_PrintFont "MouseX: "+Str$(MouseX), 8,1,1.4
TBGL_PrintFont "MouseY: "+Str$(MouseY), 8,1,1.9
TBGL_PrintFont "Mouse3D X: "+Format$(Pos3Dx, "#.00"), 8,0, 0.0
TBGL_PrintFont "Mouse3D Y: "+Format$(Pos3Dy, "#.00"), 8,0,-0.5
TBGL_PrintFont "Mouse3D Z: "+Format$(Pos3Dz, "#.00"), 8,0,-1.0
TBGL_PrintFont "BoxPlayerX: "+Str$(PlayerX), 8,1,4.4
TBGL_PrintFont "BoxPlayerY: "+Str$(PlayerY), 8,1,3.9
TBGL_UseDepth %TRUE
I think I've set this block to wrong place. I've used tbgl bitmap fonts as good alternative.
2) the BoxSlotmachine should work for next issue to rotate cube in y-axes to show different texture faces, you have to stop like a boxSlotmachine I know from a game my son is playing last week on xbox.
bye, largo
Petr Schreiber
07-12-2011, 11:58
Largo,
without seeing complete source code, I am afraid I can't help with your text issue.
I think one light source should be enough, when positioned correctly.
Petr
largo_winch
07-12-2011, 17:25
I solved the problem with
TBGL_RenderMatrix2D
TBGL_SetActiveFont 1
TBGL_Color 250,0,0
TBGL_PrintFont "mouse Coordinates: " & MouseX & " Mouse " & MouseY, 10, 335,0
TBGL_Color 250,255,0
TBGL_PrintFont "Frame rate is: " & FrameRate & " FPS", 10, 30,0
TBGL_RenderMatrix3D
that takes only half an hour to find the problem with adding TBGL_RenderMatrix3d at the end.
addendum: I will change next days my tbgl example content with new "actor_entity" for better performance and overview of boxes with textures! (new edit: 15.12.2011)
bye, largo