|
Post by EvilGodZealot on Jun 13, 2004 5:47:16 GMT
Hey im 13 and i started qbasic 2 years ago...i make more text-based programs..with 3d text-based windows and all that. Someone help me with graphics..i would be greatly appreciated help me with loading it ..etc btw would be great if i could play MIDI in qbasic....QMIDI doesnt work on my comp
|
|
|
Post by EvilGodZealot on Jun 13, 2004 6:34:59 GMT
|
|
|
Post by Ildûrest on Jun 15, 2004 10:55:26 GMT
Nice game, but it's got loads of room for improvement. I'll only mention a few things about it. Firstly, you use SLEEP. I used to use sleep and when I discovered there were other, better things I practically never used sleep again. I think you should use TIMER and WAIT &H3DA, 8 instead. TIMER is fun enough, it returns the number of seconds elapsed since midnight (accurate to about .02 of a second), so you can compare the time now with the time a while ago to make a delay. E.g. EndTime! = TIMER + .3 DO:LOOP WHILE TIMER < EndTime! (One way of making a .3 second loop) This way won't skip time if you press a key (unless you program it do that) as SLEEP would WAIT &H3DA, 8 is a bit different. It waits for a vertical retrace on the screen, which is the best time to update the screen to avoid flicker. WAIT &H3DA,8 ,8 waits until the vertical retrace is finished. It is a bit less useful, but if you want to wait for a few vertical retraces then you can use something like: WAIT &H3DA, 8 WAIT &H3DA, 8, 8 WAIT &H3DA, 8 WAIT &H3DA, 8, 8 WAIT &H3DA, 8 One more thing- if you want to avoid using the % so often, you can DEFINT A-Z, which sets the DEFault datatype as INTeger for all variables beginning with A-Z, and unless you DIM them AS LONG/SINGLE/DOUBLE/STRING or use a &, !, #, or $ then they will be integers by default. Also you have a whole lot of stuff like DIM SHARED SPEED, WID, FORE, BACK, BOT, DEATH, REPLAY1, REPLAY2 but you may want to use AS INTEGER (or AS something else) E.g. DIM SHARED SPEED AS INTEGER, WID AS SINGLE, FORE AS LONG..... Hopefully that's useful stuff for you. Good job with the game, anyway. Try this game I've started making: www.autopack.com.au/aleks/release.exe
|
|
|
Post by EvilGodZealot on Jun 17, 2004 10:17:15 GMT
thx dude
|
|
|
Post by Ildûrest on Jun 17, 2004 11:45:30 GMT
Oh yeah, DEFINT has cousins like DEFLNG, DEFSNG, DEFDBL and DEFSTR (for LONG-integers, SINGLE-precision, DOUBLE-precision, and string, respectively). Also you can replace A-Z with any two letters so only variables that start with anything between those two will be that datatype
E.g. DEFSNG A DEFINT B-Z
To make variables like AReallyLongVariableName and abx SINGLE-Precision if they don't have a type suffix, and anything else like Bob or ShortVarName INTEGERs by default
|
|
|
Post by EvilGodZealot on Jun 20, 2004 8:59:29 GMT
im..not that into variables:D btw...can i in any way access internet from qbasic...e.g. like load a text file from some place on net? it would b great to help ;D
|
|
|
Post by Ildûrest on Jun 21, 2004 12:06:47 GMT
Yeah you can, usually through a slave program (i.e. QB calls some other EXE file by using SHELL) Some of these can be found on the internet. Best ask your question here: www.network54.com/Forum/13959It's a much more active forum and there are loads of smart people there.
|
|