dark_star![]() Junior Member Posts: 9 From: Registered: 08-18-2003 |
i have a demo version of blitz basic and i plan on buying the full version soon because i like it a lot. but, i was wondering if anyone could help me with something. i im also looking for a programming partner. i moved to NY |
AmazingJas![]() Member Posts: 437 From: Sydney, NSW, AUSTRALIA Registered: 04-03-2003 |
There's probably a couple of ways to do it, I like doing it the way you described, but it probably is only efficient for small gameworlds. Another way using an array is to set up a temporary image which is a little bit bigger than the size of your screen or viewport. Load all the images from your array that will be visible plus one extra row/collumn of images to the left,right,top and bottom onto this temporary image. Then grab the portion of the temporary image that needs to go to the screen and put it on the backbuffer ready for flipping. The coordinates that you grab will change depending on key press or mouse or whatever, and when the coordinates shift past a certain point, change your position in the array so that different images are written to your temporary image. Sorry I can't remember all the commands to do this as I haven't used blitz for a while (unfortunately). |
Krylar![]() Administrator Posts: 502 From: MD, USA Registered: 03-05-2001 |
Hiya, Blitz automatically handles clipping, so you don't have to worry about that. If you have 64x64 images, say, and you start drawing them at -32,-32, and end them at Screen_Width + 32, Screen_Height + 32...then they'll overlap the edges. Then you'll just need to determine how much to move the tiles during the draw. Maybe 8 pixels for walking and 16 for running, or whatever looks good to you. Another option to look into is ViewPorts. This will allow you to create a boarder around the screen, so you can have health indicators, etc. And then Blitz will clip inside that ViewPort. It's pretty cool, actually. Currently my other site is down ( http://www.blitzcoder.com ), but when it comes back up you can find a ton of tutorials/articles there that can help you along. Plus there are a lot of people there that use Blitz a lot and can help you (and maybe you'll even find a coding partner). I did write a book called "Learn to Program 2D Games in Blitz Basic", also, and it talks about some of the issues presented here and more. When the BlitzCoder site comes back up, you'll be able to get information on that book, if you're interested. All the best, -Krylar ------------------ |
dark_star![]() Junior Member Posts: 9 From: Registered: 08-18-2003 |
thanks... i tried to check out your site, but it wouldnt open. ill check it out. i almost got your book once too. my brithday is coming up... maybe ill get it. also, on one of the tutorials in the blitz demo. it said something |
Krylar![]() Administrator Posts: 502 From: MD, USA Registered: 03-05-2001 |
The site's back up...there was a MASSIVE server crash that killed it for a long long time. Fortunately, it's all better now ![]() -Krylar ------------------ |