Blitz C++ library anyone?

Blitz3D Forums/Blitz3D Programming/Blitz C++ library anyone?

verfum(Posted 2004) [#1]
Would anyone be interested in a C++ library version of Blitz?

I know it doesn't exist, but I'm interested to know if there are any C, C++ or Java programmers out there who think they would prefer to use Blitz directly from their code!


aCiD2(Posted 2004) [#2]
hmm, explain?


JaviCervera(Posted 2004) [#3]
Sure!


Warren(Posted 2004) [#4]
I'm confused as well. What are you proposing exactly?


AntonyWells(Posted 2004) [#5]
I think it would be a great idea. Basically, call graphics() and etc, but within C++ it's self. So you get the ease of blitz with the sheer breakneck speed of visual C++.

Mark, do this, now! :)


slenkar(Posted 2004) [#6]
it would be just as fast but youd get better data handling


RifRaf(Posted 2004) [#7]
Blitzmax will be addressing alot of the speed issues in Blitz wont it?


Kanati(Posted 2004) [#8]
he's suggesting wrapping blitz's rendering engine into a dll. Bad idea.


Craig H. Nisbet(Posted 2004) [#9]
Blitz in C++, why that's crazy talk!!


smilertoo(Posted 2004) [#10]
Sounds good to me.


slenkar(Posted 2004) [#11]
you should sell it for a hundred dollars


N(Posted 2004) [#12]
This is one of those things I'd just absolutely love.
Provided it used OpenGL and I could have access to the source code. ;)


SopiSoft(Posted 2004) [#13]
he's suggesting wrapping blitz's rendering engine into a dll. Bad idea.


if that's what he's suggesting then yes, bad idea maybe...someone or a team should mimic the blitz commandset and write all functions from scratch and then make it so that the functions can be called from the dll. And support DX9 as well...

mark could do this too of course, but i bet he's way too busy with BlitzMaX.


poopla(Posted 2004) [#14]
but i bet he's way too busy with BlitzMaX.

It or one BR's other products. most likely it though.


code(Posted 2004) [#15]
haha after i get done with one of my projects(a long time from now i making a BASIC lang) I was thinking about makings something like this. Prolly will never get done though.


verfum(Posted 2004) [#16]
I'm working on a crayzee method of controlling Blitz via a dll, a C++ library + shared memory. You can call functions in C++ that have the same names and functionality as Blitz. Some calls will be slower than if they were performed in Blitz, although because the sharing works both ways you can create Blitz libraries that work fast that you use in C++ (like a game engine).

I've done preliminary tests and it seems very fast.
I think for extreme graphical manipulation you'd have to create your own Blitz library functions to use in C++.

I believe someone else has attempted this in the past
Koriolis with BlitzBridge. I'd like to know where to get this.

Thanks for your comments.


verfum(Posted 2004) [#17]
I've got it working.
Here is an example program written in EzBlitz!
It runs at exactly the same fps as Blitz!


EzBlitz blitz;
unsigned int camera;
unsigned int light;
unsigned int cone;

blitz.Start();
blitz.Graphics3D(1280, 1024, 32, cFullScreen);
blitz.SetBuffer(cBackBuffer);
camera = blitz.CreateCamera();
light = blitz.CreateLight();
cone = blitz.CreateCone(32);
blitz.PositionEntity(cone, 0, 0, 5);

float a = 5;
while(1)
{
blitz.PositionEntity(cone, 0, 0, a);
blitz.RenderWorld();
blitz.Flip();
a+=0.02;
if(a == 10)
{
a=5;
}
}

blitz.Stop();


eBusiness(Posted 2004) [#18]
How exactly did you do that?
And by the way if you want to compare framerates then use Flip(0).
Seems like you have got hold on it.


Rob(Posted 2004) [#19]
I think that there should be a limit on allowing blitz to be wrapped as if it is just wrapped then technically you are using the engine without prior consent. The engine is a dll embedded in the exe. I would ask mark's permission.


*(Posted 2004) [#20]
/me is with Rob

Although on the other hand if you code the entire command set from scratch with the prospect of porting your app/game to another language then that should be allowed (seeing as people have already 'duplicated' the command set IIRC).

What I may do at a later date is do a C++ wrapper for OpenGL that has 'similar' commands to Blitz3d so I can port my apps to C++ so I can get better tighter control over the behind the scenes stuff.


CyberHeater(Posted 2004) [#21]
That looks really cool. Good work. How is it done and can you share some demos.


verfum(Posted 2004) [#22]
Cheers for your supportive comments!

I'm going to complete the whole command set first. I've also got a faster method of doing this but it's extremely complicated (although I'm getting full frame rate at the moment) and will take some time to complete - it will use the same C++ interface. In this way I can create applications and they will run on the new system when I have the complete command set working.

A friend and I are making a game that should prove the capability of this system. We'll set up a web site to show demos and screenshots during development.

As for how I've done it - I'm using shared memory, it's easy. I've heard that someone tried this before (BlitzBridge) and I'm surprised it never took off (I'm trying to find a copy of it).

When I've got it to a suitable state I might release it for download or something.

I'll post the URL when I get the site up-and-running.

Kind regards


Kuron(Posted 2004) [#23]
Verfum: Sounds like a killer idea, you can use Blitz with the language of choice, and the way you are doing it, youd o have to be a Blitz owner to use it. Somebody wrote something like this for Dark BASIC Pro and its been great and well-received.


verfum(Posted 2004) [#24]
I've just bought some webspace for EzBlitz and the game that we're creating. I'll try and get something up there explaining what I'm doing by the weekend.


verfum(Posted 2004) [#25]
www.EzBlitz.com

It's just up there, so nothing worth looking at yet.


Neochrome(Posted 2004) [#26]
why? Blitz is its own Language??


skidracer(Posted 2004) [#27]
I've just bought some webspace for EzBlitz and the game that we're creating


Shared memory subsystems for high performance c++ modules is cool, using the name Blitz for a commercial venture without permission is not so cool and publicly exposing the entire Blitz API to non registered coders is way out of line.


Red Ocktober(Posted 2004) [#28]
Neo... that's primarily the reason for something like this... the ability to use a language that the user feels comfortable with... something with object oriented coding features like c++ is a generation or two above the procedural spegetti that i wind up doing with the native Blitz language...

I like to have my functions close to where they are going to be working...

hey S... if the package requires a licensed version of Blitz in order to function, i don't see hwere the problem would be...

... and one look at the code above doesn't look like it's revealling anything about the Blitz api to anyone that hasn't already poked around in it...

... but yeah, the name definitely would seem to imply that it's a Blitz sanctioned work.

at any rate... this looks very exciting... and would be a definite plus to develpopment in Blitz.

I would use it... definitely.

--Mike


electronin(Posted 2004) [#29]
Sounds good to me. I think one of the most important advantages to this would be filesize. You could link only the stuff that you needed into the exe.


Nobody(Posted 2004) Edit [#30]
skidracer

The way the system works, you'd need to be a registered Blitz3D user. EzBlitz just communicates with Blitz.

Unregistered Blitz users can already see the API
http://www.blitzbasic.com/b3ddocs/docs.php

As for the name EzBlitz - perhaps your right about getting permission, but if this encourages more people to buy Blitz, I can't see too much of a problem.

Who said anything about a commercial venture ...

verfum(Posted 2004) [#31]
Nobody was me - I was logged out :P


CyberHeater(Posted 2004) [#32]
Verfum. Keep going mate. It's a cracking idea.

How far are you along. Any demos etc yet...


PRJ(Posted 2004) [#33]
I'm writing such lib for java for my blitz to java compiler. :-) And trust me, it's hard work!


verfum(Posted 2004) [#34]
PJR,

Tell me more :)


verfum(Posted 2004) [#35]
I was toying with the idea (and I stress toying) of writing a parsing+conversion utility that converts your C++ application into Blitz code. You compile in the normal Blitz way.


verfum(Posted 2004) [#36]
How EzBlitz works.

Here is an article from CodeGuru which explains the system that EzBlitz uses.

http://www.codeguru.com/Cpp/misc/misc/article.php/c415/