Search found 5 matches

by RexRanRum
Tue May 04, 2010 8:29 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Please help me!
Replies: 3
Views: 8743

GETtin'

Well, you can start from zero for arrays (like a normal programming language), but you have to jump through an additional hoop to do so. OPTION BASE 0 ' sets all arrays in this program to have an implicit 0 starting point instead of 1 OR DIM head(0 TO 19, 0 TO 19) ' explicity define a lower bound on...
by RexRanRum
Wed Jul 09, 2008 5:19 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Wrestling game
Replies: 6
Views: 8701

Swappin' Variables

Swapping over variables from a sub routine? You mean parameter passing? Just DIMension some SHARED variables. If ever function is just flingin' around the same data, why not? Making a TYPE for the wrestlers (the t* and o* parameters) might also help. Less strings would always help. You can always en...
by RexRanRum
Tue Jul 08, 2008 9:54 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Wrestling game
Replies: 6
Views: 8701

More Sport, Less Entertainment, please!

I'm a rasslin' fan here, and I gotta say, I didn't like a lot of choices you made with your game. It seemed more like a WWE sim than a wrestling sim, and there's a big difference between the two. I know you put a lot of work into it with all the options and situations you coded, but the actual fight...
by RexRanRum
Thu May 08, 2008 4:39 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Snake game help
Replies: 14
Views: 46138

Tail End

To erase the tail, simply redraw the background over it before you pop off the end/replace the furthest segment with the new head position. It really depends on how you are going to code the snake, but no matter what, you'll always store the snake segments in an array (or arrays), and erasing will a...
by RexRanRum
Wed May 07, 2008 9:06 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Snake game help
Replies: 14
Views: 46138

Snakin'

The only way that I can think to have a maximum length would be to create an array of every location occupied by the snake. As it gets longer, the array would shift. Empty elements would be replaced by active ones, and when the maximum length was reached, the location would simply disappear. This me...