Blitmaz and Linux Noob

Archives Forums/Linux Discussion/Blitmaz and Linux Noob

Grey Alien(Posted 2011) [#1]
Hi there, I didn't want to clutter up the Linux forum with some noobish questions so I posted here. I'm a total Linux noob and I'd really appreciate some help with a few things:

1) What version of Linux should I install/use to test with BlitzMax?
2) I have Windows 7 and someone told me I could boot Linux from a CD and run it in RAM or something instead of having to put it on my drive, but is that practical? Surely I'd need to re-install BMax (and any other dependencies) every time, so that we could dumb. So if I dual boot my system (never done that before) is it really safe or could I blow up my win 7 partition (which is on a SSD drive btw, in case that makes any difference)?
3) What are the main pitfalls with getting a BMax game running?
4_ Obviously it uses OpenGL, but is there anything I need to detect/do?
5) Also what sound driver is best? FreeAudio or something else?
6) What about the filesystem? Anything unusual, and where should shared data like player profiles, high scores and ini settings be stored?
7) Anything else? Like is there a ctrl+alt+del (and other system key presses) equivalent that needs to be handled specially etc.


Huge thanks for any advice you can give me on these topics!

I want to get my framework working in Linux so I can release some of my older games (and new ones too of course) on Linux. I already do good with Mac sales and want to try out Linux.


degac(Posted 2011) [#2]
Hi,

1. I've used different version, but with Ubuntu now I'm at 'home'
2. You can choose to install it on a 'virtual machine' (it works - I'm still using this solution sometime, but sometimes the real-hardware could be emulated.
2.1 Just run WUBI, so you dont' need to mess-up with partitions and other things: it creates a 'special-file'partition on a windows hd so it is very handy (you can 'unistall' Ubuntu from Control Panel...

3,4,5 = just have a look to the 'linux' section: there are some 'script' that should resolve every problem about installing and running blitzmax application.

6 = beware the case-sensitive system..., and file attributes!

ps: just to inform

I'm helping Grisu developing the Linux version of his own PocketRadioPlayer. On my - newest - machine Ubuntu 10.4 doesn't recognize my audio-device (so I cant' develop PRP... but sound - and BlitzMax examples work); on another - older - computer everything is fine...

Last edited 2011


Htbaa(Posted 2011) [#3]
Sound has always been an issue for me with Linux. That really needs some improvements.

If I were you I'd go with the WUBI installation degac mentioned. It does modify your boot loader but uses the default Windows bootloader. Should be restored when uninstalling it.

6) User settings are stored inside the /home/<username> directory. You're free to use any directory inside there you want, just make sure it isn't already being used. e.g. /home/<username>/my_ultimate_game Depending if you want to hide its contents prefix it with a dot. File attributes are important as well. Make sure the binary has the executable bit set (chmod +x).

7) ctrl + alt + del won't bring up a process manager like it does in Windows. I believe the desktop installations of Ubuntu are guarded for this, but at least in a console it'll reboot your machine.


joncom2000(Posted 2011) [#4]
I second going for Ubuntu, it seems to have detected and setup the sound and video drivers for me without any hassle. I installed it using wubi so it's running in a folder on the windows drive, it can make disc access slightly slower than a proper install but it doesnt damage my windows setup at all and can, as has been mentioned, be uninstalled from windows control panel.

You will need to install the needed libs to be able to compile bmax programs but the scripts in the linux forum do the job. The only downside is the default ide under linux is less than perfect, but since for the most part I suspect you will just be building the game rather than coding it on linux you can get by.


Grey Alien(Posted 2011) [#5]
This is all fantastic advice, many thanks everyone!!


GfK(Posted 2011) [#6]
I tried Linux (Ubuntu) quite recently. I hated it years ago, and I still hate it now. Its an absolute ballache to get it to do anything. As for Blitzmax, the best I got out of it sound-wise was an awful crackle, and that's following advice of people who it apparently worked for. There was no way on God's earth I would have even got it running without some fangled, cock-eyed procedure I found somewhere on here which involved a load of typing, and I didn't understand a single bit of what I was being told to do.

I also tried various other Linux flavours including OpenSuse and could not get along with any. You can liken choosing a version of Linux, to looking at a long line of buckets full of horse muck, and deciding which one you're going to stick your face in.

Might sound extreme but mere words cannot convey how cruddy and useless Linux is. Whatever your reasons are for wanting to go there, all I can advise is DON'T.


Htbaa(Posted 2011) [#7]
I partly agree with you when it comes to desktop usage. You really need to have compatible hardware to have a pleasant experience. I've been running Ubuntu 10.10 on my laptop for 3 months this year because Vista was totally unusable. However, those 3 months were quite horrible as well. For me audio just wouldn't sound right and the responsiveness of the user interface... ugh.

But when it comes to using Linux for server purposes it's ace. Wouldn't want anything else.


SLotman(Posted 2011) [#8]
Yeah - Linux is a nightmare to configure. Specially when relating to graphic drivers.

On bmax side, however, it's pretty easy. If it works on Mac - and if you don't have the filename with wrong capitalization - it will work on Linux.

Never had those sound problems everyone talks about - and I have tested my games on Ubunt 8, Ubuntu 10 and some brazilian distros, like Phoenix Linux - no problems whatsoever running "Detetive Carioca", "Puzzle Trip: Rio", or "Fruzzle" (which even uses miniB3D!)

One of the big problems on Linux: there isn't a 'shared folder' (for all users that is). So there is no way to save a highscore table that all users can share on the computer - unless you create the file during install, and requires admin rights to install it.

So, on Linux, I just set the "config/highscore" path to the same location where the game is, and that's it :P~

Last edited 2011


Yasha(Posted 2011) [#9]
You can certainly get some odd problems with compatibility (protip: you can't have an NVIDIA GPU and a TV tuner at the same time. Why? No idea).

One thing I would point out is that the people on the Ubuntu forums are adamant that you shouldn't use Wubi for any kind of serious development. Wubi is explicitly intended as a toy; it's a trial-run that has better access to the hardware and should be more representative of a real installation. It also has lots of bugs because it's not a real installation, and they take great pains to point out it could break and cause data loss at any time.

I've also heard that it can damage your Windows installation if you get something wrong, because it exists on the same partition and thus can, in edge cases, affect Windows system files. You may actually be safer making a true partition and a full dual-boot, because then the systems will be completely isolated. (The biggest disadvantage of a true partition is that it overwrites the Windows bootloader, so getting rid of it again if you don't want it will require use of some Windows recovery tools.)

If your computer can boot from USB, the idea suggested by your friend isn't so stupid: you can use several different tools to either create a LiveUSB from a LiveCD (and then you can allocate some persistent storage for settings and a small number of files and applications), or install directly to the USB drive as you normally would. This has the huge advantage that as long as your computer is able to boot from it, you don't need to affect your Windows system in any way. However, if you use a flash drive instead of a hard disk you might run into problems with wearing it out (others say that even cheap flash drives have a longer lifespan than we expect).

Depending on what you need to do, I'd strongly recommend you consider a virtual machine to start off with. You won't have any problems with drivers, and you can run it over the top of Windows and share files and folders, or even work in two open applications side by side. The only real problem with this is support for graphics acceleration, which seems to vary; but in all other respects a VM is the closest thing you'll find to a Linux install that really does "just-work" out of the box.

(Another tip: when at the command line, your best friend is "man", which gives you documentation for a command. Use "man <command>" for everything and you will quickly start to pick up a lot of information. Press Q to leave the man screen - I was put off using man for a long time because I couldn't work out how to leave it without rebooting the machine.)

Last edited 2011


Winni(Posted 2011) [#10]
You really need to have compatible hardware to have a pleasant experience.


Now isn't that true for ANY operating system? Try installing OS X on non-Apple hardware or try using random PC hardware on 64-Bit Windows 7 when you don't have 64-Bit drivers for it.

Anyway. Ubuntu Linux usually runs great on Apple hardware. If you already develop software for OS X, just install Linux as a second OS on your Mac.


GfK(Posted 2011) [#11]
Another tip: when at the command line, your best friend is "man"
I thought man's best friend was his dog? I'm getting confused.


HrdNutz(Posted 2011) [#12]
try Ubuntu, it's one of the popular ones for desktop linux.

SuSE Enterprise Linux is one of the best out there for business solutions with best 64bit support out of the box, not sure about their Open SuSE desktop version.

Linux has 'live' variations, meaning it can run without being installed.

you can set up a live usb version by getting the desired linux ISOs, and using a tool such as:
http://www.linuxliveusb.com/
to automatically convert the ISOs to usb with persistence (persistence allows for non-installed linux to save settings and files, thus making it usable)

I have Ubuntu 10.10 running off my key-chain usb stick for on-the-go linux. I simply boot any computer from that usb and am able to run my linux persistence, with all my development environment intact, no install necessary. (better to install to own partition for serious linux user, some things are problematic through persistence, like video driver settings, and obviously usb access speeds)

Cheers,
Dima


Grey Alien(Posted 2011) [#13]
Wow sounds pretty cool having linux on a stick. Probably beyond my technical abilities though. I'll have to do a vanilla install methinks.


shinkiro1(Posted 2011) [#14]
I would also recommend Ubuntu, although maybe not the newest version (which will get released tomorrow).
When downloading select version 10.10(newer) or 10.04 -> http://www.ubuntu.com/desktop/get-ubuntu/download

For storing ini files, highscores, etc.
Every user has a home folder: /home/username/
Some apps store their configurations in this folder, like: /home/username/.game/
Notice the dot before the foldername. A dot before a file/folder will make it hidden. So you can then place all files in this folder.


D4NM4N(Posted 2011) [#15]
Its a shame that many slate linux because it has problems on some hardware.
Think about it, if OSX was a run on anything OS then it would have the exact same problems (so would windows if you had no driver disks or internet).

Basically:
-If you want to run OSX you -need- to buy a mac (or hackintosh).
-If you want to run windows you -need- to buy an intel PC, and even though it comes bloated with drivers you often -still- need disks or downloads.
-If you want to run linux then you really need a fully capable linux machine, -especially- if you are new to it, and this does not mean just any old *PC!!.

(* while linux can be made to run on almost everything from a server to a toaster, the whole hack to work thing is at least an emergency fallback -option- albeit an ugly one, and you really need to know a bit about linux if you want to stay sane and go this route)

When i first started using it several years ago, i had problems because my PCs were your usual "bloggs boxes". Since then I have carefully selected my laptops and other hardware to ensure it is compatible.
-Not had a hardware problem since, and when it all "just works" out of the box without having to mess about at all it is actually a very nice desktop user experience. (depending on the "linux" of course, many distros are either total crap or certainly not for the desktop)

PS: if you have a device and it has a problem, eg. webcam doesn't work or a laptops wifi doesn't work, look up what will work, rip the offending module out and order a new one! (a small cost considering the OS is free) don't waste your life trying to hack it (although you can actually learn a lot about linux (and unix) if you try ;).

Last edited 2011


SLotman(Posted 2011) [#16]
I'm sorry - but 'Linux have problems with some hardware just like every OS' isn't true.

I have tried Linux on a 486, on a Pentium II 400, on a Athlon 1800, on a Duron 700, on a 1.8Ghz celeron Laptop, on an Touchsmart from HP and half a dozen others - and in every install, on different Linux distros, with different versions, I always had problems.

Sometimes the sound wasn't recognized, sometimes the video didn't work 100% or didnt work at all, sometimes wireless wouldn't connect (even on latest Ubuntu, if you have accented chars on your password, it won't work, even configuring the OS to send the ascii char codes!) - once I couldn't even login into the OS until I forcefully rebooted for the 3rd time!

Not to mention, that most problems found, the solution is either to download something and then *recompile it*, or you have to open terminal and type a lot of stuff - or people tell you to "google it" until you find a solution.

Common - it's 2011. Having to remember obscure command lines and to type stuff in terminals are things from the 90s. We have mouses and GUIs!

I do know what I'm doing when I installed those distros - for crying out loud, I've been programing since the 80s, so I'm not exactly the average windows user :P~

And believe me, I root for Linux! I really wish it was more successful and there was a decent 'desktop' market for it. But Linux market share is declining year after year, while Mac and Win are gaining ground.

At least, there still hope for *nix with Android - and maybe things will improve once google releases it's googleOS...

Last edited 2011


D4NM4N(Posted 2011) [#17]
.grr to the dbl posts

Last edited 2011


D4NM4N(Posted 2011) [#18]
As i said you need to check before you buy if you do not want problems.
I swear to you, in the past 4 years I have NOT had one hardware problem with my -specifically- selected hardware (6 machines: one mac, 2 dells, one HP, one IBM and one Fujisu) and hardware that i have reccomended and set up for friends (no idea how many).

Of the machines i have built from scrap or been given (at least 10) have had quite a few hardware fights, but once it is set up it stays in my experience and only 3 times out of those i could not get it to work or hardware was not replaceable (eg laptop sound). Also on another laptop i replaced the wireless module because that was a nono. Other than that since 7.10 Ubuntu has been pretty good to me out of the box.

Common - it's 2011. Having to remember obscure command lines and to type stuff in terminals are things from the 90s. We have mouses and GUIs!
Agreed, but why do you -need- to use the command line? You can do anything with files using nautilus that i can on the terminal and as for those obscure commands you rarely -need- to use them at all for standard use.
Personally I use the teminal on windows, OSX and linux simply because it is faster for a lot of stuff, but i don't usually have to.

Last edited 2011


Winni(Posted 2011) [#19]
I have tried Linux on a 486, on a Pentium II 400, on a Athlon 1800, on a Duron 700, on a 1.8Ghz celeron Laptop, on an Touchsmart from HP and half a dozen others - and in every install, on different Linux distros, with different versions, I always had problems.


If you buy/build a PC that complies with your Linux distribution's compatibility list, you will NOT have such issues.

Buy a machine that uses an Intel chipset and you won't have issues. Intel provides (open source) Linux drivers for all of their parts. No issues here. Nvidia also provides great Linux and even FreeBSD drivers for their graphics chips.

Besides Apple hardware (especially Intel Mac Minis), Dell XPS notebooks also run very well with Linux. I tried 64-Bit Ubuntu 11.04 yesterday on an XPS M1330, and there were zero driver issues: WLAN, BlueTooth, Ethernet, graphics, sound - a full "go" out of the box. The XPS M1330/M1530 also make great Hackintosh notebooks, by the way. I had Snow Leopard running quite well on an M1530 a year ago.

Heck, nowadays, Ubuntu even has less problems with UMTS/3G sticks than OS X or Windows. I also had less problems getting Ubuntu Server installed on Dell PowerEdge servers than I had with Windows Server 2003 (which is only supported on current Dell hardware when you use a slipstreamed Server 2003 SP2 installation medium).

Printers and Scanners? Buy HP. They provide full open source drivers for their products (somebody at HP understood that Linux is important in large corporate environments where most of their printers are sold).

Choose your hardware carefully and Linux compatibility is a non-issue.

I do know what I'm doing when I installed those distros - for crying out loud, I've been programing since the 80s, so I'm not exactly the average windows use


Yeah, but a Unix or Unix-like operating system is NOT Windows and one should not expect it to be anything like Windows. What would be the point, anyway?

Most people make the mistake to expect a machine for 500 bucks to work as well as a Mac for 2500 bucks - even with Linux. But if those people were honest, they would admit that this 500 bucks machine does not even run the operating system really well that came pre-installed on it. And then try to "upgrade" that pre-installed OS to a newer version of Windows when it is released. You will probably find out that that won't work at all - because nobody has written the necessary drivers for that cheap, then old hardware.

And believe me, I root for Linux! I really wish it was more successful and there was a decent 'desktop' market for it. But Linux market share is declining year after year, while Mac and Win are gaining ground.


That isn't really true. Microsoft has lost a fraction of its desktop share to Mac OS X while Linux more or less stagnated at its less than one percent desktop market share. (On the server, Linux has been gaining ground at the expense of traditional Unixes and Windows Server owns the other half of the market.)

But the real fact here is that desktop systems are on the decline in favor of mobile devices and game consoles. On mobile devices, its a whole different world: Currently, Android (which basically is yet another Linux distribution) and iOS (which basically is another BSD Unix) are ruling the market and everything else is insignificant in comparison. Windows Mobile is total no-show and even Nokia's old platform Symbian is more important than Microsoft.

What we can observe at the moment is that especially in the consumer market, tablets (also known as iPads) are eating the market share of notebook computers, which in turn have been eating the market share of desktop PCs over the last couple of years.

So the whole discussion which is the best or even a good desktop system is becoming increasingly irrelevant because your customers are moving on to new places: iPhone, iPad, iPod Touch, Xbox 360, PS3, Android, WebOS, Bada. Or they don't care anymore at all because the "operating systems" that they actually care for are Mozilla Firefox, Google and Facebook - and none of these big names care for the desktop OS that their users are using.

So even trying to conquer desktop market share is a waste of time and resources, because the consumer(!) desktop PC is DEAD. Consumers are now using the web and mobile apps.


Grey Alien(Posted 2011) [#20]
shinkiro1: Thanks for the advice. So how do I get the user's name or is there a function call to get that path?


Yasha(Posted 2011) [#21]
Either the $HOME variable or the short form ~/ should take you to the current user's home folder.


shinkiro1(Posted 2011) [#22]
Local path:String = getenv_("HOME")
Print path


PS: When using "LANG" instead of "HOME" you get the users language, very cool.

Last edited 2011