Computer Science Canada Help get my menu to work better... (more details inside) |
Author: | uberwalla [ Tue Aug 22, 2006 5:56 pm ] |
Post subject: | Help get my menu to work better... (more details inside) |
ok so i have the pong games im working on and i have a menu i created to go through the game. in the controls sections i have a back type thing that i can't get to work. if possible could someone try to configure it so it works and tell me so i can imput it into my source code. o and also after the credits i want it to be able to just go back to the menu if thats at all possible. thx in advance. |
Author: | NikG [ Wed Aug 23, 2006 3:00 pm ] |
Post subject: | |
why did you create another topic? you could have just added to your old one. |
Author: | uberwalla [ Wed Aug 23, 2006 10:01 pm ] |
Post subject: | reply |
because this is a newer version... And its a totally different problem. |
Author: | Cervantes [ Wed Aug 23, 2006 10:45 pm ] |
Post subject: | |
Okay, enough of these threads. I feel it necessary to say that I have no desire to offer help, and I'm one who usually offers help in threads that haven't received it yet. Why have I no desire to help? Because you make it too difficult. You post your entire code and give a vague description of what you want done. Instead, you should post only the relevant portion of your code and give a detailed and, preferrably, easy to read description of the problem and why you think it is occuring or what you think you can do to fix it. |
Author: | NikG [ Thu Aug 24, 2006 2:09 am ] |
Post subject: | Re: reply |
uberwalla wrote: because this is a newer version... And its a totally different problem. You know... it IS possible to post 2 files (such as your newer version) in that first post.
And it's not a different problem, you mentioned the same thing in that first post too! |
Author: | uberwalla [ Thu Aug 24, 2006 10:17 am ] |
Post subject: | reply |
Cervantes: im sorry but im not very good when it comes to explaining it. and i posted the whole code because i dont know if i did something wrong somewhere else that caused the problem. nikg : it isnt the same problem... from the last post i had trouble because the menu was going into and f****** up the game itself. what i would like some help on now... is that in the menu i have the section entitled "controls" when i go in i have it that there is a back button sort of thing. I would like it so i can get the back button to work when i hit enter. Eg.) I start pong and dont know controls... i go to the controls menu and i look at them then hit enter to get back to the main menu. Instead of having to close the whole app. and restarting it ![]() So plz cervantes, nikg or anyone plz help me with this. Im sorry for my bad start coming to this forum. I promise to slow down on my threads, and to explain more. |
Author: | Clayton [ Thu Aug 24, 2006 7:30 pm ] |
Post subject: | |
look into forwarding procedures, this allows you to call a procedure from another, even if the called procedure follows the procedure your in (by line number), this way you can have a "controls" proc to display your contol menu, then if enter is pressed go back to the "menu" proc beneath it have you tried searching before? your question has been asked before, try searching keywords and see what you can come up with before rushing to hit the new topic button |
Author: | uberwalla [ Thu Aug 24, 2006 10:02 pm ] |
Post subject: | reply |
Ok TY. and sorry again for not searching. |
Author: | uberwalla [ Thu Aug 24, 2006 10:33 pm ] |
Post subject: | not working. |
ok so i tried forwarding my procedures but it says exactly like it always says, "procedures can only be declared at the program, module, or monitor level" i dont understand. |
Author: | uberwalla [ Thu Aug 24, 2006 10:47 pm ] | ||
Post subject: | reply | ||
ok this is what i have. i can't seem to understand the forwarding. the code is kinda long sorry, but its as short as i could make it where i can pinpoint the problem.
|
Author: | richcash [ Thu Aug 24, 2006 11:11 pm ] |
Post subject: | |
1. Don't use a process for your controls (processes are better to be avoided!). Turn your controls process into a procedure (and don't fork it, just call it normally, obviously!) 2. Take the exit statement out of your pong procedure (right under where you previously forked controls). 3. Add a cls after your delay (150) in your controls procedure (line 58). That should work! |
Author: | uberwalla [ Thu Aug 24, 2006 11:39 pm ] |
Post subject: | reply |
WOW! it works ![]() thx man. sorry everyone for my annoyance ![]() |
Author: | uberwalla [ Thu Aug 24, 2006 11:51 pm ] | ||
Post subject: | reply | ||
nvm sorry guys im back again. richcash ur idea worked very well, ty. But when i added it to the rest of my program when i hit enter for the back button it goes back to the menu and its a white screen with dots that move ![]() its really long but ill post it so u can possibly help me out with anything else i may have done wrong so i can learn more ![]()
i put the "%" in front of the pics and the sounds so if u want to run it to see what i mean. sorry again for the long code |
Author: | Ultrahex [ Sat Aug 26, 2006 10:42 pm ] |
Post subject: | |
Ok There appears to be something COMPLETELY wrong with the last thing you posted above ^ the sourcecode i tried to run it but when i hit back the screen goes complete white with 3 dots (black) you probably forgot to refill in the back black or something along those lines. i have also wondered about a few things like why you have 4 winID's im not sure if you are using them but in reality i think every single turing program only needs one (except the odd one like that 3D model editor i believe made back [Was That in Turing?] well anyhow) ill update another post like this one in a little bit im tired now so i was just putting feedback in at the moment. Peace, Alex |
Author: | Ultrahex [ Sun Aug 27, 2006 1:14 am ] | ||
Post subject: | |||
Ok, here is your program AGAIN
There is Still Some Errors To Be Worked Out, and All That... But Overall I Rebuilt a lot, i would recommend going through the last 150 lines of the code that was rebuilt with a lot of your procedures tooken out, also it goes back to menu after losing, winning and only 1 winID There is probably a lot of variables not used so you can remove those also, but if you need more help just post a reply Need Info on how i did something ask also! There is a lot you still need to learn about programming uberwalla i hope this might put you on the right path, note how i did things and why i did them that way, i commented every so often Any Other Problems with the program you want to work on and cannot figure out yourself please post a reply! in this thread Peace, Alex |
Author: | Clayton [ Sun Aug 27, 2006 12:13 pm ] |
Post subject: | |
Ultrahex theres still problems with that code, the main one being that you have 4 processes in there, this game (program) does not require a single process, have you read the article on Why Processes are Evil? Both of you take a good look at that topic and try to get away from processes except for special circumstances (where multi-threading is absolutely necessary, ie. a chat program) |
Author: | Ultrahex [ Sun Aug 27, 2006 1:20 pm ] |
Post subject: | |
SuperFreak82, yes i know processes are bad and all that stuff i never use them except in rare circumstances, i would normally never use them i just rather not rewrite his code! im not writing the game for him remeber i was just showing the proper way to do the menu, and i just integrated his other code properly instead of the way that he did it. You really should remeber i was just helping with the menu not the entire program (or at least i wasn't trying to). (BTW, just to note superfreak82 i was the person that helped you with the point click routine game giving you examples and fixing the flexible array removal of an item a differnt way) He asked for help on the menu, that is what i gave him; i was not giving him help on removing the processes, and by that point if i did that i may as well rewrote his game and sent it to him, and by that point i would be the one who wrote the code of the game and not him. |
Author: | uberwalla [ Sun Aug 27, 2006 1:46 pm ] |
Post subject: | reply |
OMG ty very much. thats exactly what i wanted the menu to do... go back after credits and controls. and ty very much for the other things u changed i find it runs much smoother. |
Author: | Clayton [ Sun Aug 27, 2006 3:13 pm ] |
Post subject: | |
Ultrahex wrote: BTW, just to note superfreak82 i was the person that helped you with the point click routine game giving you examples and fixing the flexible array removal of an item a differnt way) your point? im very thankful for that, but that has nothing to do with this right now, i was just pointing out that there was no need for processes (it was half pointing at uberwalla too) in this case |