Very interested in conversion to miniB3D

BlitzMax Forums/MiniB3D Module/Very interested in conversion to miniB3D

Ryan Burnside(Posted 2007) [#1]
I've already got a 2d framework going but have seriously considered making my little application in full 3d.

It's great to make freeware but I don't have money to purchase Blitz3d. Thanks for a great looking freeware product!

I have some questions however. I know that this system is based on Blitz3D and is not OOP. I've only ever programmed in OOP languages. Currnetly my game is a top down shooter with some rotated images to denote the direction the player is facing. My game is more than one screen large and I've use the setorigen(x,y) command to set the position of the screen within the game world. I assume I'd just use a camera and set it's x and y to the old origin's position. IS this how it would be done?

Also I've noticed that the example uses .b3d models or something to that effect. How do these differ from say .3ds files? It seems like they would need a special conversion software?

Really I just want cones facing the direction the object is moving and a 90 degree top down angle for the camera. I'm not really concerned about texyure mapping just plain lighted solids.

In my game I have a radar hud at the top of the screen, will a conversion to 3D still make this possible or is 2d drawing more complex/undoable?

Here is a 2D pic so you can see what I'm getting at...



H&K(Posted 2007) [#2]
and is not OOP
Yes it is.
If you download it you will see that the B3D commands are functions ontop of the base OOP that simonH has coded.
That is, say you have (in B3D and MiniB3D)
RotateEntity (MyEnity,pitch#,yaw#,roll#)
you can use
MyEntity.RotateEntity (pitch#,yaw#,roll#)
if you wanted to. Really Simon didnt need the "Entity" bit at the end of the method as
MyEntity.Rotate (pitch#,yaw#,roll#)
Would have been understandable if you named your entities properly. (But he has, and it works, so Im not complaining)


Ryan Burnside(Posted 2007) [#3]
I'm a bit confused with the concept of entitys. I thought they would be similar to sprites and you could just call a draw command(). Does this mean tht everytime I want to draw a shape I need to make a whole new entity for it? I really don't want a hundred versions of the same object. The examples show an entity for every image this is why I'm a bit confused.


Also how can I create usable mesh files? I wish there were more tutorials to using this great library with blitzmax.

Can I use blitzmax drawing commands with miniB3D?


simonh(Posted 2007) [#4]
You only need to create entities once. Then MiniB3D keeps track of them, and draws them (mesh entities and sprite entities) when you call RenderWorld.

It's a different way of thinking to using Max2D, but once that soon becomes natural.

To create usable mesh files you need to use programs that export to .b3d. Ultimate Unwrap 3D (www.unwrap3d.com) is a great way to convert files to .b3d format.


Ryan Burnside(Posted 2007) [#5]
Thanbks for the help so far.

I REALLY hate to ask but would anyone mind making a small demo in max, showing a random number of types moving along the x,y plain drawing cones that point in their direction of travel? The camera should point strait down along the z axis.

I think I just need a leg up on this.

I know most people are busy, but I hope somebody has time.


Chris C(Posted 2007) [#6]
have a look at the primitives example that comes with minib3d you could *easily* experiment with that as a base and I bet you dont find it half as hard as you think it is!

generally speaking the Y axis is up/down with X & Z defining the "ground plane" but you dont *have* to do it that way

moveentity and turnentity are usually used with the entity itself as the centre of origin

so you can do moveentity playerent,0,0,0.1 to move the playerent in the direction its facing

think of "entity" as a real world persistent object

What are you trying to achieve your screenshot but rendered in 3d?

do you have a ship type? if so just give it an entity field and let that field keep track of all the position orientation info for the type instance


Ryan Burnside(Posted 2007) [#7]
Ah Ok.

They have field values for their meshes now and it appears to be working correctly.

Now I've moved to 3D but my old fonts and sprites are all messed up and setcolor(R,G,B) no longer works for flat images. :(




Chris C(Posted 2007) [#8]
I've not used max2d with minib3d myself but that looks like a problem with an opengl state no being reset

(its hard to see without being able to break the code!)

I believe there's a version on minib3d floating around that was made to work with max2d - on some german forum??

Your better move would be to have a go at fixing the current minib3d tho (and contributing the fix back!)

and see it wasn't as hard as you thought it was going to be either was it! ;p


[edit] see this! http://blitzmax.com/Community/posts.php?topic=66843