things i dislike about bMax
BlitzMax Forums/BlitzMax Programming/things i dislike about bMax
| ||
First, sorry for my poor english.. my native language is portuguese. Hi there. I'm was a Blitz3D programmer for a long time, and stoped using it when i moved to Linux, so i was really excited about bmax, cuz i could start using blitz again. But a few problems are making me mad sometimes.. here we go : 1- the linux IDE é kinda ugly.. i saw it running on a windows machine and was a little better. Hope the IDE will get better on a final Linux version. Oh, the linux IDE crashes a lot too.. 2- no method overloading ? No overloading at all ? I cant even call a variable "ship" if there is a type called "Ship" ? Hum, thats bad.. really bad. 3- the way the construtor works is kind weird. Why not making it more like java, python or ruby ? 4- Pointers.. if the way methods works were more like java, pointers could have been avoided.. i hate pointers. The technology is really sweet, and it's possible to make some really nice stuff. But i think the sintax of the language needs a few changes. Im a Java fanatic, maybe thats why i think that way ;) Too bad graphics in Java are so hard to master. |
| ||
Java is NOT designed for speed which is vital in games programming - languages like C++ and BlitzMax are. I love pointers. |
| ||
still, no use for pointers. I mean, they are usefull, but the user should not use it directly. Example : Class Test { public method( SomeVar someVar ) { this.someAtribute = someVar; } } in java, someAtribute will be just a pointer to someVar. In blitz, it would be a different variable, so to do something like that in Blitz, u need pointers.. See ? So java is easier in this case. |
| ||
You're right you can't create a global variable with the same name as a Type. But, you can if it's scope is limited:Type ship Field x,y End Type Function blah() Local ship = 3 End Function You (or I) are unlikely to see any major changes to the syntax of BMax. But, I suspect Mark might be able to fix the above situation, as minor as it is IMO. Java is a world unto itself. Sorry to hear you aren't getting on that well with it, but I suspect perseverence may help. |
| ||
i will continue to use it. In fact we are working on a big project with that, our Final Project in the university. i do like it, but if i was the developer, i would have done some things different. In fact i plan to make my own language/compiler for games in the future ;) but first i must learn a lot about making a compiler (im still in the Parser coding part hehehe) |
| ||
Whatever floats your boat. |
| ||
Pointers are great, theres no need to deal with them if you dont want to then so can't see why you "hate it". Just simply dont use pointers.. easy peasy. |
| ||
1- the linux IDE é kinda ugly.. i saw it running on a windows machine and was a little better. I reckomend using Eclipse (and brucey's litte plug-in number) for all your BlitzMAX/IDE needs! It really does make programming a joy! (A shame there's no background compilation, but I suppose you can't have your cake and eat it.) 2- no method overloading ? No overloading at all ? Yeah, that is a bit annoying. I cant even call a variable "ship" if there is a type called "Ship" ? Hum, thats bad.. really bad. That on the other hand is probably a good thing. Why would you want to, anyway? 3- the way the construtor works is kind weird. Why not making it more like java, python or ruby ? It's not a "real" constructor either. Slightly annoying, but since you should be using a Factory pattern for all of your non-trivial creation needs, and the New() method works fine for trivial datatypes, it's hardly a show stopper. Now the lack of access modifiers on the other hand... 4- Pointers.. if the way methods works were more like java, pointers could have been avoided.. i hate pointers. It is and they are. Pointers are there for C people who insist on managing blocks of memory themselves. If you aren't interfacing with third party software you should never need to use a pointer. Java is NOT designed for speed which is vital in games programming Java does not need to be designed for speed, because in the 15 or so years since it was invented, computers have gotten a factor 5000 faster. in java, someAtribute will be just a pointer to someVar. In blitz, it would be a different variable, so to do something like that in Blitz, u need pointers.. Objects in BlitzMAX are "passed by reference" too. Simple datatypes are passed by value. Pretty much the same deal as Java as far as I can tell.Anyway, BlitzMAX is still young and I'm sure it will mature with time. Other languages have. |
| ||
What FlameDuck said. |
| ||
I'll add to that list. 5. No DirectX 2D library! I'm into making commercial games that have a high compatibility and reaching the largest market I can. |
| ||
I'm into making commercial games that have a high compatibility and reaching the largest market I can. Games like what? DirectX is not likely a requirement for reaching your maximum market potential. |
| ||
A 2D DirectX library is sorely missed. There'll be one sooner or later, though. |
| ||
I second the requests for function and method overloading. Often it is useful from the programmers point of view for a library to provide several overloaded methods / functions for the convenience of the programmer. It would make the New() method in particular much more useful. |
| ||
I have a have done GDI 2d module.. lol built into my half done win32 module. Waiting until bmax is final before really doing much. |
| ||
I've done a software 2D module. Works on any platform SDL can be built on. |
| ||
I have a have done GDI 2d module. Really? That's rather interesting. What kind of speeds are you getting, and does it work well with the regular Max2D or is it a "glorfied wrapper" for Bit-Block transfer? |
| ||
It's not really very fast, especialy with things like drawing a masked image. Requires many blt operations. It is just a wrapper for the gdi bitblt functions yes. How else would it be done with gdi ? (apart from creating a dx surface .. which isnt gdi anyway lol). Once blitzmax has gone final for pc I'll pickup my win32 module and seperate the gdi component from the gui bits.. probably rewrite the whole lot. The SDL one sounds interesting, any more info noel ? |
| ||
SDL is great for unaccelerated 2D; but AFAIK, it can only do 3D acceleration with OpenGL? We'd still be stuck without DirectX 3D acceleration for 2D... |
| ||
If you think about it, bmax is actually pretty cool, and has A LOT of functionality as it is atm. Remember, it is still beta :) |
| ||
SDL is great for unaccelerated 2D; but AFAIK, it can only do 3D acceleration with OpenGL? I believe it relies on Mesa3D for 3D, so it will provide software rendered 3D if no suitable OpenGL hardware driver is found. |
| ||
There's a way to figure out of an OpenGL driver is software or hardware?! DirectX 3D + Mesa3D (I hear it's quite fast) would probably be ideal for initial test then fallback... |
| ||
I believe it relies on Mesa3D for 3D, so it will provide software rendered 3D if no suitable OpenGL hardware driver is found. That's only if you've got Mesa3D installed as your OpenGL driver. A lot of Linux systems have it installed or at least available. OS X falls back to software mode (at least my old Powerbook without HW acceleration does and it's hella slow, but it's not Mesa3D). On Windows it depends on the OS version, graphics card and numerous other factors. |
| ||
Ah - that's no good then. |
| ||
There's a way to figure out of an OpenGL driver is software or hardware?! Yeah. Haven't tried it, but according to the OpenGL Specification you can use glGetString to get GL_VENDOR or GL_RENDERER which should return what you want. That's only if you've got Mesa3D installed as your OpenGL driver. Ah, okay. I stand corrected. On Windows it depends on the OS version, graphics card and numerous other factors. Sigh. |
| ||
That on the other hand is probably a good thing. Why would you want to, anyway? In java, most of the time i call an object the same name of the class. Example : Map map = new Map(); In blitz i must call it myMap or whatever. Pointers are great, theres no need to deal with them if you dont want to then so can't see why you "hate it". Just simply dont use pointers.. easy peasy. Its not that simple. For example.. i have a Type called Map and there is LOTS of informations on that type. I also have lots of objets of the type Tile, and all of them need to access the Map object (and i dont wanna make anything global, cuz its make code messy and hard to expand/maintain). In java, i just need to pass Map as a parameter to the tile construtor, and all of the tiles will have a reference to the same object Map. In Blitz, to do the same thing i MUST use pointers, otherwise each object tile will have a reference to diferent Map objects, and this will consume all my memory. pseudo-java code, a tile with a Map reference. public class Tile { private Map map; public Map( Map myMap ) { map = myMap; } } in this case, the map is just a pointer/reference to the myMap object. In Blitz, to do something like that, i must use pointers, otherwise you will have 2 diferent objects, map and myMap (and thats not what i want). I reckomend using Eclipse (and brucey's litte plug-in number) for all your BlitzMAX/IDE needs! It really does make programming a joy! (A shame there's no background compilation, but I suppose you can't have your cake and eat it.) Thanks, i will check it out :-) i love Eclipse |
| ||
In java, most of the time i call an object the same name of the class. Example : Map map = new Map(); That's only because Java is case-sensitive. You can't do Map Map = new Map(); , for example. BlitzMax is not type-sensitive. Its not that simple. For example.. i have a Type called Map and there is LOTS of informations on that type. I also have lots of objets of the type Tile, and all of them need to access the Map object (and i dont wanna make anything global, cuz its make code messy and hard to expand/maintain). In java, i just need to pass Map as a parameter to the tile construtor, and all of the tiles will have a reference to the same object Map. In Blitz, to do the same thing i MUST use pointers, otherwise each object tile will have a reference to diferent Map objects, and this will consume all my memory. No you don't. BlitzMax works exactly like Java in that respect. Objects created with New are passed by reference, basic types (int, float etc.) are passed by value (unless you use Varptr or Var to obtain a pointer). |
| ||
That's only because Java is case-sensitive. You can't do Map Map = new Map(); , for example. BlitzMax is not type-sensitive. Nopes. Java is case-sentive, but thats not the point. For instance, the following example can be compiled under java : public class SomeObject { } ---- public class Test { public static void main( String[] args ) { SomeObject SomeObject = new SomeObject(); // The name of the object is the same name of the class, and i get no errors. } } A class is a class. An object is an object. No you don't. BlitzMax works exactly like Java in that respect. Objects created with New are passed by reference, basic types (int, float etc.) are passed by value (unless you use Varptr or Var to obtain a pointer). weird.. i will check it out again. |
| ||
@Noel Cower: Did you write a SDL wrapper ? |
| ||
Mirko: I wrote some C code that wraps SDL's 2D functionality. Everything else in SDL is pretty much inaccessible. |
| ||
2D would be enough for me. It's just that i need to draw a user interface, but my carpc does not support opengl (it does, but extremly slow). DirectX is supported very well, and i read that sdl is based on direct X on windows, right? Do you have plans to release your wrapper? |
| ||
TwoDee TwoDee is available under the GNU Lesser General Public License If you do not agree with the terms and conditions set forth in the GNU LGPL then you can either contact me or not use TwoDee. TwoDee requires development versions of SDL and a working copy of MinGW (preferably 3.4.x) |
| ||
License is not a problem to me, as it is only for my personal use. There are no plans on releasing the software to public or even sell it. Thanx, i will take a look at TwoDee. |