Create blitz games/apps in C++
BlitzMax Forums/BlitzMax Programming/Create blitz games/apps in C++
| ||
Would this be of interest to anyone?...... Each Blitz function is registered as a C function, and is then callable from a 'C' DLL. If all the Blitz functions were supported in the same fashion (as the demo code below) then it would be possible to write your game/application completely in C/C++ without having to further touch Blitz. This might be of interest to people who like the simplicity of drawing graphics with Blitz but who want to program purely in C/C++. This example draws a line rotationg about a point. Here's the C code Here's the C header Here's the Blitz code |
| ||
For me no - Blitz is a much nicer language than C IMO. If you were to distribute anything like that you would potentially make Blitz commands available to people who haven't purchased it, which is a big no-no. |
| ||
I'm not distributing it. Just letting anyone who comes from a C/C++ background know that the blitz functions can be called in this way so they can write in their native programming language if they want to. I'm not suggesting that Blitz programmers should code in C/C++ - god no! |
| ||
Nice sig you got there verfum. Thats the same specs of my first machine! except for the sound blaster ;) |
| ||
Haha sorry if I sounded a bit defensive there, verfum. I wasn't accusing. We had a guy try to sell a wrapped version of B3D recently and he actually tried advertising it on here! |
| ||
No worries. I wonder why it is possible to call the Blitz functions directly using the function pointer for Cls, Flip, DrawLine, but I couldn't get this to work for Graphics function. Any guesses? |
| ||
I'd be very interested in working in C++ -> theres alot of OOP stuff in C++ thats very nice (although dangerous) I'd like to be using. |
| ||
This would be great. Being able to hook into Blitz from Lisp via it's foreign function interface (which is designed with C in mind) would be awesome. |
| ||
Would this be of interest to anyone? Can't speak for everyone, but personally no. I haven't programmed in C/C++ for at least 5 years now (except for that course I took at Uni - talk about easy credit). With all the other wonderful languages that are available right now, I don't feel any rush to either. |
| ||
I like the idea of using the same technique for Lisp. I'm sure this is not limited to C or C++. There must be other languages that could call the Blitz functions via their pointers. How about a Blitz Java class implemented using the JNI to Blitz? Would this be possible using the pointer passing? |