Computer Science Canada [Help] New drawings, images created are not appearing !! |
Author: | razrdude [ Sun Oct 29, 2006 4:41 pm ] | ||
Post subject: | [Help] New drawings, images created are not appearing !! | ||
Hey Im making a shooter game for comp engineering class and i need some help. Well heres the code so far.
Well Now when I try to draw more objects, or images, which the scope shooter shoots they do not appear. This is to be a game, where spaceships appear and the user has to shoot moving spaceships. So now I want to draw the spaceships and then get them moving around. All help is appreciated. Btw, can you edit posts? Otherwise I would have added in other forum |
Author: | Ultrahex [ Sun Oct 29, 2006 5:08 pm ] |
Post subject: | |
no you cant edit posts in the help forums due to users after they having their problem completed they are removing their fixes to their problems along with changing their thread so searching for help in the forum was useless. you could of actually just added to the bottom of your last thread i would have got around to it just now, but thats too late. Im wondering if you are fluent in functions/procedures?, if so you could actually make a procedure to draw your crosshair to the graphic buffer then do the view update in the end of your main loop in order to clean up code. The reason other things are probably not showing up is... 1. Your Doing the View.Update before all the drawing is done, and then clearing screen after drawing (as in you put new draw commands between your view update and cls) ... actually thats the only one i could think of ![]() An Example Code where its not drawing everything would help BTW. |
Author: | razrdude [ Sun Oct 29, 2006 5:33 pm ] | ||
Post subject: | |||
hmm i tried what you said, and i got another line in there, now i guess I could try adding my spaceships and then get them moving. man why does turing have to be so hard. Anyone got any suggestions on where to go? Also as I have buttons to get to the game,
but when I put my drawing part in, I cannot have a procedure inside another procedure, so that part messed up. hope u understand what i mean. |
Author: | Ultrahex [ Sun Oct 29, 2006 6:17 pm ] | ||
Post subject: | |||
you cant declare a procedure inside a procedure, but you can run a procedure inside a procedure. for example:
i think you may be confused in some of the fundamentals of programming |
Author: | razrdude [ Sun Oct 29, 2006 6:27 pm ] | ||
Post subject: | |||
I think I skipped on most of the fundamentals, when my teacher said , GUI or Game due on Monday. We just started Turing about early to mid last week and have this thing due on Monday. I dont want anyones pity but help is appreciated. I understand what you wrote there, but say I want my instructions to show, and then my program to run, how would I do that? For example
after that i have the procedure for my drawings, but to get to that part I need to use buttons and buttons access a procedure... |
Author: | Ultrahex [ Sun Oct 29, 2006 6:48 pm ] | ||
Post subject: | |||
thats basically how it is done, but the instruct procedure is ran by the button instead of by the command in your case, which Monday BTW, as in tomorrow and when did he assign the assignment? |
Author: | razrdude [ Sun Oct 29, 2006 7:06 pm ] |
Post subject: | |
yes Monday as In tomorrow, He assigned it last monday, but we had 6 mini question assignments due, so did those till like thurs, and started on friday. the teacher hasn't taught anything about turing. Also what you wrote, ill try that but im losing hope. where is says proc instructions put "Instructions Here...." %Probably want to put delay here runGame () wat u mean by rungame? isint that the procedure of the game, what would go in the brackets. If you have free time and would like to help me, can we talk on msn? Pm me and ill add you. Btw im in Canada, EST |
Author: | razrdude [ Sun Oct 29, 2006 7:31 pm ] | ||
Post subject: | |||
ok so i gave up on making a spaceship and now Just used a pic. I used
However, when I press Run, the pic shows in the right position and everything, but after a couple of seconds, it stops and gives me the error "Cannot Allocate Item. Out of id numbers (max 1000)." and it highlights the line with spaceship := Pic.FileNew ("shipf.bmp") any explanations? |
Author: | [Gandalf] [ Sun Oct 29, 2006 8:37 pm ] |
Post subject: | |
Is that code inside a loop? It shouldn't be. The error just means that you've declared the maximum amount of pictures that Turing can handle. If the problem isn't that it's in a loop, post the rest of the code. |
Author: | razrdude [ Sun Oct 29, 2006 8:39 pm ] | ||
Post subject: | |||
this is the rest of the code, and no its not inside the loop, this is the only pic im using...
Thanks for all help |
Author: | Ultrahex [ Sun Oct 29, 2006 8:52 pm ] | ||
Post subject: | |||
actually that is in the loop cause the procedure is in the loop!
|
Author: | razrdude [ Sun Oct 29, 2006 8:58 pm ] |
Post subject: | |
dude i love you, thanks, if all of this works, imma donate all my bits to both of you. ok now i gotta make the spaceships move and have the the scope shoot them. ![]() all nighter .. |
Author: | Ultrahex [ Sun Oct 29, 2006 9:25 pm ] |
Post subject: | |
ya lol, it seems that way lol, that sucks for you man, teacher is BS, you should just contact me on IRC, if you do that stuff we have a channel and stuff. Probably could of helped you a lot faster. |
Author: | razrdude [ Sun Oct 29, 2006 9:29 pm ] |
Post subject: | |
i used to mIRC for sum satellite stuff, but not anymore, hmm now im having issues with getting the spaceship to move and follow a path. yet again im stuck, and then after i get that working ill be stuck in making it recognize that the mouse click the ship. help me pls? or lead me in the right direction. |
Author: | Ultrahex [ Sun Oct 29, 2006 9:54 pm ] | ||
Post subject: | |||
Ummm ya thats quite the problem you gut there, im not sure how i can help you. the mouse click on the ship should be that hard its just point inside a square collision. what you gotta do is hand in something like this ...
oh and if you didn't understand, i mean incomplete lol ![]() well you can go through that code i doubt you will understand but who knows you might. |
Author: | razrdude [ Sun Oct 29, 2006 10:03 pm ] |
Post subject: | |
Ultrahex wrote: oh and if you didn't understand, i mean incomplete lol ![]() well you can go through that code i doubt you will understand but who knows you might. good guess there im like ![]() well thanks about the square collision, i can search that and try to figure it out. and as for moving them around and creating more of them, i havent found a thing. btw im sick and prolly not goin to school tomm. any help is still appreciated. btw ur code dint do anything, except show a green thing and a score point thing. |
Author: | Clayton [ Sun Oct 29, 2006 10:15 pm ] |
Post subject: | |
heh, use the W,A,S,D keys to control it and use the spacebar to shoot ![]() |
Author: | razrdude [ Sun Oct 29, 2006 10:38 pm ] |
Post subject: | |
yet again my stupidity kicks in. anyway back to my program. makin the ships spawn and movable now. |