Blitz C++ library anyone?
Blitz3D Forums/Blitz3D Programming/Blitz C++ library anyone?
| ||
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! |
| ||
hmm, explain? |
| ||
Sure! |
| ||
I'm confused as well. What are you proposing exactly? |
| ||
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! :) |
| ||
it would be just as fast but youd get better data handling |
| ||
Blitzmax will be addressing alot of the speed issues in Blitz wont it? |
| ||
he's suggesting wrapping blitz's rendering engine into a dll. Bad idea. |
| ||
Blitz in C++, why that's crazy talk!! |
| ||
Sounds good to me. |
| ||
you should sell it for a hundred dollars |
| ||
This is one of those things I'd just absolutely love. Provided it used OpenGL and I could have access to the source code. ;) |
| ||
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. |
| ||
but i bet he's way too busy with BlitzMaX. It or one BR's other products. most likely it though. |
| ||
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. |
| ||
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. |
| ||
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(); |
| ||
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. |
| ||
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. |
| ||
/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. |
| ||
That looks really cool. Good work. How is it done and can you share some demos. |
| ||
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 |
| ||
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. |
| ||
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. |
| ||
www.EzBlitz.com It's just up there, so nothing worth looking at yet. |
| ||
why? Blitz is its own Language?? |
| ||
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. |
| ||
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 |
| ||
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. |
| ||
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 ... |
| ||
Nobody was me - I was logged out :P |
| ||
Verfum. Keep going mate. It's a cracking idea. How far are you along. Any demos etc yet... |
| ||
I'm writing such lib for java for my blitz to java compiler. :-) And trust me, it's hard work! |
| ||
PJR, Tell me more :) |
| ||
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. |
| ||
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/ |