I'm taking a programming class in which we are learning True Basic. During the last 4 and a half weeks of class, we are going to be working on our FINAL projects. Well, I want to do a simple Mario game for my project. I've already created a horrible pong game, and some other games which involve key input, but no matter how much I experiment with Key Input and Get Key and all that, I can't make it so that the keyboard's repeat delay doesn't interfere. You know in MMF how when you hold a key down, it immediately responds. In True Basic I'm trying to make it so that -- Repeat While "Right Arrow" is Pressed -- Do something... you know what I'm saying? What's a good way to do this in True Basic?
Also, does anybody know of a website which teaches game-making in True Basic? Or are there any platform game engines in True Basic. I need one, cause I really want to make my project good... Is making a game like Mario even POSSIBLE in True Basic? With proper coding, would you actually be able to create platformers. I haven't learned too much of True Basic but I can't find code that allows you to do an equivalent of MMF's "Repeat While Key is Pressed"... So, basically, my questions are:
1. How do I do a proper "Repeat While Key is Pressed" in True Basic?
2. Anybody know of any Mario or platform game engines written in True Basic?
3. Can you load pictures with Transparency in True Basic? I can't find out how...
If it's anything like VB6, you can use the KeyPress instead of GetKey event I believe. I think the GetKey event is used to get the actual ASCII code for the keyboard input at runtime. (ex. The "Enter" Key is ASC Key Code 13)
Equin Village uses this, and the guy will continue to move in the desired direction for as long as you hold the arrow key down, as in MMF's repeat while pressed event.
As for transparency, in VB6 you can't. In order to do it you have to use an API call called BitBlt. Basically, you have to create the actual sprite, and also do a "mask" for said picture that's entirely in black and white. I can't recall exactly HOW to do this, as the API Library call is complicated, but google BitBlt and see what turns up.
Hopefully, the two languages are similar and this helps!
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
From what I've seen, True Basic's syntax is very similar to that of VB. I'll try the KeyPress and hopefully I'll get transparency to work too. Thanks a lot! Also, anyone know of any websites containing True Basic engines or anything like that? I doubt there are any, but still...
EDIT: I got a basic to True Basic code converter from the True Basic Website, so now I can convert source from Basic to True Basic. Now, the problem is, I want to find the source of a Mario game created in Basic. Anybody know where to find this?
im still using quickbasic . also if true basic is anything like qbasic think if you store the getkey to a variable it runs better.
As for transparencies, i think your talking like seethrough sprites. yes? no? cause i dont think bit blt is for transparecies
in qbasic to do read a sprite thats 10x10 pixels then its mask and place them down to make extra pixels invisible its:
DIM sprite(10, 10)
DIM spritemask(10, 10)
FOR y = 1 to 10
FOR x = 1 to 10
PSET (x, y), z
GET (0, 0)-(10, 10), sprite
FOR y = 1 to 10
FOR x = 1 to 10
PSET (x, y), z
GET (0, 0)-(10, 10), spritemask
PUT((x coord), (y coord)), spritemask, AND
PUT((x coord), (y coord)), sprite, OR
thats a sprite of a rock . it's most likely different for vb6 or true basic so yeah look it up
I'll probably just make the background of my game a solid color so that I don't have to worry about transparency.
Okay, here's another question I have:
I got the Keypress thing to work in True Basic, but it gives me the same result as:
if key input then
get key pressed
Isn't there a way I can get it just like MMF's "Repeat While Key Is Pressed" condition? So that it detects while a key is down or being held down, and it repeats an event while this is true. Please help!
True! OnKeyDown, change the boolean value to true, OnKeyUp change it to false...
If boolean value is true do the stuff, otherwise not... There you go.. a homemade repeat while key is pressed routine...
Exactly, that's what I was thinking, but how do I do KeyUp and KeyDown in True Basic? I don't think there's a way... But I'll do some more research. Geez, True Basic is getting on my nerves. How the heck do you test for KeyUp KeyDown!!!
Anybody know the syntax for KeyUp/KeyDown for QBasic or Visual Basic? I'll experiment with them and see if I can get it to work in True Basic? At least for QBasic or just plain old Basic, because those languages are the closest to True Basic.
Not sure this is relevant, but try taking a look at http://advsys.net/ken/ . It's the homepage of the guy who made the engine for Duke Nukem 3D. Among other things, already in 1994 he made a 3D engine in Qbasic lots of other cool stuff on there.
Oh god, I took programming in highschool and they made me use that POS program too. I failed the class and I never tried to learn a programming langauge since. I don't even think it can make games. Most of the time we spent in the class was making dumb programs that calcuated the sum of things. You know, programs that take all the variables you programmed and displayed something like "Mary has 8 apples" or some prompt followed by "YOUR NAME IS (name)" and other stuff like that. We didn't do much else in the class. There was a very basic session on how to draw circles and lines but that was pretty much it.
Quick Basic rules all programming languages, motherfuckers. Those who slander it have obviously never explored it and witnessed what it's actually capable of. It's especially impressive considering its age.
By a route obscure and lonely,
Haunted by ill angels only,
Where an Eidolon, named night,
On a black throne reigns upright,
I have reached these lands but newly
From an ultimate dim Thule
From a wild clime that lieth, sublime,
Out of space
Out of time.
Yeah, the thing is the class I went to was supposed to be a QBasic class but they switched to True Basic (which i might add looks like a windows 3.1 program) because QBasic runs in DOS instead of windows. I would of loved learning Qbasic, at least that can make games. I'm not too sure about True Basic. I don't mean to discourage you or anything, there's a possibility it can be done but from what I've seen of the program i don't know.