Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A few questions regarding my game.
#1
I'm trying to write a Galaga clone in screen 7. I'd like to use mode 13 but there's no page flipping which means my animation would suck so I've a few questions.

1. Is it possible to use Mode X in QB? That would sure make doing graphics and animation easier.

2. If that's not possible, how might I get more than the 16 colours in mode 7?

3. My game so far was running quite smoothly until i put 4 if statements in to prevent the ship from moving outside the screen, and subsequently crashing the game. Now it's too slow to be playable. I'm afraid to see how slow things will run once I put in my baddies and their own hit detection. Anyway to get things running more smoothly?

4. And lastly, does anyone know of a program that will convert a bmp, png, or similar image file inot data statements for use as a sprite in qb?
Reply
#2
1. Yes
2. Just use double buffering with screen 13
3. Doesn't sound right...post your code
4. DATA statements are teh suck for sprites...I'd suggest using BSAVEd binary files.
Reply
#3
That's a start. I'll post my code tomorrow because I've gotta pull it from another computer. In the meantime, could you help explain how to implement those suggestions of yours?
Reply
#4
There is double buffering in screen 13 without any lib help. Fast enough and easy to use:

Here are some stuff made with it.

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

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

It's called SuperPUT. Yep made byt the guy above(Plasma).

Here's a lil tute:


http://faq.qbasicnews.com/?blast=SetVide...enThirteen

There's also a PUT replacement which allows:

Transparency, Flipping, clipping, etc and you can read about it here:

http://faq.qbasicnews.com/?blast=SuperPu...enThirteen
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#5
Here's my code:
http://evstar.eatsleepcode.ca/files/qb/Game/SPCATT.BAS

The game runs painfully slow, and I haven't even put in the baddies yet. I'm pretty sure I won't be able to use any libraries because this is for an assignment and we're supposed to write it ourself.
Reply
#6
Uh...

I think you forgot to include the game code. There isn't any! Just the initialization stuff...
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#7
My server's having issues, forgive me. I had to rename it and reupload it:

http://evstar.eatsleepcode.ca/files/qb/Game/SPCGAME.BAS
Reply
#8
1.- You don't need to use CALL. It is like using LET or REM. Instead of

Code:
CALL foo(a%,b%)

just do

Code:
foo a%, b%

2.- CLS 1 is terribly slow. Use this instead:

Code:
LINE (0,0)-(319,199),0,BF

3.- In "Placehud" you are doing this once and again:

Code:
Cls

Dim ship(667)

3.1. That CLS is not needed. You already cleared the screen.
3.2. That DIM takes time. You don't have to dim everytime.
3.3. Then you are printing lots of stuff. You don't have to print all that every time. PRINT is slow in graphics mode.

4.- You are putting the ship twice: in placehud and in putship.

5.- Your code needs vsync Tongue
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#9
The problem with the PRINTing is that if I don't reprint that stuff if dissapears, and I need that as part of the heads up display. And how do I vsync?
Reply
#10
You don't need to reprint everything. Just print it at the beginning and don't erase it.

VSync: http://faq.qbasicnews.com/?blast=VerticalRetraceGeneral
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)