View Full Version : Programming Paganitzu in QBASIC
Monti
04-15-2004, 05:18 PM
How would you go about learning to program an old game like Paganitzu in Qbasic?
Can this be possible in Qbasic?
Can this be done as a learning tool to learn how to program a game just like Paganitzu?
Would anyone consider programming a Paganitzu Clone?
Crosma
04-15-2004, 06:03 PM
http://www.qbasic.com/, if you're intent. It certainly would be possible.
You'd be better off getting The C Programming Language (ISBN: 0-13-110362-8) and starting from scratch with a "real" language, mark my words.
KillerByte
04-15-2004, 06:05 PM
Have you done any games programming before? Whilst you could create a Paganitzu clone in QBASIC, it would be much better to see a more modern version done with higher resolution graphics and better sound effects. This would require a different programming language (most likely C++) and the use of a graphics API such as Direct X.
Sounds like something I would like to make, if I had the time. http://forums.3drealms.com/ubbthreads/images/icons/wink.gif
8IronBob
04-15-2004, 07:03 PM
I've always wanted to do a Windows version of Paganitzu myself, either in Visual Basic or Liberty Basic, not sure which one would be better for that. That would probably require Direct X, obviously, but what are the chances of something like that happening? Would your QBasic version work well under DOS Box at all?
Monti
04-15-2004, 07:11 PM
What is DOS Box?
I have started programming a bit of it already, although it isn't going to be the actual thing. I'm just messing around to see how to do some things. I'll attach a file of the .BAS file later so you can see what I've done so far.
8IronBob
04-15-2004, 07:24 PM
What is DOS Box?
I have started programming a bit of it already, although it isn't going to be the actual thing. I'm just messing around to see how to do some things. I'll attach a file of the .BAS file later so you can see what I've done so far.
DOS Box? That's an emulator of DOS for Windows platforms to run old DOS programs on. Mainly for those Windows systems that can't handle old DOS programs well, like Win XP/2000 which have a VERY weak DOS prompt. Well, Command Prompt according to Win XP. Anyway, it'd be better to have Paganitzu as a Windows game instead of DOS in this day in age, or at least in Linux.
Monti
04-15-2004, 07:55 PM
It would, and that was what I was going to begin doing when I went to the store to buy Dark Basic which has DirectX3d implemented into it and it uses the simple terms of Basic to program.
Unfortunately I was unable to use it because it needed a 3dfx card to run it. So I'm stuck with Qbasic for the time being as it is more familiar to me.
8IronBob
04-15-2004, 08:57 PM
Well, it so happens that I downloaded a Liberty BASIC demo last night. I'm hopeful that something like this would do nicely for that game. Whether that's any better than Dark Basic, that's beyond me.
Monti
04-16-2004, 10:04 AM
I have no idea what Liberty Basic is but since I already bought Dark Basic, it will have to do for now. Of course I cannot use it anyways right now either because I don't meet the requirements to run the program.
Programming this game into Qbasic is actually just a learning experience for me and not an actual project to make a new game out of it.
I'll be asking questions about how to code certain things if need be, since I am a intermediate beginner.
One thing I have found out about doing this is how much thinking and effort actually goes into making a what is simple now days for games is so mind boggling to me.... somewhat.
CyTex
04-16-2004, 10:28 AM
QBASIC sucks to learn game programming in IMO.
If I'm allowed the spam, I'd like to point you to a much easier, more powerful language that I contributed to in earlier days (I'm responsible for its powerfull "To C Translator" that enables you to generate C code from your easier-than-basic language).
It's called Euphoria and beats any other interpreted language in speed, even JITC languages like Java;
Here's some benchmark specs;
Language Benchmark Result
-------- --------- ------
Java (JDK 1.0.2 interpreter) sieve Euphoria is 8x faster
Perl (DOS version) fibonnacci Euphoria is 65x faster
Perl (Linux version) sieve Euphoria is 34x faster
Python (WIN32 v1.5) sieve Euphoria is 43x faster
Python (Linux version) sieve Euphoria is 34x faster
PC-LISP v3.0 Queens Euphoria is 28x faster
Small C Interpreter sieve Euphoria is 545x faster
http://www.rapideuphoria.com
8IronBob
04-16-2004, 07:31 PM
I have no idea what Liberty Basic is but since I already bought Dark Basic, it will have to do for now. Of course I cannot use it anyways right now either because I don't meet the requirements to run the program.
Programming this game into Qbasic is actually just a learning experience for me and not an actual project to make a new game out of it.
I'll be asking questions about how to code certain things if need be, since I am a intermediate beginner.
One thing I have found out about doing this is how much thinking and effort actually goes into making a what is simple now days for games is so mind boggling to me.... somewhat.
http://www.libertybasic.com
This link'll get you right to their website, and you can download a copy, too. It's really not that difficult, it's actually even easier than Visual Basic, IMHO. Of course, VB can do more. QuickBASIC/QBasic is too old for me, welcome to a Windows 2000/XP world! Hehe...
Night Hacker
04-16-2004, 09:54 PM
It is very possible.
QBasic is a nice language to learn programming concepts and can do quite a bit more than one would expect.
I definately recommend playing around with it, creating some simple games until you get the hang of it.
Once you are ready to switch to C (and you WILL want to switch eventually) there is a good book called QBASIC TO C that teaches you C by showing you QBASIC programs and how they would be coded in C. It also lists various QBASIC commands and their equivalent C functions. The book got lousy reviews online, but I really liked it. It definately doesn't teach you all of C (probably why it got bad reviews) but I found it made it really easy for me to switch over to C.
You may want to skip all that and jump right into C, it isn't all that difficult and C is very powerful. You can grab a free C/C++ compiler online for windows or DOS.
Dev-C++ (http://www.bloodshed.net/devcpp.html) - Windows compiler, highly recommended. I use it myself.
There is also DJGPP for DOS, but I recommend sticking with the Windows compiler.
I stunbled across a C programming "tutorial" or online book.
C Programming Notes (http://www.eskimo.com/~scs/cclass/notes/top.html)
Combine this website with the Dev-C++ compiler and you're well on your way to learning and programming in C (C/C++ is used to create the games you buy at your store by the way).
8IronBob
04-17-2004, 07:30 PM
Yeah, on that note, Neil, would there be anything on converting from Visual Basic to C for Windows programming? Well, Visual Basic to Visual C++ most likely, after all, if you tried converting to another form of C/C++ programming from VB, the results might not be all that great! I think it may be about time to cosider stepping into another light for a while.
Night Hacker
04-18-2004, 01:22 AM
I personally have never seen a book on Visual Basic to C, but QBASIC has alot in common with Visual Basic and I seen alot of similarities. You could learn C quite easily by grabbing the book. The BASIC commands are still the same for the most part.
If you want to use Visual C you are either going to have to get a pirated copy of it, something I don't recommend, or buy a cheap version of it, which doesn't optimize code (not recommended) or the full version which, last I checked, costs over $1200. I will never see why anyone would pay such a ridiculous price for a compiler when there are full optimizing compilers out there for FREE, they're not cheesy, cheap compilers either, don't let the price fool you... Dev-C++ which uses MinGW compiler is a port of the GNU C/C++ compiler which has been around for a long time now and ported to several platforms (if not all platforms).
Everything I use to create my programs with (Deluxe Pacman for example, see link in my sig) is FREE, not pirated. I personally use:
Dev-C++ (IDE)
MinGW (Minimalist Gnu for Windows, Compiler)
Allegro (Graphics, sound, input etc... etc... etc... library)
JGMod (MOD music playing library)
Inno Setup (professional looking installer)
All of these are free. Download my game, it uses them all to get an idea. If you run it in cheat mode you can see the frame rates I achieve. I have seen up to (and over on some machines) 2000 FPS from my game, so none of the libs or compiler is slow by any means.
Other libs available are SDL, a free graphics library, SDL mixer, audio lib... NSIS, another free installer made by the people that created Winamp... the list goes on and on and on... I could list many many more free compilers, libs, installers etc... I simply see no reason to BUY anything to program with.
All MY OPINION of course... (obviously, but some people need it pointed out)
8IronBob
04-18-2004, 12:35 PM
Then of course, there's the old faithful DJGPP compiler, which is by far the oldest and one of the better freeware C/C++ compilers around. Although it is DOS-based, I thought that there were plans to make that a Windows compiler, too. Although I could be wrong. It would make sense for that to work in Windows, especially for 2000/XP like me. Between Dev-C++ and DJGPP/RHIDE, which one do you think is better?
Crosma
04-18-2004, 03:10 PM
Then of course, there's the old faithful DJGPP compiler, which is by far the oldest and one of the better freeware C/C++ compilers around.
Definately not the oldest. It is the only working implementation of GCC for DOS, however. Probably the oldest 32-bit compiler, too.
Although it is DOS-based, I thought that there were plans to make that a Windows compiler, too. Although I could be wrong.
MinGW and Cygwin take the place of DJGPP for Windows.
Night Hacker
04-18-2004, 05:51 PM
Then of course, there's the old faithful DJGPP compiler, which is by far the oldest and one of the better freeware C/C++ compilers around. Although it is DOS-based, I thought that there were plans to make that a Windows compiler, too. Although I could be wrong. It would make sense for that to work in Windows, especially for 2000/XP like me. Between Dev-C++ and DJGPP/RHIDE, which one do you think is better?
Download MinGW (http://www.mingw.org) if you want a command line only compiler. MinGW is Minimalist GNU for Windows, it is ported from the same Gnu compiler that DJGPP is, so it is basically the same, only for Windows. And of course, Dev-C++ is an IDE, which uses MinGW, so if you download Dev-C++, you're getting the IDE as well as the Windows port of the GNU compiler (like DJGPP). I don't see any reason to use DJGPP anymore, unless of course you have a DOS only system you want to program for.
JimboC
04-19-2004, 06:58 PM
If you want to use Visual C you are either going to have to get a pirated copy of it, something I don't recommend, or buy a cheap version of it, which doesn't optimize code (not recommended) or the full version which, last I checked, costs over $1200.
My last upgrade to Visual Studio .NET Professional 2003 cost me $31.10 (http://forums.3drealms.com/ubbthreads/showflat.php?Cat=&Board=UBB11&Number=313326&Forum=f11&Words=visual%20studio&Searchpage=0&Limit=75&Main=313326&Search=true&where=bodysub&Name=579&daterange=1&newerval=&newertype=&olderval=&oldertype=&bodyprev=#Post313326). I've spent more on most games, and I got C++, C#, J#, Visual Basic, the optimizing compiler, the Visual Studio IDE and a few more extras I know I'm forgetting.
The $109[US] version of C++ is good enough for someone learning to program. I mean, who cares how small your 'Hello World' program compiles down to? And I don't think anyone optimizes for specific processors anymore, unless its a very target specific application. Most people aren't going to be writing applications that need that extra 1% performance boost from the compiler. If you're writing something that needs the extra performance that much and you can't optimize your code any more, you probably should be using the Professional software.
I do agree, though, that the $1079[US] list price for the full version of Visual Studio Professional is much too steep, especially for your average hobbyist. Pissed me off big time when they announced that you could only buy a bundle rather than the specific language you use. But Microsoft is only concerned with doing what's best for themselves. By packaging it this way they get more money from the sale initially and it becomes easier for them to force people to use C# in the future. It's nonsense like this that made me install Linux on my system and start playing around with it.
8IronBob
04-19-2004, 08:18 PM
Yeah, then there's a rumor that QuickBASIC 4.5 was being distrubuted as freeware around the internet, I mean, is Bill Gates even going after these people that're distributing the full version of QB 4.5? I know that it's over 15 years old, but geesh, regardless of how old the programming language is, it shouldn't be out there as freeware, or so it sounds. At least QuickBAIC 4.5's good to make your programs from QBasic and compile them to .EXEs, but outside of that, I don't see the point!
Night Hacker
04-21-2004, 10:24 PM
My last upgrade to Visual Studio .NET Professional 2003 cost me $31.10.
My last upgrade to Minimalist GNU for Windows (MinGW/Dev-C++) cost me $0. http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
It sticks to the C/C++ standards and fully optimizes. Who got the better deal? http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Oh, and there is alot more to optimization than size reduction. And there can be ALOT more speed increase than a mere 1%! Especially if you're doing 3D programming. A simple command line option like "-ffast-math" (with MinGW) can make a HUGE difference in speed.
JimboC
04-22-2004, 08:25 PM
My last upgrade to Minimalist GNU for Windows (MinGW/Dev-C++) cost me $0. http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
It sticks to the C/C++ standards and fully optimizes. Who got the better deal? http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
You know, you're so totally right. How didn't I see that before?
Monti
05-26-2005, 10:33 AM
IronBob said:
Anyway, it'd be better to have Paganitzu as a Windows game instead of DOS in this day in age, or at least in Linux.
The Paganitzu I programmed will actually run in Windows and Windows XP! No speed problems either.
I'll be getting a faster computer with XP in June this year. Then I can make a Paganitzu Editor using the mouse instead of just the keyboard (by way of Visual Basic.)
CronoMan
07-18-2005, 08:25 AM
Crosma said:
...starting from scratch with a "real" language...
heh, The programmers living in the 60's would probably want kill you for saying something like that http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
Rider
07-19-2005, 05:07 AM
CronoMan said:
Crosma said:
...starting from scratch with a "real" language...
heh, The programmers living in the 60's would probably want kill you for saying something like that http://forums.3drealms.com/ubbthreads/images/graemlins/wink.gif
those from the 90's too http://forums.3drealms.com/ubbthreads/images/graemlins/mad.gif
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.