Freebasic equivlants of QB code
Posted: Sat Oct 04, 2008 3:48 am
I'm hitting the glass ceiling with QB, and I was thinking of going either pure VB, or FB.
I am starting to grasp the ins and outs of game programming in VB, but I would like to take a whack at FB, but I need some dumbing down of the new ways of doing things first.
Example program
DECLARE SUB DrawSprite(x,y,Spr())
SCREEN 13
redim Spr(10,10)
get(0,0)-(9,9),Spr
DrawSprite 3,4,Spr()
END
SUB DrawSprite (x,y,Spr())
PUT (x,y),Spr()
END SUB
.........
Ok, there is an array there being used by the SUB, and I know that there is not ""real array support in the sense of looking like QB code, but instead there are pointers,..
I would like examples of how to handle arrays that are both numeric and string based.
Also, what is this [ ] in the array? I have also seen the familiar ( ) when referencing arrays as well, and etc and etc, ..
Please dumb it down, and also, please don't put the code in some rigid fancy updated "" latest update of FB, version of the code, please make it in the sense of the earlier versions of FB so it looks like real code still, and would be most likely compatable on most all the updates of FB no matter what.
How do you guys handle non-image blocks of binary data file IO transfers between the memory and disk? GET and PUT file commands?
Also, why does there have to be all these little ___ underlines in the names of defined variable names when referencing high order DLL functions and crap??? Why do these FB programmers have to make the code look more and more like gibberish with each new update? Why can't we just make it simple!?? K.I.S.S.. Keep it simple Sam..
I also noticed, sometimes my SUB want to be defined at the beginning of the FB program, sometimes they like being on the end of the program, what is up with that and what is the proper right way to do it?
Examples of that using various IDE editors would be helpful.
I know this might be alot to ask for, and I am not sure if there are other posts on these subjects, but I don't have alot of time to surf the hundreds of posts between the short hours I have off around my work schedule.
Please help, ..
I've posted some stuff in the QB express mag, and I was hoping you guys could come to my rescue this time.
Thanks in advance for your time.
Notifying me of existing posts with links I wouldn't mind having either if that would be easier for some of you.
Kiyote!
I am starting to grasp the ins and outs of game programming in VB, but I would like to take a whack at FB, but I need some dumbing down of the new ways of doing things first.
Example program
DECLARE SUB DrawSprite(x,y,Spr())
SCREEN 13
redim Spr(10,10)
get(0,0)-(9,9),Spr
DrawSprite 3,4,Spr()
END
SUB DrawSprite (x,y,Spr())
PUT (x,y),Spr()
END SUB
.........
Ok, there is an array there being used by the SUB, and I know that there is not ""real array support in the sense of looking like QB code, but instead there are pointers,..
I would like examples of how to handle arrays that are both numeric and string based.
Also, what is this [ ] in the array? I have also seen the familiar ( ) when referencing arrays as well, and etc and etc, ..
Please dumb it down, and also, please don't put the code in some rigid fancy updated "" latest update of FB, version of the code, please make it in the sense of the earlier versions of FB so it looks like real code still, and would be most likely compatable on most all the updates of FB no matter what.
How do you guys handle non-image blocks of binary data file IO transfers between the memory and disk? GET and PUT file commands?
Also, why does there have to be all these little ___ underlines in the names of defined variable names when referencing high order DLL functions and crap??? Why do these FB programmers have to make the code look more and more like gibberish with each new update? Why can't we just make it simple!?? K.I.S.S.. Keep it simple Sam..
I also noticed, sometimes my SUB want to be defined at the beginning of the FB program, sometimes they like being on the end of the program, what is up with that and what is the proper right way to do it?
Examples of that using various IDE editors would be helpful.
I know this might be alot to ask for, and I am not sure if there are other posts on these subjects, but I don't have alot of time to surf the hundreds of posts between the short hours I have off around my work schedule.
Please help, ..
I've posted some stuff in the QB express mag, and I was hoping you guys could come to my rescue this time.
Thanks in advance for your time.
Notifying me of existing posts with links I wouldn't mind having either if that would be easier for some of you.
Kiyote!