Qbasicnews.com
October 22, 2020, 09:43:33 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: 1 2 [3]
  Print  
Author Topic: Scolling Background  (Read 8342 times)
Anonymous
Guest
« Reply #30 on: January 11, 2004, 10:20:04 PM »

you could have arr(1 to 32767)... arr(1 to 32768)... thats just crazy talk Smiley
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #31 on: January 11, 2004, 10:33:15 PM »

5000 different tiles?

You must be hoppin' mad. Smiley
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
bonfire89
Member
*
Posts: 25


« Reply #32 on: January 11, 2004, 11:51:04 PM »

lol.. oh man.

could I load like 500?

and then unload them?
Logged
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #33 on: January 12, 2004, 12:08:47 AM »

What you need is an array MAP and a tile set. THe array map holds specific tile indexes for each location in the...map.

The tile set is ideally loaded in before the game begins and then is put on the screen. That is accomplished by using an external library's graphics functions or just using QB's GET and PUT, but apparently they don't clip as na_th_an said. Clipping is when a graphic is only partly visible on the screen (for instance, on the edges).

You can use PSET and a set of integers, but it will be slow as you have no doubt noticed, as PSET is the slowest pixel plotter ever.

Now, everyone is plotting pixels in the end, but what gives PUT and library graphics functions an edge is that they put a chunk of pixels at one time. Less data has to be transferred across the computer, theoretically.

Bad example:

Code:

FOR i% = 1 TO 1000
hi$ = "H" + "i"
PRINT hi$
NEXT i%

'versus:
hi$ = "Hi"
FOR i% = 1 TO 1000
PRINT hi$
NEXT i%

Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
bonfire89
Member
*
Posts: 25


« Reply #34 on: January 12, 2004, 12:43:44 AM »

example makes sense..

Kinda like like put objects in a box, then bringing the box somewhere compared to bring each object at a time.

Ill try and look up some info on maps then.

as long as I get it figured out by saturday, I have to hand in my game proposal one monday.

And If I can't get this cleared up, Ill have to goto a game without a scrolling background.
Logged
adosorken
*/-\*
*****
Posts: 3655



WWW
« Reply #35 on: January 12, 2004, 01:13:42 AM »

When I was working on beta 0.60 of WOS back in the "olden days", I had implemented a 6400 tile storage method...but not in conventional memory...it used XMS, and I did use all 6400 tile slots.

Anyways.

bonfire...I heavily HEAVILY suggest downloading some sourcecode and seeing how this all is done. You can find a great number of examples here on qbasicnews or over at qbnz.com. There are file archives everywhere that you can learn from. All you gotta do is look around and be willing to learn. Smiley
Logged

I'd knock on wood, but my desk is particle board.
relsoft
*/-\*
*****
Posts: 3927



WWW
« Reply #36 on: January 12, 2004, 02:22:02 AM »

Show this to your teacher:

http://rel.betterwebber.com/junk.php?id=16

And tell him its harder that he thinks. ;*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
bonfire89
Member
*
Posts: 25


« Reply #37 on: January 12, 2004, 10:02:15 AM »

thanks for all the help people  Cheesy

learned a fair amount in the last few days


and think you for that link on the scrolling

the teacher isn't requiring it at all, but it is somthing I want to do. Hopefully I can figure out what is going on there..

If not, ah well.

Thanks
Logged
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!