DOS Games Message Board
DOS Games Discussion
A message board to talk about DOS games, get help, and find old games.
Do NOT post warez or abandonware requests please
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
NEW! DOSGames.com has been massively upgraded to v2.0 with TONS of new features!
Check out the new design and dozens of new features including online play!


BMP's in gwbasic
Goto page Previous  1, 2
 
Post new topic   Reply to topic    DOS Games Discussion Forum Index -> Game Creation
Author Message
baro_unlogged
Guest






PostPosted: Sat Dec 11, 2004 12:29 pm     Post subject: Reply with quote

uuum... right.

pset (x coordinate, y coordinate) colour

easy enough.
Back to top
Jack Bond
Guest






PostPosted: Sun Dec 19, 2004 1:41 pm     Post subject: Reply with quote

nevermind I'm past that.
I REEEEEEEEEEEEEEELY need to know how to bind space bar. Just like you bind arrows. I want to put like:
10 on key "however you do space bar" gosub 1000
20 goto 10
1000 print"success"
1010 return

and the same for the f key.
Back to top
Guest







PostPosted: Mon Dec 20, 2004 7:10 am     Post subject: Relsoft Reply with quote

Untested:

Code:
10 K$ = inkey$

20 if K$ = chr$(32) then gosub 100

30 if K$ = "" then 10

90 end

100 Print "Pressed Space"
110 return




[/code]
Back to top
Jack Bond
Guest






PostPosted: Mon Dec 20, 2004 8:22 am     Post subject: Reply with quote

ok I'll try that.
You guys are much more reliable than the people at www.axlstfc.com
so heres a reward.

http://www.newgrounds.com/portal/view/176901 http://www.newgrounds.com/portal/view/111291 http://www.newgrounds.com/portal/view/49489 http://www.newgrounds.com/portal/view/176901
http://www.newgrounds.com/portal/view/176901

1. DBZ in a nutshell
2. yu-gi-oh in a nutshell
3. pokemon in a nutshell
4. Sonic the hedgehog in a nutshell
5. rag doll game
Back to top
Guest







PostPosted: Mon Dec 20, 2004 8:24 am     Post subject: Reply with quote

sry last one is sonic again

http://www.stickpage.com/ragdollgameplay.shtml

that's it
Back to top
windes
Newbie
Newbie


Offline
Joined: 08 Dec 2014
Posts: 1

PostPosted: Mon Dec 08, 2014 1:42 am     Post subject: Load a BMP in GWBasic Reply with quote

One thing you need to remember: GWBASIC has a lot of limitations.. Here's the code that will give you the possiblity to load a 16X16 /16colors bitmap. You can't load anything that would exceed 255bytes..

Don't forget: Load gwbasic at dos prompt with switch /s:255
At line 501, change the filename and location to show on the display. Use Screen 7.. Or Screen 9 for better results.

501 ZOOM=1:BMPFILE$="C:\BMP16.BMP":LOCX=100:LOCY=100 'DEFIN AS YOU WANT
502 DIM BYT(512)
503 OPEN "r",1,BMPFILE$:FIELD 1,3 AS F$:GET 1,1:FLN=ASC(MID$(F$,3,1)):CLOSE #1
504 OPEN "r",1,BMPFILE$,FLN:FIELD 1, FLN AS A$:GET 1,1
505 FOR I = 1 TO FLN
506 BYT(I)=ASC(MID$(A$,I,1))
507 NEXT I
508 W=BYT(19):H=BYT(23)
509 DIM PX(W,H)
510 XI=-2
511 FOR X=FLN TO FLN-((W*H)/2) STEP-1
512 XI=XI+2:IF XI=W THEN YI=YI+1:XI=0:IF YI=H THEN GOTO 517
513 WD$=HEX$(BYT(X)):IF LEN(WD$)=1 THEN WD$="0"+WD$
514 PX((W-1)-XI,YI)=ASC(MID$(WD$,2,1))
515 PX((W-1)-(XI+1),YI)=ASC(MID$(WD$,1,1))
516 NEXT X
517 FOR X=0 TO W-1
518 FOR Y=0 TO H-1
519 GOSUB 530'GET cOLOR
520 IF ZOOM=0 THEN ZOOM=1
521 IF ZOOM=1 THEN PSET(LOCX+X,LOCY+Y),PX(X,Y) ELSE LINE(LOCX+(X*ZOOM),LOCY+(Y*ZOOM))-(LOCX+ZOOM-1+(X*ZOOM),LOCY+ZOOM-1+(Y*ZOOM)),PX(X,Y),Bf
522 NEXT Y:NEXT X
523 END
530 'Get COLOR
531 IF PX(X,Y)=70 THEN PX(X,Y)=15:RETURN'
532 IF PX(X,Y)=69 THEN PX(X,Y)=11:RETURN
533 IF PX(X,Y)=68 THEN PX(X,Y)=13:RETURN
534 IF PX(X,Y)=67 THEN PX(X,Y)=9:RETURN
535 IF PX(X,Y)=66 THEN PX(X,Y)=14:RETURN
536 IF PX(X,Y)=65 THEN PX(X,Y)=10:RETURN
537 IF PX(X,Y)=57 THEN PX(X,Y)=12:RETURN
538 IF PX(X,Y)=56 THEN PX(X,Y)=7:RETURN
539 IF PX(X,Y)=55 THEN PX(X,Y)=8:RETURN
540 IF PX(X,Y)=54 THEN PX(X,Y)=3:RETURN
541 IF PX(X,Y)=53 THEN PX(X,Y)=5:RETURN
542 IF PX(X,Y)=52 THEN PX(X,Y)=1:RETURN '
543 IF PX(X,Y)=51 THEN PX(X,Y)=6:RETURN
544 IF PX(X,Y)=50 THEN PX(X,Y)=2:RETURN
545 IF PX(X,Y)=49 THEN PX(X,Y)=4:RETURN '
546 IF PX(X,Y)=48 THEN PX(X,Y)=0:RETURN
550 RETURN

Back to top
tienkhoanguyen
PSEUDOCODER


Offline
Joined: 05 Sep 2014
Posts: 2664
Location: Texas

PostPosted: Wed Sep 16, 2015 8:41 pm     Post subject: From my personal experiences with Commodore BASIC... Reply with quote

When I first started out on a different computer, I used BASIC that is built into the computer itself. Assembly language was actually very hard at that time (over 30 years ago). You actually had to put in all numbers for assembly instructions. However this was the only way to go for maximum speed of the computer.

Usually, BASIC is an "interpreted" language. This means that it continues to process the commands as it encounters it into machine form. This is very slow. So people who need to use speed for graphics display use close to machine language as possible like assembly.

I don't know about the BASIC you are talking about, however, Commodore 64 BASIC allows numbers to be enterred for assembly language speed.

If you are programming in MS-DOS and would like to be a PRO I would recommend using Borland Turbo Assembler 4.1 for speed. Maybe you could somehow integrate it into the BASIC language itself like I do for my C language.

Speaking from my own point of view, the best package for programming MS-DOS games is Borland Turbo Assembler 4.1 and Borland Turbo C 2.01. Last I know they are still available from Embarcadero website. They have taken over Borland's old programming languages from last I know. The last time I talked to them was like last year.

Here is a great way to start on your journey to programming games, ...

Maybe you won't be a PRO over night however I'm sure you'll be like me.

Disclaimer: I've been told my programming is spaghetti sloppy hehe

http://edn.embarcadero.com/article/20841

Laughing
Back to top
tienkhoanguyen
PSEUDOCODER


Offline
Joined: 05 Sep 2014
Posts: 2664
Location: Texas

PostPosted: Wed Sep 16, 2015 8:47 pm     Post subject: Similarities to BASIC using C... Reply with quote

Borland Turbo C 2.01 has the ability to be similar to BASIC in that you can make your own words and such. Just take your time. I've gone through the Borland Turbo C 2.01 book a bit of the ways and they've seem to cover everything you need to know to program games the way a PRO does it. Not that I know what a PRO does Laughing
Back to top
tienkhoanguyen
PSEUDOCODER


Offline
Joined: 05 Sep 2014
Posts: 2664
Location: Texas

PostPosted: Wed Sep 16, 2015 8:49 pm     Post subject: Re: Load a BMP in GWBasic Reply with quote

windes wrote:
One thing you need to remember: GWBASIC has a lot of limitations.. Here's the code that will give you the possiblity to load a 16X16 /16colors bitmap. You can't load anything that would exceed 255bytes..

Don't forget: Load gwbasic at dos prompt with switch /s:255
At line 501, change the filename and location to show on the display. Use Screen 7.. Or Screen 9 for better results.

501 ZOOM=1:BMPFILE$="C:\BMP16.BMP":LOCX=100:LOCY=100 'DEFIN AS YOU WANT
502 DIM BYT(512)
503 OPEN "r",1,BMPFILE$:FIELD 1,3 AS F$:GET 1,1:FLN=ASC(MID$(F$,3,1)):CLOSE #1
504 OPEN "r",1,BMPFILE$,FLN:FIELD 1, FLN AS A$:GET 1,1
505 FOR I = 1 TO FLN
506 BYT(I)=ASC(MID$(A$,I,1))
507 NEXT I
508 W=BYT(19):H=BYT(23)
509 DIM PX(W,H)
510 XI=-2
511 FOR X=FLN TO FLN-((W*H)/2) STEP-1
512 XI=XI+2:IF XI=W THEN YI=YI+1:XI=0:IF YI=H THEN GOTO 517
513 WD$=HEX$(BYT(X)):IF LEN(WD$)=1 THEN WD$="0"+WD$
514 PX((W-1)-XI,YI)=ASC(MID$(WD$,2,1))
515 PX((W-1)-(XI+1),YI)=ASC(MID$(WD$,1,1))
516 NEXT X
517 FOR X=0 TO W-1
518 FOR Y=0 TO H-1
519 GOSUB 530'GET cOLOR
520 IF ZOOM=0 THEN ZOOM=1
521 IF ZOOM=1 THEN PSET(LOCX+X,LOCY+Y),PX(X,Y) ELSE LINE(LOCX+(X*ZOOM),LOCY+(Y*ZOOM))-(LOCX+ZOOM-1+(X*ZOOM),LOCY+ZOOM-1+(Y*ZOOM)),PX(X,Y),Bf
522 NEXT Y:NEXT X
523 END
530 'Get COLOR
531 IF PX(X,Y)=70 THEN PX(X,Y)=15:RETURN'
532 IF PX(X,Y)=69 THEN PX(X,Y)=11:RETURN
533 IF PX(X,Y)=68 THEN PX(X,Y)=13:RETURN
534 IF PX(X,Y)=67 THEN PX(X,Y)=9:RETURN
535 IF PX(X,Y)=66 THEN PX(X,Y)=14:RETURN
536 IF PX(X,Y)=65 THEN PX(X,Y)=10:RETURN
537 IF PX(X,Y)=57 THEN PX(X,Y)=12:RETURN
538 IF PX(X,Y)=56 THEN PX(X,Y)=7:RETURN
539 IF PX(X,Y)=55 THEN PX(X,Y)=8:RETURN
540 IF PX(X,Y)=54 THEN PX(X,Y)=3:RETURN
541 IF PX(X,Y)=53 THEN PX(X,Y)=5:RETURN
542 IF PX(X,Y)=52 THEN PX(X,Y)=1:RETURN '
543 IF PX(X,Y)=51 THEN PX(X,Y)=6:RETURN
544 IF PX(X,Y)=50 THEN PX(X,Y)=2:RETURN
545 IF PX(X,Y)=49 THEN PX(X,Y)=4:RETURN '
546 IF PX(X,Y)=48 THEN PX(X,Y)=0:RETURN
550 RETURN



JESUS!hehe This person seems to know what their talking about. I recognize many similarities to Commodore 64 BASIC.
Back to top
fredaskew
Newbie
Newbie


Offline
Joined: 28 Jun 2016
Posts: 2

PostPosted: Tue Jun 28, 2016 4:58 am     Post subject: Reply with quote

I too use GW basic.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    DOS Games Discussion Forum Index -> Game Creation All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 


Powered by phpBB © 2001, 2005 phpBB Group and Ask an Expert
Also powered by Darren and the other admin and mods' hard work! ;)