Opening a web browser?

BlitzMax Forums/BlitzMax Programming/Opening a web browser?

John Pickford(Posted 2008) [#1]
Is it possible to reliably open a web brower from my game?

I seem to remember it being impractical in B3D.

I'd like to provide a link to our website.


fredborg(Posted 2008) [#2]
OpenURL( "http://www.hello.com" )


GfK(Posted 2008) [#3]
You can use OpenURL()


John Pickford(Posted 2008) [#4]
Fantastic. I'll give it a go, cheers.


John Pickford(Posted 2008) [#5]
Seems to work fine. When my game is in full screen mode (I'm using B3D SDK) it minimises, which is fine, but when I go back to it some of the graphics are corrupted (environment maps in this case). Is there anything I can do about that other than disabling the feature in full screen mode?


Digital Anime(Posted 2008) [#6]
What could be an idea is the way they have done this in TrackMania United Forever called manialinks.

They created their own type of browser which get information from websites. Good thing about it is that you can keep everything fullscreen and make sure they cannot go anywhere else besides what you decide.

Might be a whole lot more work at start, but it will be great in the end.


Perturbatio(Posted 2008) [#7]
Is there anything I can do about that other than disabling the feature in full screen mode?


I'm sure there was a set of commands for reloading graphics after a switch to desktop...


fredborg(Posted 2008) [#8]
You could reload the textures when the player returns, like this:
Graphics 640,480

SetBlend alphablend
While AppTerminate() = False

	SetAlpha Rnd(0,1)
	SetColor Rand(255),Rand(255),Rand(255)
	DrawRect Rand(0,GraphicsWidth()-20),Rand(0,GraphicsWidth()-20),20,20

	If AppSuspended()
	
		While AppSuspended()
			Delay 100
		Wend
		
		Notify "reload stuff"
		
	EndIf

	Flip

Wend



John Pickford(Posted 2008) [#9]
Gah! I've just done the whole reload when the user picks another resolution. It'll be an almighty pain to do it at an arbitrary point (loads of types have meshes etc.).

This might have to wait till I'm in the right mood.


MrTAToad(Posted 2008) [#10]
Note that OpenURL wont always open a browser with some versions of Linux.


John Pickford(Posted 2008) [#11]
Well my game won't run on any version of Linux so not really a problem for me.


GfK(Posted 2008) [#12]
John - having used Blitz3D for so long, how are you finding B3DSDK?