|
Post by rowan on Jul 18, 2007 15:35:50 GMT
kk
so im new to Qbasic 1.1 but i can do loops and INPUT,PRINT,DO,LOOP,FOR and NEXT but it all boring and usless i want to learn how to do grafics
ps im only 10
|
|
|
Post by earlofqb on Jul 19, 2007 23:56:59 GMT
A 10 year-old who knows more than I do? Well, I sort of figured this would happen (especially considering my game development tends more towards Visual Basic (where the graphics are either built-in Visual Basic graphics or pictures/videos you got off the Internet) than QBasic). I do applaud your dedication to programming at such a young age (gives you plenty of time to decide whether you like it, and get good enough to do something great in college (as opposed to my late start, where I'm just now learning the fun of real programming)). Well, first I'd recommend Pete's QBasic Graphics Tutorial Page www.petesqbsite.com/sections/tutorials/graphics.shtml, as it links to a series of graphics-related tutorials within QBasic. Then I'd recommend looking through the QBasic integrated help menu (it's second because the help menu describes nothing but the syntax). Finally, a nice tutorial can be found here: www.geocities.com/CapeCanaveral/Cockpit/3406/tut5.html that can give you some ideas on how to make a good QBasic (and any language, really) game. Note, it's not a step-by-step tutorial, but rather a very quick (20 steps total) rundown of general purpose ideas that are extremely helpful for new programmers who want to get into game programming. For more information, I'm sure you could bug Ildûrest into writing something about it. He's generally pretty good with this sort of thing... Finally, INPUT, PRINT, looping, and all that isn't useless. You'll use these quite a lot throughout your time programming, as they are fundamental to games and anything else you'd want to write. This is especially true if you'd want to program professionally (although you'd use a language like Java or C++ (or C#, since that seems to be the "cool thing" anymore. More on that later)), where 99% of your code will be the pure logic of the program, and artists will design the graphics (integration of the graphics will be the final 1% of your code). Anyway, as I said, C# is the "cool thing"; and as much as I hate fads, I'll admit one thing: you can make a lot of money doing it. Because there are currently no college-level courses (that I know of) that teach C#, you can even lie/pretend your way through an interview with it. Also, if you took a few minutes to look on a programming job board ( dice.com, prgjobs.com, etc), you'd quickly find that you're almost out of luck if you don't know C#. After you've exhausted all your QBasic ideas and explored it to your hearts content, I urge you to try out this language. You can download all you'd need for C# at icsharpcode.net (get SharpDevelop and the .NET SDK (there's a link to it on the downloads section of IC#code.net. Both are rather large downloads, so if you're on dialup, I'd recommend you'd find someone with broadband). This should set you up with a very good introduction into programming, so that you'll have the majority of the fundamentals down for college (should you decide to go there for programming). If not, you'll at least know two good languages (QBasic might not be used anymore, but it'll teach you how to write small programs that conserve (rather than waste) space. C# will teach you modern programming techniques (read, "n00b techniques" because C# does a lot of the work for you) that will teach you to be more creative without worrying about the small details (like memory management, etc)). You'll find that your programming knowledge will be useful elsewhere, either in problem solving or in creative thinking exercises. These skills will help you out everywhere in life. Finally (part two), kindly don't swear. It's not a good habit to get into (especially since employers frown on "crude and obscene language", and tend to fire you for it although I tend to blame Slim Shady, lol).
|
|
|
Post by Mikrondel on Jul 25, 2007 9:57:29 GMT
Finally (part two), kindly don't swear. It's not a good habit to get into (especially since employers frown on "crude and obscene language", and tend to fire you for it although I tend to blame Slim Shady, lol). When did anyone swear? (I know what you're referring to, but wouldn't myself classify that as swearing. It's really a cultural thing - don't assume every country is like your own. (Also don't assume what you saw of Steve Irwin to be representative of our culture.)) Anyway in case rowan is still around, here's what I have to say: If you think what you know so far is boring and useless, go and do something else. Maybe you'll develop more interest later on (some people don't become nerds till quite late ). For me, the more I learned about maths, the more I was interested in programming. Go and try HTML. Maybe Flash. Perhaps even Linux. You might find something you really like. On the other hand, if by "boring and useless" you actually meant "I like this stuff but I want to actually do something impressive" then just be patient. You need to learn how to use arrays and subprocedures - not necessarily before you start using graphics, but they will give you a lot more power. Anyway, to humour you: Before using graphical commands, you must enter a graphical screen mode with the SCREEN command. E.g. SCREEN 7 Shapes are drawn with the commands CIRCLE and LINE. You can also draw dot-by-dot with PSET. (Look them up in QB help.) Try making a bouncing-ball program using CIRCLE. (Hint: use variables to keep track of the ball's position and move it progressively.)
|
|
|
Post by earlofqb on Jul 25, 2007 22:26:47 GMT
Crikey, mate! I thought all Aussies talked like that! I suppose you all don't smoke dope, wrestle kangeroos, and throw your kids in front of allegators during your off-hours either... (Steve never did the first two, but they're another set of common misconception found in the uneducated masses about Australia (a nice country that I'd visit if it weren't for reports of mass desertification. Then again, I could always go into the water imports business if that's true )). Lol, sorry about that... Also, Linux isn't a programming language. Shell scripting is probably what you were referring to. I'd actually urge him away from Linux shell scripting for a while, if only because he'd have to not only learn a programming language, but another operating system (which, although the shell scripts (read: terminal/CLI) is the most important thing in Linux, it'd probably scare him off alternative OSes (almost did for me)). Also, a lot of applications don't work natively with Linux, and (as I've found out) getting them to work with Linux (primarily through WINE) is more off-putting than just running a Win98 VM on Linux (which is, arguably, yet another feat in itself). In short, stick with what you know, at least for now. By the way, did anyone else read that a lead Linux developer (Con Kolivas) left the project? An excellent article on it is on /. ( linux.slashdot.org/linux/07/07/24/1432245.shtml). He brings up a good point (evidenced above by the many times I wish I could've quit Linux (I have a 4-credit class in it this semster, and "quitting Linux" == "failing the class") over how complicated it is to do some tasks).
|
|
|
Post by Mikrondel on Jul 26, 2007 4:59:25 GMT
Also, Linux isn't a programming language. Shell scripting is probably what you were referring to. You dare question my accuracy? I was referring to Linux. HTML and Flash aren't programming languages either. (Of course Javascript and ActionScript might classify under some definitions but I wasn't referring to them.) Linux (like, to a lesser degree, Windows) takes a bit of effort to learn how to use. Some people are natural Linux users and given rowan's early start, it's not unlikely that he'll be one of them. And given the rise of the most evil OS ever (the one starting with V that I dare not name) IMO everyone who can should start picking up Linux skills so that their freedom is not taken away forever. Yes I know Linux is flawed, but it isn't EVIL. If it's hard to use, well, just put a bit more effort into it. As the makers of Team America so simply put it, "Freedom isn't free". And while most familiar apps don't run on Linux, most have free alternatives that do. Like The GIMP instead of Photoshop, GAIM instead of MSN/Yahoo/AIM/others, OpenOffice instead of M$ Office, Linux instead of Windows You shouldn't discourage others just because you're a bit intimidated - maybe they'll find it easier than you.
|
|
|
Post by earlofqb on Jul 26, 2007 21:20:09 GMT
I didn't mean to discourage him, simply to inform him that an uber_1337 42X0r (lol, who actually talks like that?) like myself (again, fiction is funny) found Linux intimidating. Actually, my biggest problem hasn't been that there aren't alternatives, but that on my uber-fast dialup connection (flying away at a blazing 28kbps! Downloads at a record-setting 2kb/s!) can't readily download the alternatives (worse, my school tends to ban download sites, because of recent local RIAA (read: mafiAA) activity in the area (sued the school across town for P2P-ing. Information wants to be free!)). Sure, I have GIMP, GAIM, and OO, but the Windows binaries (and those took me a while). Since I've yet (because I'm a n00b) to set up gcc properly (keeps giving compile errors, even with code like: #include <iostream> int main(argc, argv[]) { return 0; } So... yep, looks like my Linux doesn't like me Anyway, this is a topic for another thread. Basically, what rowan needs to know is: Vista (shudders) is evil. Not only because it is a very buggy, bloated OS that requires a high-end computer just to run like you'd expect (ie doesn't slow down doing simple things); it provides the ultimate in software insecurity: The easy escape. Simply tell Vista that you want to run something as Admin, and to "Never bother me again", and you're "set" (for viruses, spyware, crackers, etc). Finally, Vista traps you with their infamous license of death ((C) Me), as do all M$ products: You can install it on one computer. No reinstallation is allowed (unless you contact them and argue at great length), and no backups are to be made of it. Further, any "significant" upgrades to your computer (even just adding in some memory) will void the warrenty, and the license. In other words: Buy a new computer instead of only the parts you want to upgrade (because it means they'll sell you another copy of Wyndoze, and help their friends at Intel and the rest). Linux, on the other hand, is free. Usually both free as in cost, and free as in "freedom to do with it what I please". If you want to add a bunch of components to your computer, Linux doesn't mind (as long as it has the drivers for it). Want to put it on multiple machines, reinstall, etc? It doesn't care at all. However, there's a catch: Linux tends to lag behind the hardware community. This is fine, if you have an old computer (which, is another selling point of Linux: it can run well even on the old Pentium Is), but not a brand new, uber-1337 machine. Further, it doesn't support Windows applications (although WINE (WINdows Emulator) can help with most of this), although it offers many great alternatives (for instance, Open Office can turn pretty much any file it supports (all MS-style document types) into PDF files. It also supports up to MS Office 2005(?7?)). So, really, it would be up to you to use Linux or not. As of right now, I'm anti-Linux because it won't work "properly" for me, and I haven't the Internet speed to download the programs that'll help me work around its limitations. In fact, I could even go as far as to say that without broadband, Linux is probably not the way to go (something even those in the die-hard Linux community admit: there simply isn't enough software that you can just go out and get. Pre-compiled binaries for Linux simply aren't sold en masse in stores, and that puts off anyone without a decen broadband connection). However, if you have broadband, and a spare hard drive (I tend to advise people to avoid putting Linux on a disk with Windows on it, because they tend to conflict), go for it. Order a free Ubuntu live CD (free shipping, too!) if you don't want to download Linux. Finally, a catch: HTML is not a programming language, however it can be treated as such, and people do regard it as such (I don't). Flash isn't even close to a language. It is an application (more specificatally, an IDE loaded with tools to draw and render stuff)! It uses ActionScript, which is a scripting language, to simplify content creation. Further, you have yet to describe how Linux can be a programming language (the shell is a separate entity, in my opinion). Unless you mean "program an application/driver/etc for Linux", I don't understand what you mean.
|
|
|
Post by Mikrondel on Jul 31, 2007 10:54:11 GMT
Well how about
#include <stdio.h> int main(int argc, char *argv[]) { return 0; }
If you don't specify parameter types you will surely get compiler errors.
Linux tends to lag behind the hardware community should have read Linux is made to suffer by the hardware community. Put simply, since some 80% of people use Windows, some hardware manufacturers don't bother making device drivers for Linux (or Mac OS). - A side issue is that the Windows drivers are frequently shoddy and cause Blue Screens of Death. - While Apple can throw money at the problem, Linux needs volunteers to work out how the devices work and write drivers for them. Now because these drivers are open-source, for popular hardware they can be more stable than their Windows counterparts.
Even with such a challenge, Linux drivers are usually available fairly soon for good-quality, popular hardware. This has been helped by the growth of "one driver fits all" devices, as well as conventions and standards for drivers being formed. Unfortunately, with V**ta, Microsoft is trying to reverse this trend (under the pretense of being able to be sure a device is exactly what it claims to be) to strengthen its grip on the market and further hurt Linux, Mac OS and many others.
Anyway; this usually only matters for high-end graphics cards, possibly sound cards, special laptop stuff, some onboard cards, USB modems and USB printers, and extravagant things like TV tuner cards. That's not to say that none of them work; many do but new ones and rare ones will be less likely to. Processor and RAM should never be a problem, nor should hard and CD drives; most network cards are fine and USB should work. (USB devices connected to USB ports are another issue; though USB memory drives usually work)
That's not to say everything will work out of the box - a LOT of common hardware does (with an average Linux distro, anyway - if you're keen you can compile the drivers you need and nothing else into your kernel for better performance) but some may require downloading drivers and perhaps a bit of knowledge and research too.
I found some Linux and OpenBSD CDs for sale at my university bookshop (which made me feel warm and fuzzy on the inside) at slightly inflated prices (if I had dialup I'd be tempted to pay the $15, but not otherwise) - Live CDs are a good way to "test the waters" of your computer before committing to Linux; if it boots and all your hardware seems to work, then you're set.
|
|
|
Post by earlofqb on Jul 31, 2007 23:04:55 GMT
Yes, Live CD's are "teh_1337", and I do like to use them not only for that, but to help repair a computer (yes, Windows machines work can be repaired with certain utilities found on a Linux Live CD).
Now, your "example" to "program for Linux" is more of an example to "program with portability in mind by adhering to standards". Sure, programming for Linux-only machines (ie programs reliant on the a Linux-specific shell might be classified as such), however because Linux is open-source, your "Linux-only code" will (most likely, by some Windows fanboy) be converted to work with Windows or Mac (case in point, there's soon to be a "grep" program for Windows. My favorite part of it is how "you can run it multiple times to search within results", because they needed some way to make the lack of pipes in DOS attractive).
Anyway, programming device drivers certainly wouldn't be for someone who's (probably) new to programming. I probably couldn't approach the topic seriously for at least another 5 years (for I am teh_n00b at anything other than a simple text-based game).
|
|
|
Post by Mikrondel on Aug 2, 2007 9:40:49 GMT
Now, your "example" to "program for Linux" is more of an example to "program with portability in mind by adhering to standards". What example? I don't believe I have talked specifically about programming for Linux in this thread apart from device drivers. And I assure you, device drivers are one of the least portable things out there. It's a pain even porting a Linux device driver to an earlier Linux version. Sure, programming for Linux-only machines (ie programs reliant on the a Linux-specific shell might be classified as such) What Linux-specific shell? bash, the practically ubiquitous GNU shell is itself highly portable - it even works on Windows. OK, I'm being nitpicky - after all it isn't often found on Windows. And whether you had it in mind or not, you've led to an important area - programming for a specific GUI system could be a bit of a portability hassle. That's part of the reason that very few UNIX/Linux programs that have "real work" to do possess GUIs. Rather, separate GUI frontends are made for them. When such programs are ported from Linux to Windows, I think the frontends are thrown away and rewritten, while the core backends tend to be portable in the first place (not necessarily intentionally, but simply because the jobs they do don't rely on so much external stuff). (most likely, by some Windows fanboy) be converted to work with Windows It could also be huge business that use a combination of Windows and Linux, hiring people to make stuff work on their Windows machines too. There have been many cases of people hiring programmers to work on open-source code - usually it's something they need but wouldn't ever sell, so they don't lose anything by making it open-source and they gain some respect. I believe Sun Microsystems does this a lot. (case in point, there's soon to be a "grep" program for Windows There have been some for ages. There are the cygwin ones as well as the pure Win32 ones. Anyway, programming device drivers certainly wouldn't be for someone who's (probably) new to programming. It's not terribly difficult, really. But you need to be a real programmer. Someone who enjoys it, and has the right kind of adaptability, analysis and foresight. Not someone who forced it into his head at college and just does routine programming for a living. That's assuming you know your enemy. If you have a nice document telling you all you need to know about the device in question, it's just a matter of connecting what it offers with what the OS might need from it. If you're stripping apart a compiled (and perhaps bug-ridden) Windows driver, and subjecting the device to various tests to work out what the heck is going on inside it, then it's a dfifferent matter entirely. And once again - drivers are just not portable. They're effectively kernel code. The stuff that provides the possibility for portable software in the first place. Kernel code can't use libraries or any of those bread-and-butter function calls that even work on DOS and most of the better operating systems. It can only access the obscure kernel internals, which can differ dramatically between operating systems.
|
|
|
Post by earlofqb on Aug 5, 2007 5:09:54 GMT
I'd imagine Visual Studio-produced programs wouldn't be as portable, would they? Most are highly dependent on the GUI (well, form-based VS projects), in that they actively respond to the GUI's state. Sure, they can be re-written, but for a lot of projects, this wouldn't be worth the effort (unless you have an uber-large program). Note to self: do this, do it now. Get over your greedy, self-interested ways, and just start coding (n00b!!!!1111)! I lost the link, therefore invalidating my claims that someone was porting grep from Linux/Unix to Windows. Of course, the many other ports that've previously been made invalidate this port's purpose. Therefore this entire paragraph is moot. So, you mean that I can't get in my friend's car and drive it to work? What happens if I do, does the universe implode? Anyway, I place driver development in the realm of people who program well, not on my level (infer what you will, lol) .
|
|
clippy
Junior Member
Posts: 32
|
Post by clippy on Nov 23, 2007 18:46:47 GMT
Learn how to ask politely first! Come back when you're that smart!
Ted
|
|