[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2007-08-29T16:33:26-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/2423 2007-08-29T16:33:26-05:00 2007-08-29T16:33:26-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=15007#p15007 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> . But keep in mind, Pong isn't exactly a CPU hungry game so optimization isn't important. It's good for practice though. I don't use PUT (or anything directly linked to memory adresses) because I don't know how, but I've managed to do without such pretty well. :D

Statistics: Posted by Mentat — Wed Aug 29, 2007 4:33 pm


]]>
2007-08-29T10:31:58-05:00 2007-08-29T10:31:58-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14997#p14997 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
And I've tried SUBs, but I mainly use them for useful functions. Like faster CLSs and PSETS. I call them XPSET and XCLS :)

The theres also XLEFT, XRIGHT, XUP, XDOWN. But those are recent. I use them for the arrow keys.

Statistics: Posted by Frosty480 — Wed Aug 29, 2007 10:31 am


]]>
2007-08-28T16:27:37-05:00 2007-08-28T16:27:37-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14994#p14994 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
It's a good idea to take advantage of modular programming. By that I mean you have work done in components of the program (subroutines) so editing and debugging is MUCH easier.
Code clarity may seem tedious and unnecasary, but trust me, it pays off. :wink:
If you don't believe me, go code a 1k program in TI-BASIC, leave it for at least a week, and go back. I had to delete my best because of obscurity (WHAT DOES (G=4)G MEAN!? :evil: ).

I won't tell you where to exactly put code, because you will (and should) develope your own style. And me telling you what to put where doesn't help you become familiar with your program.

Statistics: Posted by Mentat — Tue Aug 28, 2007 4:27 pm


]]>
2007-08-28T13:28:54-05:00 2007-08-28T13:28:54-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14991#p14991 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> Statistics: Posted by Frosty480 — Tue Aug 28, 2007 1:28 pm


]]>
2007-08-27T20:29:59-05:00 2007-08-27T20:29:59-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14984#p14984 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
... 'normal code
PSET (X,Y)
PSET (U,V),0 'turns old image off
LET U=X
LET V=Y
...

That makes you pong ball move very quickly while using little memory.
MAKE SURE TO SET U AND V TO X AND Y AFTER PSET!
Good luck. That was my first program.

Statistics: Posted by Mentat — Mon Aug 27, 2007 8:29 pm


]]>
2007-08-27T14:43:24-05:00 2007-08-27T14:43:24-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14979#p14979 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:43 pm


]]>
2007-08-27T14:42:07-05:00 2007-08-27T14:42:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14978#p14978 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>

You can load bmp files in QB. All you need to know is how to load a file and understand the bmp file structure. But if you don't have the time for that then there are libraries you can use that will do it for you. DirectQB and FutureLib are good ones. You can find them, along with others, here.

Statistics: Posted by Joe — Mon Aug 27, 2007 2:42 pm


]]>
2007-08-27T14:36:00-05:00 2007-08-27T14:36:00-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14977#p14977 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>

So is it a good game? It's my first one, and I would really appreciate some pointers.

Oh, and how do you use .bmp files in your game? Is it possible?

Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:36 pm


]]>
2007-08-27T14:31:07-05:00 2007-08-27T14:31:07-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14976#p14976 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>

Statistics: Posted by Joe — Mon Aug 27, 2007 2:31 pm


]]>
2007-08-27T14:29:33-05:00 2007-08-27T14:29:33-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14975#p14975 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:29 pm


]]>
2007-08-27T14:27:15-05:00 2007-08-27T14:27:15-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14974#p14974 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
It turns out that this forum cuts off the code... Here, let me upload it to a site and link to it here...

Here, go download it and see if it works -

http://www.mediafire.com/?anaj1meo95y

Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:27 pm


]]>
2007-08-27T14:26:50-05:00 2007-08-27T14:26:50-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14973#p14973 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> Statistics: Posted by Joe — Mon Aug 27, 2007 2:26 pm


]]>
2007-08-27T14:20:18-05:00 2007-08-27T14:20:18-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14972#p14972 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
And how are you running the code? Did you paste it directly in the DOS window? Because that doesn't always work right. Try pasting it into Notepad and saving it as a .bas file.

Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:20 pm


]]>
2007-08-27T14:09:48-05:00 2007-08-27T14:09:48-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14971#p14971 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]> Statistics: Posted by Frosty480 — Mon Aug 27, 2007 2:09 pm


]]>
2007-08-27T14:12:40-05:00 2007-08-27T14:03:52-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=14970#p14970 <![CDATA[MY FIRST GAME!!!!!! PONG!!!!!!]]>
Windows XP Professional
Pentium M, 1.7ghz

It runs for the first second, but when the ball goes off the screen it crashes the program.

Also, what are the controls? All I can find in the code is a reference to one keypress. How can you play the game with only one key?

Statistics: Posted by Joe — Mon Aug 27, 2007 2:03 pm


]]>