dopeheaddude wrote:
Menu - Lbl is alright, though?


as long as it isn't within any if-then or loop condition, its fine.

making your own is often not worth the work (and space) unless you need something stylish or specialized
If you care about flexibility and graphical appeal, make your own. If you want youre program to be small, use the default.
That is it exactly...

If you are making an ordinary game, use the ordinary menu. Extrodianry games call for extrordinary menus! Razz Very Happy
lol, very true. Most of my little BASIC arcadeish games use Menu(, while WDI, CS1, and ut2 all use custom menus.
I think the only game that uses the menu( command is the all text Age of Darkness...
I've of course done some mods of Menu( like making the top textbar solid across by using padding spaces and such.
I generally only use menu()s for text-intensive games and custom-made ones for graphics-intensive games.
btw, does anyone know if there's a way to make stacked menus in basic? Like onthe program menu you can either run, edit, or create new by moving the cursor across the top. I haven't found a way to do this yet, so I was just wondering.
Of course you can. Output( + loops.
Confused Code please? I think I get what you're saying but I'm not sure.
It would be kinda long to type, but here's some pseudocode:


Code:
DelVar MDelvar NRepeat K=106
ClrHome
Output(1,1+4M,sub("PRGMEDITNEW ",1+4M,4
Output(2+N,1,">
If not(M
Then
;put the menu-specific definitions here
Output(
End
If M=1
Then
;put the menu-specific definitions here
Output(
End
If M=2
Then
;put the menu-specific definitions here
Output(
End
Repeat K:getkey-->K
End
M-(K=24)(M=/=0)+(K=26)(M=/=2)-->M
N-(K=25)(N=/=0)+(K=34)(N=/=7)-->N
(K=105)106-->K
End
I see now. I'll look at that.
Actually, I kinda like that, I might use it myself. Smile
Adding on items to the game... came accross an idea to Goto without any loops.

Is Goto fine if it's not in a loop?
Yes. As long as a Goto isn't inside a For, IfThen, Whiile, or Repeat loop, it's ok. Although in general, avoid Lbl and Goto if possible.
Well, it ended up in an If loop... woops!
Good thing I checked before putting it in...


BTW, I changed the list attributes in ZGA to variables, and it does work faster again! Now I know what was making my guy move so slow! Very Happy
lol, nice. It's ok if it's an If, just not an If:Then:....[else]...End
I actually never use Else...

Is there any actual need for it?

My style:

If J=1:Then
T+1->T
End
Output(1,1,"J is not 1"


No need for an Else between End and Output...
Agh! Remove the Then/End! You don't need it for only one command being set conditional.
Was hypothetical, mate...
I know...


Anyway...

I'm fighting rabbits and beavers and at a random point a Memory error comes up!
I start the game again, fight a bit, it comes up after a bit!

A) What???
B) Why???
C) How can I fix it???
A) No more RAM!
B) The loop stack is ovreflowing. You still have a jump out of a loop or conditional
C) Run it through SourceCoder and post the code again.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
» View previous topic :: View next topic  
Page 3 of 10
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement