Welcome, Guest. Please login or register.

Author Topic: Can someone help me with BASIC...  (Read 3331 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ElPolloDiablTopic starter

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Can someone help me with BASIC...
« on: May 25, 2010, 01:42:04 AM »
Hi,

I'm doing an RPG in BASIC and I want to know a good method for switching between screens. The character walks to the edge of a screen and triggers the next screen to load, same as in the King's Quest series.

I'm very rusty and I'm spending a lot of time just figuring out what I want to do, so if you can give me a speed boost that would be great.
Go Go Gadget Signature!
 

Offline TheBilgeRat

  • Hero Member
  • *****
  • Join Date: May 2010
  • Posts: 1657
    • Show only replies by TheBilgeRat
Re: Can someone help me with BASIC...
« Reply #1 on: May 25, 2010, 02:23:34 AM »
all I got is:

100 PRINT "HU HU HUH HU  HUH...that was cool"
200 GOTO 100

:lol:
 

Offline retrogeeks

  • Newbie
  • *
  • Join Date: Dec 2006
  • Posts: 28
    • Show only replies by retrogeeks
    • http://www.retrogeeks.com
Re: Can someone help me with BASIC...
« Reply #2 on: May 25, 2010, 02:27:30 AM »
What basic are you using?
Amiga 3000,2000,1000,500, 1200. Atari 1040STf, Mac Mini (09, Main Machine), plus many other 80\\\'s computer Ti994a, C64, Vic20, too many Apple 2\\\'s to list :)
 

Offline trekiej

Re: Can someone help me with BASIC...
« Reply #3 on: May 25, 2010, 03:22:35 AM »
Is it one large panoramic or single pictures?

If Hero_Location = Screen_Location
Then (load in new screen or scroll background)
Amiga 2000 Forever :)
Welcome to the Planar System.
 

Offline lsmart

  • Sr. Member
  • ****
  • Join Date: Jun 2009
  • Posts: 433
    • Show only replies by lsmart
Re: Can someone help me with BASIC...
« Reply #4 on: May 25, 2010, 05:55:34 AM »
Load the next screen before the Guybrush reaches the target location. Draw it in a background window. Kill your current window and bring the other to front after Guybrush is at the orner of the old screen - repeat.

How is this specific to BASIC? Maybe you post a code snippet, if you have problem with a particular part?
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4052
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show only replies by jj
Re: Can someone help me with BASIC...
« Reply #5 on: May 25, 2010, 08:57:38 AM »
IF you are using blizt basic or most decent basics.  You can set the screen you are drawing to.  As the last poster says draw the next screen to the background screen.  Then when you character reaches the screen just flip.  Its basically double screen buffering.   Might be cool speed wise to do this in the main game loop befopre your character gets to the edge of screen.  Only problem is if you have four possilbe screens then yopu will have to draw it as they get to the edge.  but still do the flip as it wil lapeear as screen just apperaing as opposed to being drawn.
 
Does this make sense ?
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline yoodoo

  • Full Member
  • ***
  • Join Date: Apr 2002
  • Posts: 130
    • Show only replies by yoodoo
Re: Can someone help me with BASIC...
« Reply #6 on: May 25, 2010, 09:58:36 AM »
Quote
Only problem is if you have four possilbe screens then yopu will have to draw it as they get to the edge. but still do the flip as it wil lapeear as screen just apperaing as opposed to being drawn.

How about drawing  the next screen in the buffer window based on which direction the character is moving, so if moving to the right, you drawn the next location, moving to the left you draw the last location etc. This means you could still have the next window ready before the character reaches the appropriate "hot-spot" location.
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4052
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show only replies by jj
Re: Can someone help me with BASIC...
« Reply #7 on: May 25, 2010, 10:23:15 AM »
Thats a pretty good idea.  Though depends how quickly the screen draw takes.  If you are re-drawing a screen to the back buffer everytime a player changes direction might slow the game down quite a lot.  Suppose it depends how long screen draw takes, and what the target system spec is.
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline ElPolloDiablTopic starter

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Re: Can someone help me with BASIC...
« Reply #8 on: May 25, 2010, 11:49:43 AM »
I got it, thanks for your help.
I'll post some screenshots as get further along. I'm using AD&D 2.5 edition rules in a child rearing sim. It's before you go to the fighter academy etc. you can pick up skills thieving, going to school, casual work and then finally adventuring.
Go Go Gadget Signature!
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4052
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show only replies by jj
Re: Can someone help me with BASIC...
« Reply #9 on: May 25, 2010, 12:50:56 PM »
Out of interest what basic are you using, blitz or amos and is this for Amiga or other platform ?
 
I perosnally from a users point of view prefer a smooth scroll rather than flipping screen.
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline ElPolloDiablTopic starter

  • Hero Member
  • *****
  • Join Date: May 2009
  • Posts: 1702
    • Show only replies by ElPolloDiabl
Re: Can someone help me with BASIC...
« Reply #10 on: May 25, 2010, 12:56:05 PM »
I just started it in Qbasic, but I'm about to move it over to Blitz Basic.

Yeah I can do that, I just make the move freely section small and when you hit the edge it scrolls.
Go Go Gadget Signature!
 

Offline Daedalus

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 893
    • Show only replies by Daedalus
    • http://www.robthenerd.com
Re: Can someone help me with BASIC...
« Reply #11 on: May 25, 2010, 01:07:17 PM »
I can recommend Blitz waaaay over QBasic - the graphics handling is far superior, both in old-style Amiga chipset only, and system-friendly OS4-compatible ways. Once you get to grips with it you'll start making massive progress!
Engineers do it with precision
--
http://www.robthenerd.com
 

Offline jj

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 4052
  • Country: wales
  • Thanked: 2 times
  • Gender: Male
    • Show only replies by jj
Re: Can someone help me with BASIC...
« Reply #12 on: May 25, 2010, 01:31:24 PM »
QBasic as in the really old basic that came with ms-dos ?  If you are doing it on PC would still suggest blitz basic .
“We don't stop playing because we grow old; we grow old because we stop playing.” - George Bernard Shaw

Xbox Live: S0ulA55a551n2
 
Registered MorphsOS 3.13 user on Powerbook G4 15"
 

Offline fishy_fiz

  • Hero Member
  • *****
  • Join Date: Jan 2005
  • Posts: 1813
    • Show only replies by fishy_fiz
Re: Can someone help me with BASIC...
« Reply #13 on: May 25, 2010, 02:07:04 PM »
Depending on chipram you could also just make an oversized screen/bitmap and switch the viewport to change between "screens". Less loading this way and maybe a bit easier to be able to scroll any of the levels if theyre bigger than the screen (I've not played the game, but it sounds like its a still screen game mostly ?).
Near as I can tell this is where I write something under the guise of being innocuous, but really its a pot shot at another persons/peoples choice of Amiga based systems. Unfortunately only I cant see how transparent and petty it makes me look.
 

Offline Thorham

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1150
    • Show only replies by Thorham
Re: Can someone help me with BASIC...
« Reply #14 on: May 25, 2010, 04:40:55 PM »
Yeah, Quick Basic is a bad choice, it's just too old. Better try something much more powerful, like FreeBasic. That basic is powerful and it's faaaast (if you do things properly). And, it's also open source. However, if you want to get good results then sometimes it can be a little mid-level ;)

Main page: FreeBasic
Forum: FreeBasic Forum