Posts: 1,556
Threads: 298
Joined: Dec 2002
I've been trying to brainstorm about this forever and I just cannot fins a solution for this. In Cobra, I'm trying to include parralax backgrounds so it will look better and all... but when I tried putting it in, (I backed it up, don't worry), the line and paint commands didn't really do that nice of a job going on top of each other, so I was wondering, is there a way to maybe do some weird thing that resembled page flipping, but ignores a certain color, so I can maybe "page flip" a layer on top of the other?
Posts: 6,419
Threads: 74
Joined: Mar 2002
You'll need libs, sorry. DirectQB has stuff to do what you like.
I've seen that you draw your backdrop using graphical primitives such as lines, circles and paint. You can do a nice trick to have a parallax:
Use a determined outline colour for the far layer, and use it with PAINT. You can use all colours but, for example, 0, which will be the outline colour for the near layer. When you draw the outlines OVER the far layer, and then use PAINT (x,y),colour,0 it will stop only on 0, and will over-draw the far layer ('cause it DOES NOT contain 0).
I did some tests in the past, and it seems to work. The bad point is when the PAINT coordinate falls out of screen: that polygon will remain empty.
Posts: 2,020
Threads: 24
Joined: Jun 2002
here's a better solution: dont use vector graphics using qb's line and paint. seriously, you'll want bitmaps. then you can do all sorts of crazy things. especially if you use a library so it isnt so goddamned slow. or learned c. that works too, and surprisingly well.
but for cobra: yeah. use bitmap backgrounds in 13h.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 1,556
Threads: 298
Joined: Dec 2002
Ok thanks, I need to find out how to use BMPS because then I can do a *WHOLE* lot more than I could with line and paint commands.
Posts: 142
Threads: 33
Joined: Dec 2001
ive got a tut on loading BMPs in Pure QB. Il upload it later for you megaman..
a few moments later...
http://www.geocities.com/yourfriendthefreak/bmpqb.htm
there you go, hope it helps,
(PS, i got this tut of the net a while back, i hope the autor dosnt mind me posting it :oops: )
Posts: 720
Threads: 46
Joined: Oct 2001
Quote:here's a better solution: dont use vector graphics using qb's line and paint. seriously, you'll want bitmaps. then you can do all sorts of crazy things. especially if you use a library so it isnt so goddamned slow. or learned c. that works too, and surprisingly well.
but for cobra: yeah. use bitmap backgrounds in 13h.
The vector graphics might be faster... if you didn't use the built-in line commands...
Posts: 2,020
Threads: 24
Joined: Jun 2002
yeah, that's why i added the line and paint comment. there are actually quite a few hacks he could pull off. But for all efficiency purposes, you can pull off parallax scrolling in qb on a 486 if you use the right libs.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Posts: 3,288
Threads: 167
Joined: Nov 2001
A 5 layer game made in CosmoX or/and Rellib would run fine on a 486. Al you need is a good design and powers of 2 sprites for solid. Transparent sprites soesn't need to be pow of 2 as it checks on a per pixel basis.
Parallax? just divide by any factor you want.
Posts: 749
Threads: 4
Joined: Jun 2002
I'll be a little annoying here: as a priority, your game doesn't need to look better, but to play better. Did you see Milo's keyhandler routine? (and that suggested addition just for a start)
Just my opinion.
img]http://usuarios.vtr.net/~disaster/sigs/annoyizer.php[/img]
Posts: 3,288
Threads: 167
Joined: Nov 2001
Quote:I'll be a little annoying here: as a priority, your game doesn't need to look better, but to play better. Did you see Milo's keyhandler routine? (and that suggested addition just for a start)
Just my opinion.
Yeah, and I believe you are ready for Libs.