iMiniB3D

BlitzMax Modules Forums/MiniB3D/iMiniB3D

MiniB3D, now on iPhone:

http://www.si-design.co.uk/iminib3d_bird.mov

http://www.si-design.co.uk/iminib3d_zombie.mov

Incredible!

It is a porting of Bmax+MiniB3d on Iphone or something completely new?

thats great simonh !
great news imho

WOOT! How? What? Where? Programming language? tell me more!

Looking good...

good port!

Good job. I really hope this gets a release, commercial or otherwise.

Hmmmm. Plain vanilla Max2D in the pipeline, by any chance? :-?

Interesting!

Please say Max is going iPhone .......

It's a C++ and OpenGL ES port of MiniB3D. You still need to use C++ or Objective C to be able to use it.

It would be interesting to see the source behind one of the demos you have posted a vid of :)

wowwww

gooodddd

That is far beyond cool... I'm just stunned by the awesome involved.

SuperGerball for IPhone/Ipod touch is coming :D
Do you want to sell the 3d engine or is something you made for yourself only?
Will it be an 'BRL branded' product (in case you want to sell it) or not?

Here's the code for the zombie demo - most of it relates to the 'twin stick' controls:

#include "zombie.h"

void Zombie::Init(){

	piv=Pivot::CreatePivot();
	piv->PositionEntity(0.0,5.0,0.0);
	piv->EntityType(1);
	piv->EntityRadius(2,3);

	cam=Camera::CreateCamera(piv);
	cam->RotateEntity(0.0,0.0,-90.0);
	cam->CameraViewport(0,0,320,480);

	light=Light::CreateLight();
	light->PositionEntity(0.0,0.0,0.0);
	light->LightRange(20.0);
	
	zombie=LoadAnimB3D("zombie.b3d");
	zombie->Animate(1,0.5);
	zombie->ScaleEntity(.5,.5,.5);
	
	level=LoadAnimB3D("test.b3d");
	level->ScaleEntity(4,4,4);
	level->EntityFX(1);
	level->EntityType(2);
	
	// controls
	
	cc=Camera::CreateCamera();
	cc->PositionEntity(0.0,1000.0,-5,0);
	cc->CameraClsMode(false,true);

	pp1=Pivot::CreatePivot();
	pp1->PositionEntity(3.0,1000.0-5.0,0.0);

	pp2=Pivot::CreatePivot();
	pp2->PositionEntity(3.0,1000.0+5.0,0.0);
	
	mm1=Mesh::CreateSphere(8,pp1);
	mm1->PositionEntity(0.0,0.0,0.0);
	mm1->EntityColor(0,255,0);
	mm1->EntityPickMode(1,true);
	mm1->EntityRadius(2.0);

	mm2=Mesh::CreateSphere(8,pp2);
	mm2->PositionEntity(0.0,0.0,0.0);
	mm2->EntityColor(0,0,255);
	mm2->EntityPickMode(1,true);
	mm2->EntityRadius(2.0);
	
	//
	
	Global::Collisions(1,2,2,2);

}

void Zombie::Run(){

	static int sphere_bond1=false;
	static int sphere_bond2=false;
		
	static float offx1=0.0;
	static float offy1=0.0;
	
	static float offx2=0.0;
	static float offy2=0.0;
	
	int mm1_picked=false;
	int mm2_picked=false;
	
	float px1,py1,pz1;
	float px2,py2,pz2;
	
	for(int i=0;i<Touch::CountTouches();i++){
	
		Entity* ent=Pick::CameraPick(cc,Touch::touch_list[i]->x,Touch::touch_list[i]->y);

		if(ent==mm1){
		
			mm1_picked=true;
			px1=Camera::projected_x;
			py1=Camera::projected_y;
			pz1=Camera::projected_z;
			
		}
			
		if(ent==mm2){
		
			mm2_picked=true;
			px2=Camera::projected_x;
			py2=Camera::projected_y;
			pz2=Camera::projected_z;

		}

	}
	
	if(mm1_picked==true){
	
		if(sphere_bond1==false){
		
			offx1=mm1->EntityX(true)-px1;
			offy1=mm1->EntityY(true)-py1;
		
		}
		
		sphere_bond1=true;
	
	}
	
	if(mm2_picked==true){
	
		if(sphere_bond2==false){
		
			offx2=mm2->EntityX(true)-px2;
			offy2=mm2->EntityY(true)-py2;
		
		}
		
		sphere_bond2=true;
	
	}
	
	if(mm1_picked==false){
	
		sphere_bond1=false;
		mm1->PositionEntity(0.0,0.0,0.0);
	
	}
	
	if(mm2_picked==false){
	
		sphere_bond2=false;
		mm2->PositionEntity(0.0,0.0,0.0);
	
	}

	if(sphere_bond1){
	
		float smy=mm1->EntityX(true)-pp1->EntityX(true);
		float smx=mm1->EntityY(true)-pp1->EntityY(true);
		
		smy=smy*-1;
		
		smx=smx/10.0;
		smy=smy/10.0;
	
		piv->MoveEntity(smx,0.0,smy);

		mm1->PositionEntity(px1+offx1,py1+offy1,pz1,true);
		
	}
	
	if(sphere_bond2){
	
		float smy=mm2->EntityX(true)-pp2->EntityX(true);
		float smx=mm2->EntityY(true)-pp2->EntityY(true);
		
		smx=smx*2.0;
		smy=smy*2.0;
		
		smy=smy*-1;
	
		piv->TurnEntity(smy*-1,smx*-1,0);

		mm2->PositionEntity(px2+offx2,py2+offy2,pz2,true);
		
	}
	
	piv->TranslateEntity(0,-0.2,0);

	Global::UpdateWorld();
	Camera::RenderWorld();

}

void Zombie::End(){


}


No idea about how it will be released yet.

And degac, yes, you're quite correct - couldn't resist giving Monkey Ball a run for it's money.

Well done, Si. Looks great in both video and code formats!

Can I buy or download the C++ port of MiniB3D somewhere?
I really need it :)

If the license is in source code form, I would also convert it to C, so that's it easier to read and code with it, and also faster to run.

Nice work Simon! I look forward to working with this. :)

Very cool!

YES

Please hurry up!!

Very cool, simon!

Okaaaay... how long until release? It will be free, or it will cost something?
Would it work on Brew + OpenGL/ES? (Since Brew is very close to C...)

This is really awesome!

I'm not familiar with Brew, but yes it probably could be made to work on that.

I'm not sure about the release yet...

Any vague (or otherwise) thoughts about porting it to google phone?

Nice.
Could you please bring it to a platformindependent C++ code, so that is possible to compile it also on Windows, Linux and MacOSX with C++?
I know, there existing alredy the normal minib3d. But with the C++ version it is possibly easier to use it in other Basic-dialects, Pascal and other languages.

Beaker - no, I don't have a Google phone, and can't really justify buying one. Theoretically it should be very easy to port though.

Stenley - maybe so, at some stage.

You could always use the excellent android emulator. :)
http://code.google.com/android/reference/emulator.html

I didn't know about that, thanks for pointing it out. It does indeed looks excellent.

Any news? :)

It's mostly done now, just need to smooth out a few rough edges.

WOW! That's just awesome!!!

I can't wait!! :-)

Simon,

I have not seen your videos(since I'm at work), but I have seen what your have done with MiniB3D.

I would like to see an Android version as well. This would be a HUGE step for the android os.

Check this out: http://code.google.com/android/adc.html
If you did happen to enter, you would of won some erious cash!!
Also, the dev that entered CompareEverwhere was recently hired by google. (After the contest, of course).


Jason

Any more news yet?..

I really, really need the iPhone version! :-)

An early version is ready for testing - please email me at si@... if you're interested.

I'm very interested!! Just sent you an email with my address (it's private). Looking forward to seeing this.. :-)

Only just found out that you can only use Java for Google Android apps, so no chance of MiniB3D for Android.

why not? you can use openGL in java

Jeremy: Because Simon have ported it from Blitzbasic to C++ and not to Java?

But I am also interested in the sourcecode of iMiniB3D. Hopefully MiniB3D and iMiniB3D will be parallel developed, so that new features in the one packege will also exists in the other package.

And hopefully a new version of MiniB3D and the first version of iMiniB3D will be soon released.


Btw:
If there comes no port of iMiniB3D to Android, then it would be hopefully possible in the future to realease it for SymbianOS.

In the future Symbian will be OpenSource under the Eclipse Public License:
http://www.qtsoftware.com/about/licensing/frequently-asked-questions
http://www.nokia.com/A4136001?newsid=1230416



There stand: "The Symbian Foundation has chosen the Eclipse Public License for Symbian".

And it seems, that for Symbian will be in the future mostly written in Qt (C++).

I send you an email from my iPhone simon, did you get it?

Yes, thanks. I've got nothing to send out right now but should have shortly.

i work for translatio to blitz3d / unity3d

it is hard
but i coverted a 2 games

your iminib3d is finish?

thanks

Simon, when you have a new version ready I'll happily test it. (I've written a few small test games with the current version, no new bugs to report. :-) )

Hello Simon

When is shortly?

Soon!

Any news?

I'll try and send it out by Monday.

*Clears schedule*

OK, I've sent out the new version to everyone who requested it.

would you please give some link to download?

No, I wish to limit availability for now, as I haven't decided what I'll be doing with the release version. It more than likely won't be free.

if it's for sale,you can post some demo version!

> No, I wish to limit availability for now, as I haven't decided what I'll be doing with the release version. It more than likely won't be free.

Ummpf. :-(
Can't you say that earlier ?

You say since a long time, that you want to publish it. You have raised our expectations. Then you tells a time, when it comes. And as the time comes, you publish ... nothing.

I haven't said at any stage how iMiniB3D would be released, because I hadn't decided (and still haven't). I've sent test versions to people as I said I would.

Your complaint is what?

I think its nice that Simon has send test versions, and I don't mind paying for it when it comes in the full version.

OK, I've sent out the new version to everyone who requested it.


Thanks

I think its nice that Simon has send test versions, and I don't mind paying for it when it comes in the full version


It might be an arrogant thing to say, but I think simon would be a fool not to try and market this. If you can't cough out a few bucks for iphone development, you're joking yourself anyhow.

It might be an arrogant thing to say, but I think simon would be a fool not to try and market this. If you can't cough out a few bucks for iphone development, you're joking yourself anyhow.


Yeep, i agree.

Its performance on actual hardware is real nice -- it's shaping up to be well worth a license fee.

Does anyone have some 2D examples for iMiniB3D?

I doubt it, there's only a handful testers and most of them have only just started using it.

For 2D stuff you just need to restrict everything to two axis. Pure 2D, like Max2D is not supported - you'd be better off using a different lib for that.

I would definitely buy it if I could use BlitzMax and write iPhone apps.

Cocos2d:
http://code.google.com/p/cocos2d-iphone/

I wonder if Cocos2d and iMiniB3D can be integrated.

Haven't needed 2D for anything yet, but there's nothing in iMiniB3D for 2D stuff.

@Simon, maybe your next project should be 'iMiniB2D'. :-)

Cocos2D looks good - doubtful if it could be integrated with iMiniB3D, but if that's possible it would be great.

I think I spotted a QuadMesh type as I was browsing through the source today, so that's a start! Cocos2D is sweet and, looking at the site, he seems to have switched to a new license that specifically allows closed source projects, making it a bit more commercially viable.

EDIT: Corrected Cocos2D iPhone license description.

Yes, Mesh::CreateQuad(). If I were to do it myself, I would probably use the Sprite class though.

I wonder if there's a surface overhead for sprites, or if it's not a factor? :-/

Yes, sprites are quite slow at the moment due to the fact that 1 sprite = 1 surface. I intend to add a single surface sprite system at some stage. (Bit of a tongue twister!)

Good news - I've got a sprite 'batching' system working, that renders a bunch of sprites at once as a single surface. It happens automatically, too, so you don't have to make any changes to your code.

Cool. Can't wait to see that!