BlitzMax in Web Browsers

BlitzMax Forums/BlitzMax Programming/BlitzMax in Web Browsers

Chapman7(Posted 2010) [#1]
I wanted to know if anyone has any clue on how to embed a BlitzMax application into a web page, I have seen things like IGLoader(cant find it anymore) and OSAKit(Does not work great, and is $500 for full thing) I was wondering if you guys had any other suggestions or maybe methods of accomplishing this

Thank you!
Chapman7


markcw(Posted 2010) [#2]
Use Flash.


Chapman7(Posted 2010) [#3]
Im sorry... I didnt know I said I wanted to make a game in a web page, I think I said I want to embed a BLITZMAX APPLICATION


TommyH(Posted 2010) [#4]
You could upload your game on http://www.gamejolt.com.
They have some mechanism working similar to the GameMaker browser plugin.
Or contact those guys on their forum and ask how they did it ;-)


Kryzon(Posted 2010) [#5]
Similar thread, might have some more info:

http://blitzbasic.com/Community/posts.php?topic=88150

If you need a solution other than Flash, I'd advise Java - it's much faster, has applets and everything.


skidracer(Posted 2010) [#6]
For plugin technology I would start my investigations here:

http://firebreath.googlecode.com

Linking BlitzMax applications to such a framework would not be trivial.

If you have to build webapps I would reconsider your position on Flash and investigate using haXe+FlashDevelop as the development platform.


Dreamora(Posted 2010) [#7]
Or the use of Unity if its for more than 2D.

Generally OSAKit, IGLoader (and how its other versions before / after were called) are likely the only ways to get it in and the success is always restricted if you package in a fullscale exe as soon as you leave activex (IE only).


Ked(Posted 2010) [#8]
Im sorry... I didnt know I said I wanted to make a game in a web page, I think I said I want to embed a BLITZMAX APPLICATION

Seeing as you aren't very people-friendly, you should use the forum's search field with the keyword(s) "embed", "web browser", etc. I would NOT use that kind of attitude with someone who has given you a reasonable suggestion. Of course, it isn't the kind of answer you were looking for, but seeing as flash is almost always used with web browsers and BlitzMax is almost always used for standalone executables, flash would probably be the safest/less tedious way to go.


Kryzon(Posted 2010) [#9]
If you're straying off the BMax path towards web-compatible solutions like Flash, I'd advise taking the time to learn Java.

It's faster than Flash, pre-compiled if I'm not mistaken, and you can do a quick-start with one of the free 2D game engines out there.
Making APPlets with it is just a matter of using the right HTML tags. And nobody will be forced to download some "unknown" runtime like they would with OSAKit or IGLoader.


Mahan(Posted 2010) [#10]
Comments (@Kryzon):

I agree that java is much easier to get running in a web browser or even as a full app (using Java Web Start), than BlitzMax.

However I'd just add these facts:

1. Java is not always much faster than BlitzMax, it highly depends on what you do. Especially startup time is generally quite long with java. Also GC can be alot faster in BlitzMax if using the ref-counted single thread GC in bmx.

2. Java is NOT precompiled. However Java today uses JIT on most platforms and thus once the program/applet has "warmed up" it can reach quite impressive speeds. But again startup and the "warmup" (where often the JIT compiling is done) is SLooooow.

3. Java is NOT preinstalled on Windows. There are some brands of PC/Laptop makers today that pre-install Java but not all, so quite a huge part of a typical consumer-base will have to at least install the Java runtime (~16-20 mb) + click a few buttons the first time they want to start your game.


ziggy(Posted 2010) [#11]
Java is NOT precompiled
Yes it is. JIT operates on bytecode that can be generated by a Java compiler, or for any other compiler that targets the same bytecode, or even there is the Jassmin assembler for the JVM. http://jasmin.sourceforge.net/

But again startup and the "warmup" (where often the JIT compiling is done) is SLooooow.
It can be slow unless the Java application is compiled to pure native code at install time instead of done at runtime. This is possible on Java, and then it runs at impressive speeds, comparable to native compiled C++, but applications take longer to be installed.

Java is NOT preinstalled on Windows. There are some brands of PC/Laptop makers today that pre-install Java but not all, so quite a huge part of a typical consumer-base will have to at least install the Java runtime (~16-20 mb) + click a few buttons the first time they want to start your game.
That is completelly true, and something to keep in mind if you decide to target Java. But take into consideration that users that do not have Java on their computers will be usually more inclined to install the Java runtimes, than any other unknown plugin from a website.

Just my two cents!


Mahan(Posted 2010) [#12]

Mahan wrote: Java is NOT precompiled [...] But again startup and the "warmup" (where often the JIT compiling is done) is SLooooow.

Ziggy wrote : Yes it is.



Since i mentioned the JIT compiler and clearly stated compilation, what I ment was that Java (in contrary to C#/CLR) doesn't provide a way to install a precompiled hardware/processor interpretable executable. The JIT can however compile java bytecode to machinecode in realtime if it deems it beneficial.

I haven't used Java professionally now for two years but when i read up on the subject i found this:

http://java.sun.com/javase/technologies/realtime/reference/doc_2.2/release/JavaRTSCompilation.html

This means that the deployer of Java software can control the ITC (Initialization Time Compilation) and thus make sure that the JIT will not halt a running process for a short while to compile something with JIT during runtime.

BTW: I'm talking about Sun Java here as other projects always seem to be a little bit behind the latest release from them. (Just like mono almost always is a bit behind MS on implementing new features)


It can be slow unless the Java application is compiled to pure native code at install time instead of done at runtime. This is possible on Java, and then it runs at impressive speeds, comparable to native compiled C++, but applications take longer to be installed.



As I said I haven't kept 100% up to date on the Java development, but please provide a link describing this technique. I didn't know they had that yet. I've been learning C#/.NET lately so i know you can do this on .NET .exes and assemblies of course.


MGE(Posted 2010) [#13]
re: OSAKit

I really wanted that to work last year. I was going to build an entire website around blitzmax apps. But I did a ton of testing and it just did not work reliably. Pitty...