Can B3d create more than just games?

Blitz3D Forums/Blitz3D Programming/Can B3d create more than just games?

Captain Wicker (crazy hillbilly)(Posted 2011) [#1]
Can B3d make AntiVirus software?
Can B3d make a Web Browser?
Is it possible to create a 3d modeler or sound editor with Blitz 3D?

These are really n00bish questions but i'm sure that there are answers out there...


Yasha(Posted 2011) [#2]
The main thing limiting B3D programs is that the built-in 3D engine means they have to be single, standalone GUI programs with a starting graphics context. So you can't really create anything that would run as some kind of background service; you can't create modules for other programs to use; and you can't create command-line programs that make use of the standard input and output streams to form part of a toolchain.

Blitz3D also has the limitation that the language itself is oriented towards very simple, procedural, single-threaded code, which is not the best kind of code for solving many kinds of problems that might involve fast manipulation of large blobs of data, parallelism, goal-based searching, etc. (The compiler's also pretty basic - haha - compared to BlitzMax or mainstream compilers, and doesn't generate optimised machine code.)

However, just because it's intended for 3D games doesn't stop it being useful for other kinds of application as well. 3D modellers and animators have indeed been made with Blitz3D (check out Maplet and Pacemaker), and many multiplayer games require a dedicated server - a program which communicates with the game client programs over network streams (if it doesn't bother to draw 3D graphics, they don't cost it very much and the graphics context can largely be ignored). A web browser is really just a program that retrieves files from elsewhere and displays them - you could easily write a Blitz3D program that grabbed files from the internet and rendered them in some fashion - having it correctly display the kind of rich content expected of modern web applications might be rather more difficult though.

And on the other hand, don't be afraid to learn about, then use, the right tool for the job. You shouldn't feel like you have to use Blitz3D unless it actually suits what you want to do. In fact, a valuable programming technique is to know when to "alternate hard and soft layers", writing some components in low-level languages like C or assembly, and integrating them with other components written in higher-level languages like Blitz3D or perhaps a scripting language. (You can do this with Blitz3D via its "userlibs" system, that allow it to link with DLLs written in other languages.)

Last edited 2011


Zethrax(Posted 2011) [#3]
Something else to bear in mind is that some programs can be hugely more complicated than they at first appear and may have long term overhead to them. AntiVirus software and web browsers are both good examples of that.

An antivirus program will need complicated access to a computer's file system and operating system, and will need to be regularly updated with malware signature files.

A web browser needs to be able to support a wide variety of web page standards as well as javascript, CSS, and other languages. It also needs to be able to integrate plugins.

When taking on any project of this nature, just be sure that you know what you're letting yourself in for. It's all good experience in the end though.


_PJ_(Posted 2011) [#4]
Can B3d make AntiVirus software?
Can B3d make a Web Browser?
Is it possible to create a 3d modeler or sound editor with Blitz 3D?

These are really n00bish questions but i'm sure that there are answers out there...




Well, the question is quite subjective. Meaning, it IS possible to do all the above, but not very practical. There are certainly much more suitable and definitely more capable solutions than using Blitz3D for all the above.

I would certainly advise against the first two examples, and even moreso, in particular, the first one. The basic reasoning for this advice is as follows.
Blitz is fundamentally something like a wrapper for DirectX communication with a little processing logic thrown in (okay, maybe I'm a tad infair to the old workhorse!). For utiilities that requires little in the means of graphics (certainly no 3D stuff), the pwoer of Blitz' DirectX engine use is no longer of any real benefit, and its reliance on the Windows OS framework means that it is extremely limited in its interactions with anything outside of its own runtime environment, and generally runs at too high level (as opposed to low-level in terms of scanning memory processes, drivers or network traffic etc.)
The result being, that its premise as an Antivirus wou;lld be sorely limited, perhaps to sim[ply scanning existing files or, with a little help from some DLLs etc. maybe check some registry entries too. Many malware devices protect themselves against typical windows action, such as permission changes to registry keys or Locking files etc. that Blitz could not affect any better than the typical Windows, user albeit with a LOT more hard-work.
The principle of many AV programs rely on Heuristics and Databases of known threat signatures too. This is obviously a LOT of work, and would require a great deal of knowledge on the malware around, which is an incredible strain on processing too for the poor CPU, and a nightmare to encode I'm sure, though it would enable your Blitz AV to spot the typical signs of infection in files and/or registry already present.
Overall, I'd say if you have the knowledge required to write such a program with Blitz, then you would likely be smart enough to A) Keep your computer nice and clean/safe for yourself easy enough, and B) Be able to code in a more suitable language for the task :)

As for the Web Browser, basic HTTP communication is simple enough (relatively), downloading pages on Port 80 is achieved in many neat examples in the Code Archives, but, then you'd need to know something of HTML to be able convert it for display. Again, that's not a mammoth task, but it's likely to be painstaking due to the numerous funcitons of HTML and the format of parsing the source.
The biggest problem with JUST READING the web page, would be that so many websites now typically make use of Javascript, Flash, other ActiveX Controls and, increasingly, PHP. Not to mention a myriad of other database or style resources.
There's no native means to interact with such codebases, though I believe there's a PHP 'thingy' n the Code Arcs (not something I've looked at personally). Alas, many of these resiources are actually protected online from anything that's not a recognised User-Agent, a security measure to ensure against cyber-attacks, though it means, your B3D browser, not being Internet-Explorer, Chrome, Opera or Firefox etc. wont be allowed to even catch a glimpse!
So you may not even be able to download the relevant code source, let alone even run the script or applet, which, is a very grey area ideed. Tools to view and run, say, Flash animations etc. are licensed products, whilst the license to watch such things is commonly bundled for an end-user in commercial Browsers, you MIGHT need to fork out some cash to even get hold of a DLL that you might be able to use with Blitz.

Both the above argments are not even getting anywhere near the complexity of coding the user-interface and useability of such applications either, which, although in many respec ts games are more complicated than utility applications, there are occasions, such as these, (and ESPECIALLY when dealing with user-input and UI layouts etc) where the lack of native typical gadgets/menus/windows and Mouse logic (aside from X,Y and button click I mean) etc. makes it a tedius process to create anything rem,otely user-friendly! ( - Okay, that's a bit of a personal gripe for me since I just hate coding such UI menus and front-ends :D )

So, that leaves the 3D Modeller:
This is by farm the most plausible and potentially worthwhile of the examples, since messing with 3D objects is what Blitz3D's directX interface is about.
To make a modelling program that is really versatile to B3D's capabilities, you will need a very good grasp of 3D mesh structure, in terms of Vertices and Surfaces, plus Child entities and such, including things like the UV coordinates and likely too, the aspects of animation.
Or, you could just opt for a simpler approach and work on deforming, adding/subtracting and texturing /lighting (collections of) primitives.
This is all possuble, and not beyond the bounds of the native B3D commands, though, like any coding project, always more complex than it may appear on the outset!
The biggest problems that I might foresee occurring are related mainly to organisation of texture layers or object hierarchy, and, more specifically, importing and exporting meshes.
Fortunaterly, there are many code archive entries dealing with all sorts of aspects, such as format conversions, animations, deforms, and fancy effects for materials too!

____________


Given Blitz3D's ease of use, I use it often for quick, simple things, particularly where repetition or files are concerned. For example, I made a thing for my dad that listed the items in his QuickStart tray:



Since such relies solely on Blitz' native commands, is extremely simple, but effective, AND is a lot easier/quicker to write in blitz than, say, C++

I also wrote another program (for which I wont post the code, since it's pretty messy and way too big) which was a utility for designing and printing labels for CDs/DVDs. Again, for my father's use. However, it's certainly nowhere near commercial quality and could not compete with the many, more dedicated/official solutions available.
Although I welcomed the challenege, it was hard work. I needed to incorporate DLLs for the Printing functionality, and identify the relationships between pixel sizes, the printers DPI capabilities and the scale of paper etc. I (and more importantly, my dad) was satisfied with the result, but it was nowhere near "ideal" in a general sense. It was pretty bug-free, but always felt too clunky and cumbersome. Perhaps a reflection on my coding in part of course, but ultimately, I believe it was significantly down to the crucial point I'm treying to make:

At the end of the day, with any sort of programming project, like any creative effort, one should try to use the right tools for the job.
One can improvise, and a problem may be solved, but will it be adequate, ideal, versatile, efficient or lasting?

New programming languages are created every month for various appliation and reasons, there's specialist software solutions for all manner of specific requirements. (A friend of mine actually investigates and tests many different languages for leisure!)
The drawback of course, is that whilst you may find a suitable language in which to address a particular challenge, you are then required to learn the language and how to debug it effectively and hopeffully, make it efficient!


*(Posted 2011) [#5]
I would say yes, with the right expansion DLL's and decls anything is possible.


Dabhand(Posted 2011) [#6]

I would say yes, with the right expansion DLL's and decls anything is possible.



Agree, I made a mate a piece of software once that controlled a laser that cut shapes in thin sheets of aluminium!

Well, I say my app controlled it, it was a bit of work for both of us, basically, I loaded in a shape, which then you could create cut lines, much like Photoshops magic wand tool... Then, these lines would be scaled up to suit whatever sized sheet you required, the whole lot was chopped into grid sections, with each section of grid saved in a file (Which was an image really), because the sheer amount of info for something just a metre by a metre was huge, proper page file hammering affair and would probably still kill PC's today if let loose! :D

Anyway, I had to send out messages via the serial port to a controller my mate had made, nothing major fancy, recursive pixel reading, which turned into flags telling the controller what direction to move in, such as 'MOTOR_UP | MOTOR_LEFT', as well as 'MOTOR_STOP', just incase, lol, these files were treated as you would treat a tilemap, starting at 0,0, read and send message for that grid, once done, send messages to the controller that made it offset on the sheet so that it would be at 1,0, load new data in, rinse repeat till the bottom right of the sheet!

Interesting little job that, never got paid for it, but, it worked... All via Blitz3D and a handful of userlibs! :)

Dabz

Last edited 2011


xlsior(Posted 2011) [#7]
Possible: Yes
Practical: No


_PJ_(Posted 2011) [#8]
Nice one Dabhand :) I find it helps to have a definite goal in mind with coding, even if it seems to be a lot of work or quite challenging!

-------------------

xlsior - I'm impressed. You summed up my entire earlier post and opinions in two short lines XD


vivaigiochi(Posted 2011) [#9]
i think if a language can make a game with sound,graphic etc etc it can make any type of application. Consider hovewer that result or your target depend on what you work..


H&K(Posted 2011) [#10]
B3d cannot create games, just as a spade cannot dig holes.

More helpful answer.
Yes, and if its the only tool you have available, with b3d you are capable of making a working version of ANY other piece of software available. (It may be harder to do and take loads of memory and unless you are aiming for a 1990s level of complexity- slower, but I think its only conditionals and jumps needed)
However, you are normally better off picking a tool that has been designed to do what you want to write.

(NB For those in the know, yep the proof is for any computer to model another computer, but by extension any language with access to them, can model any other computer running any software)


Danny(Posted 2011) [#11]
@H&K LOL!

Here's an example; A silly game I hacked together when bored sparked an idea and turned into a serious (fully B3D) application still used by 3D animation studios around the world today :)

http://www.redboard.tv

Last edited 2011