Basic 3D Screen

BlitzMax Forums/BlitzMax Beginners Area/Basic 3D Screen

Chroma(Posted 2005) [#1]
I'm a bit short on time atm but can someone throw down some basic code to init a 3d 1024x768 screen and how you'd go about making a skybox?


tonyg(Posted 2005) [#2]
Chroma, Do you mean in native Blitzmax (i.e. no 3D module yet) or using the OGL side of Blitzmax?


ImaginaryHuman(Posted 2005) [#3]
See the OpenGL forum, it should have something that sets up a basic display.


Chroma(Posted 2005) [#4]
I know people are doing basic 3d stuff like loading models and goofing off. What method are people using? And how does it look like in code?


tonyg(Posted 2005) [#5]
They're using raw OGL accessed through the Bmx interface...
For OGL code check these tutorials...
here


Chroma(Posted 2005) [#6]
Ugh...Call me an old timer. It all seems over-complex now. =(

/duck

Can someone throw down a basic program here that initiates a 3d screen and puts a simple spinning cube on the screen?


Dreamora(Posted 2005) [#7]
Check the project board out for the Nehe Tutorial :)

This will help you understanding this "over complexiness"


Chroma(Posted 2005) [#8]
Can someone post something that does something like the following? Or does anyone actually know how to do it? lol

In Blitz3D


In BlitzMax



ImaginaryHuman(Posted 2005) [#9]
If you want to do it in OpenGL yourself you should read the OpenGL manuals to learn how it all works. It's worth the effort.


Perturbatio(Posted 2005) [#10]
nehe is the place to start


Chroma(Posted 2005) [#11]
Checked out NeHe and nothing against the creators, etc....but it just seems a bit shoddy.

I haven't been keeping up on what's going on with an OGL 3D module for BMax but is Mark planning on making one that will actually be user friendly and be optimized for maximum performance with BMax?


Perturbatio(Posted 2005) [#12]
according to his worklog, it will be out in about 6 months as regards syntax and performance, I'm unsure. But I would expect it to be good.


Chroma(Posted 2005) [#13]
When I downloaded BMax I was initially a bit lost because at the moment some things seem a bit vague (Initializing a basic 3D screen and throwing a cube on screen for instance). I like to get right into making the game and not worrying about making or locating a bunch of dlls/libs/functions to make it work. Letting the community have the ability to make a bunch of plugs/modules is terrific. But I'm hoping a lot more will be natively built into BMax so making the game part can be easy as it was before.

Multiplayer for example. Where is it? Maybe I just haven't read the docs thoroughly enough.


Perturbatio(Posted 2005) [#14]
network module is on it's way, but there is basic socket support with the undocumented TSocketStream (brl.mod/socketstream.mod/socketstream.bmx]

here's a quick example of how to grab a web page via port 80 with it:
stream : TSocketStream = TSocketStream.CreateClient("www.blitzbasic.com", 80)
If Not stream Then
	RuntimeError("Error creating socket")
EndIf

If Not stream Return

	stream.WriteLine "GET / HTTP/1.1"
	stream.WriteLine "Host: 127.0.0.1"
	stream.WriteLine ""

While Not Eof( stream )
	'If Not stream.ReadLine() Exit
	Print Stream.Readline()
Wend


stream.close()
stream = Null
FlushMem

End





Dreamora(Posted 2005) [#15]
You can already make games, the 2D module is working, no problem with it normally :)


Chroma(Posted 2005) [#16]
I'm starting to think I'm gonna keep pluggin away with B3D until BMax is further along. I know Mark is working his a$$ off on it. I can't wait to harness the true power in a few months. I have some really cool ideas.

Dreamora...what did your name used to be?


Sweenie(Posted 2005) [#17]



Dreamora(Posted 2005) [#18]
Dreamora
haven't changed mine


FlameDuck(Posted 2005) [#19]
Multiplayer for example. Where is it?
Just like the 3D module, the GUI module and the DX7 2D fallback module, the Multiplayer module is not finished yet.


Chroma(Posted 2005) [#20]
Who is making these modules?

Also the code Sweenie supplied is horrific(not your fault) compared to cube=CreateCube(). I hope Mark isn't reading this and wanting to shoot me. I hope everyone is getting/got what they wanted from the new BMax. I'm just hoping you don't need to be a rocket scientist to use it(ie. puting a cube on the screen and spinning it).


FlameDuck(Posted 2005) [#21]
Who is making these modules?
Blitz Research Ltd.

Also the code Sweenie supplied is horrific(not your fault) compared to cube=CreateCube().
Yes. The code Sweenie supplied is low-level OpenGL code which is currently, that is until the 3D module is finished, the only way to do 3D in BlitzMAX. If you don't want to bother with low-level OpenGL stuff, and/or want to use the same sourcecode and be able to use a DirectX9 fallback on Windows platforms, then I suggest you wait for the official 3D module.

I'm just hoping you don't need to be a rocket scientist to use it(ie. puting a cube on the screen and spinning it).
No. I'm sure the BlitzMAX 3D module will be at least as abstract as Blitz3D is - even tho' it's dealing with more complex issues.


Chroma(Posted 2005) [#22]
Well that is great news. I guess that gives me plenty of time to work on my game design. =)