|
|
This thread is locked; no one can reply to it.
|
1
2
|
| can you destroy a previously called void? |
|
ame gkkou
Member #14,251
April 2012
|
hi there im making this simple game with just basic functions like if statements and 2d arrays, so i called in a lot of voids for stage 1, i want to create stage 2 with different voids however they would overlap the previous voids, is there a way to destroy/clear/stop the previous voids? p.s. im super noob at this my teacher gave us this assignment wthout teaching us anything usefull. |
|
Itachihro
Member #12,001
May 2010
|
I - and I don't think I'm alone with this - have no idea what you just said. Can you please give a (short) code sample of what you're doing, and in pseudo code what you want to do? |
|
Stas B.
Member #9,615
March 2008
|
Voids? As in void blah() {}? |
|
jmasterx
Member #11,410
October 2009
|
If you mean: void* blah = malloc(sizeof(Something) * 4); This would allocate an array of 4 elements. If you call: free(blah); It will destroy all the elements. But really this is a wild guess on my part. Agui GUI API -> https://github.com/jmasterx/Agui |
|
ame gkkou
Member #14,251
April 2012
|
sorry about that, the codes is too long to post so i didnt post it all at the first place, anyway here's part of the codes, 1#include <allegro.h>
2
3//sets bitmap for objects
4BITMAP* box;
5BITMAP* deadpic;
6BITMAP* buffer;
7BITMAP* loader;
8BITMAP* brick;
9BITMAP* floor;
10BITMAP* door;
11BITMAP* character;
12BITMAP* wall;
13BITMAP* gg;
14BITMAP* win;
15BITMAP* menupic;
16
17
18 SAMPLE *sample;
19 SAMPLE *winsound;
20int panning = 128;
21 int pitch = 1000;
22 int volume = 128;
23int positiona;
24int positionb;
25
26
27
28
29
30
31
32
33//These will hold the player's position
34//instead of using pixels, we will use the position within the 2d array
35int x = 27;
36int y = 20;
37
38int tempX = 27;
39int tempY = 20;
40int a = 13;
41int b = 11;
42
43int tempA = 13;
44int tempB = 11;
45
46//This will hold the value of how many boxes are left outside of the holes.
47int boxes;
48
49//This will be our background, 1 = outer design, 2 = base wall, 3 = floor, 4 = hole //for editing eljean and cath
50int map[24][32] = {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, //1
51 {1,1,1,1,1,1,1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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0},
97 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
98 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
99 {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}};
100//stage2
101
102void setupGame(){
103
104 buffer = create_bitmap( 640, 480);
105 loader = create_bitmap( 640, 480);
106
107 box = load_bitmap( "mum3.bmp", NULL); //setup box bitmap
108 boxes = 1; //set up box array number
109 brick = load_bitmap ( "brick.bmp", NULL);//for bg
110 floor = load_bitmap ( "floor.bmp", NULL);//for maze floor
111 door = load_bitmap ( "door.bmp", NULL);//for door
112 character = load_bitmap ( "char2.bmp", NULL);//for char
113 wall = load_bitmap ( "wall.bmp", NULL);//for char
114 gg = load_bitmap ( "gg.bmp", NULL);//for char
115 win = load_bitmap ( "win.bmp", NULL);//for char
116 deadpic = load_bitmap ( "dead.bmp", NULL);//for char
117 menupic = load_bitmap ( "menu.bmp", NULL);
118
119 sample = load_sample("stage1.wav");
120
121 play_sample(sample, volume, panning, pitch, TRUE);
122
123 for (int i = 0; i <= 24; i++){
124
125 for( int t = 0; t <= 32; t++){
126
127
128 if( map[i][t] == 1) draw_sprite( buffer, brick, t * 20, i * 20);//warning
129 else if( map[i][t] == 2) draw_sprite( buffer, wall, t * 20, i * 20);
130 else if( map[i][t] == 3) rectfill( buffer, t * 20, i * 20, (t + 1) * 20, (i + 1) * 20, makecol( 7, 7, 7));
131 else if( map[i][t] == 4) draw_sprite( buffer, door, t * 20, i * 20);
132
133 }
134
135 }
136
137 for (int i = 0; i <= 24; i++){
138
139 for( int t = 0; t <= 32; t++){
140
141 if( objMap[i][t] == 100) draw_sprite( buffer, character, t * 20, i * 20);
142 else if( objMap[i][t] == 101) draw_sprite( buffer, box, t * 20, i * 20);
143
144 }
145
146 }
147
148 draw_sprite( screen, buffer, 0, 0);
149
150}
151
152void winstate() {
153
154 clear_to_color(buffer, makecol (0, 0, 0));
155 clear_bitmap(buffer);
156
157 draw_sprite( buffer, win, 0, 0);
158
159
160
161}
162
163 void dead() {
164
165 clear_to_color(buffer, makecol (0, 0, 0));
166 clear_bitmap(buffer);
so all i want is to "stop" or "destroy" the void setupGame() so that i can call a new setup game for stage 2 or restart the previous setupgame for stage1. |
|
Steve Terry
Member #1,989
March 2002
|
.... by that I believe all you need is an if statement. ___________________________________ |
|
jmasterx
Member #11,410
October 2009
|
If you want to 'stop' a function as you said you simply write 'return' void stop(bool someCondition) { doStuff(); if(someCondition) return; doMoreDtuff(); }
Agui GUI API -> https://github.com/jmasterx/Agui |
|
Stas B.
Member #9,615
March 2008
|
ame gkkou said: so all i want is to "stop" or "destroy" the void setupGame() so that i can call a new setup game for stage 2 or restart the previous setupgame for stage1. Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name. The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level. However, your code looks like a real mess and doesn't make much sense. Describe what you're trying to do so we could advise you a proper way to do it. |
|
Steve Terry
Member #1,989
March 2002
|
Technically with execp you can destroy the entire call stack and replace it with a new applicatoin. All you need is stage1.exe, stage2.exe, etc. ___________________________________ |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level. That might be easy, but it will scale poorly and is a bad way of doing things. There should only be one function that performs setup for the game itself and it should only ever be called once. If there is also setup required for each level, then a second function should be used that is written in such a way that the same function is called for every level of the game. This will deal with both cases of replaying the current level and starting the next one.
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: Stas B. said: That might be easy, but it will scale poorly and is a bad way of doing things. There should only be one function that performs setup for the game itself and it should only ever be called once. If there is also setup required for each level, then a second function should be used that is written in such a way that the same function is called for every level of the game. This will deal with both cases of replaying the current level and starting the next one. All I said is that if he needs to do level-specific setup for each level, he needs to write a different setup function for each level and call the appropriate one. I think it's pretty clear that he doesn't need to reload the graphics that don't change. |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: All I said is that if he needs to do level-specific setup for each level, he needs to write a different setup function for each level and call the appropriate one. That is still the wrong approach. IF there ends up being a twenty different levels, do you expect him to have twenty separate loading functions? And if the game gets extended to a hundred levels, write a hundred loading functions?
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: That is still the wrong approach. IF there ends up being a twenty different levels, do you expect him to have twenty separate loading functions? And if the game gets extended to a hundred levels, write a hundred loading functions?
If there ends up being twenty different levels, he can either learn file I\O and design a general map format, or write twenty different functions that do the LEVEL-SPECIFIC setup. Where does it say in my post "you should also repeat the non-level-specific code every time and under no circumstance put it in a function of its own like LennyLen said". Don't you have anything better to do than arguing for the sake of argument? |
|
Thomas Fjellstrom
Member #476
June 2000
|
Stas B. said: Don't you have anything better to do than arguing for the sake of argument? Pot meet kettle. -- |
|
bamccaig
Member #7,536
July 2006
|
Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
Stas B.
Member #9,615
March 2008
|
Thomas Fjellstrom said: Pot meet kettle.
Really? I think you're #1 around here when it comes to that, going as far as to show up suddenly in a thread and say something silly and irrelevant just to spite me, without offering any insight or valid points. bamccaig said: Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files. My point exactly. That's why I suggested that he just write separate functions to setup each level. And of course, he should do as Lenny says and put the non-level-specific setup code in its own function. I really don't see how these two things are mutually-exclusive and what he's trying to argue with me about. Anyway, enough spamming this thread. |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: Don't you have anything better to do than arguing for the sake of argument? The reason why I'm disagreeing with you is because you are advocating the case of using poor programming practices to a beginner. The only reason for ever writing specific code for each level of a game would be of the mechanics for each level were so vastly different that a universal loader would end up being larger than individual loaders, and such a case would be extremely rare. A sufficiently experienced programmer should be able to tell when this would actually be the case, but a beginner (such as the OP) should be encouraged to take the correct approach rather than the east approach until they have enough experience to determine for themselves what approach is best in a case by case need. I actually took care with my previous posts to not discuss how such a function should be implemented as it goes beyond the scope of this thread. Should the IP want to learn how to do it correctly they can start a new thread. For now it is simply enough that they are made aware that there is a better (though admittedly more initially complicated) way of doing this. bamccaig said: Since the OP is referring to functions as "voids" I think it might be a little early to learn how to load levels from files. Maybe so. However, a beginner is also not going to know the quality of the advice they have been given, which is why I wanted to make it known to them that the approach Stas B may be initially easier, but is ultimately the wrong way. Edit: post was typed from my phone, so please forgive typos.
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: The reason why I'm disagreeing with you is because you are advocating the case of using poor programming practices to a beginner. Have you actually bothered to read the OP at all? First of all, I'm not advocating poor programming practices. I'm trying to help the guy finish his task with whatever tools he's got at his disposal. Teachers don't give students exercises so they could figure out on their own what's the proper way to do things. They give exercises so the students could practice using whatever tools they've learned about so far. He didn't come here for you to teach him "proper programming practices". He's got a teacher for that. For example, if a teacher gives you a task of sorting a bunch of numbers so you could practice ifs and fors and you come back with an implementation of quicksort some wiseguy gave you on a forum, you have achieved nothing, even if quicksort is more proper than bubble sort. Second, there's a lot of things wrong with his code. Either show him how to really do it right, or show him the least evil way to complete the task given his current knowledge. There's no justification for your arbitrary choice of which faults are allowed to a beginner and which aren't. In short, the reason we're disagreeing is that you're trying to be a smartass. |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: There's no justification for your arbitrary choice of which faults are allowed to a beginner and which aren't. I haven't been arbitrary as I have said a single thing about any of his code. The only fault I have pointed out was yours. Quote: In short, the reason we're disagreeing is that you're trying to be a smartass. And you're taking things far too personally.
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: I haven't been arbitrary as I have said a single thing about any of his code. The only fault I have pointed out was yours. That's besides the point. If you were worried about teaching beginners proper programming practice, you would have given him some good advice. Instead, you seem far more focused on trying to invalidate my post. Quote: And you're taking things far too personally. I don't take anything personally. I know some people just like to be smart-asses. I will continue to defend what I have said until you properly address my arguments and prove me wrong. (Which is unlikely, seeing as you deliberately and consistently ignore the better ones.) |
|
bamccaig
Member #7,536
July 2006
|
LennyLen isn't necessarily wrong. Neither is Stas. B. Everybody chill the fuck out! I got this. Given that the OP is a student, it's likely that he isn't supposed to properly modularize his program yet. That said, given the level of proficiency demonstrated by the OP, I find it hard to believe that he'd be given such a demanding assignment anyway. Something is rotten in Denmark... It might be best for the class to band together and protest the assignment until they're taught enough to accomplish it. Of course, the OP could be one of those people that doesn't belong in a CS program, doesn't pay attention, doesn't read the assigned chapters from the textbook, or doesn't ask for help during class; and is now struggling to turn in an overdue assignment that he should've learned how to complete. There were many people like this in college. Many just didn't get it and expected the instructor to wave a magic wand and make them. No matter how much extra attention the instructors gave them they just didn't get it. I don't think it's something that can really be taught (obviously the language syntax and rules can be, but how to understand the pieces and assemble them into a program is more hard-wired I think). You either have it or you will struggle to do it (and therefore do a bad job and not enjoy it). At least in my experience. You'll note that there doesn't seem to be any sense of order in the formatting of the OP's code, which is an indication to me that this may be the case (I don't think there was ever a time that I wrote poorly formatted code, but maybe that's just part of my OCPD nature; I know that you'd lose marks if you handed in poorly formatted code in college ). If the OP truly isn't trying then the only thing we can responsibly do is troll him. Of course, sometimes instructors do jump ahead without realizing it... That can happen. It seems strange for any instructor to assign a game assignment at a beginner level so perhaps this is just a matter of the OP over-complicating his assignment. It takes quite a bit of practice and knowledge to build a game, and it would be silly to fail an assignment because you tried to far exceed the requirements. If this is the case then I would suggest doing only what is actually required first and then, with a separate copy, return to your "game" and continue trying to work it out as an extra-curricular. At least then you'll have something to hand in if you can't make the game work. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: I will continue to defend what I have said until you properly address my arguments and prove me wrong. (Which is unlikely, seeing as you deliberately and consistently ignore the better ones.) What arguments are you referring to? You've basically only said two things, one which I disagreed with and the second one, which is fix his code, I'm certainly not going to do as 1) I don't believe in doing people's homework for them and 2) trying to write and format good code on a phone is far too time consuming. If the O P asks specific questions about doing things, I'd gladly try to help. His question from this thread has already been answered however.
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: What arguments are you referring to? You've basically only said two things, one which I disagreed with and the second one, which is fix his code, I'm certainly not going to do as 1) I don't believe in doing people's homework for them and 2) trying to write and format good code on a phone is far too time consuming.
I'm getting tired of this. 1. Prove that I did something wrong in showing him one possible way to finish his task (which I think we can agree has more to do with basic programming syntax and constructs than with proper level loading) rather than making a futile attempt to teach him proper game programming, or just giving him some ambiguous and pointless piece of advice like yours. (Let's face it - you haven't been very helpful. I'm certainly not a beginner and even I'm not quite sure what you were talking about in your post.) 2. Prove that I tried to imply that my suggestion is the proper way to load a level. (My post actually implies that it's a simple but not necessarily correct solution and that the proper way to do it depends on the details and purpose of the task) You can prove neither, so quit it. |
|
LennyLen
Member #5,313
December 2004
|
Stas B. said: I'm getting tired of this. I'm certainly not, and since I'm now sitting at a keyboard, why don't we begin again.? There is no "proof" for anything, at least not that you will ever accept, but here are some more rebuttals for you. Quote: 1. Prove that I did something wrong in showing him one possible way to finish his task All you told him was that it was an easy way. You made no attempt whatsoever to educate him as to why while it might be an easy solution it is not a good one. <i>That<i> is something you did wrong. Quote: Let's face it - you haven't been very helpful. I'm certainly not a beginner and even I'm not quite sure what you were talking about in your post. As I already said (and for someone who has already questioned whether or not I rwad the original post, you seem to be showing a remarkable lack of evidence of reading yourself), I deliberately didn't go into detail, as such detail is beyond the scope of the original query. If ame gkkou would like details of how to write such a function, all (s)he need do is ask in another thread. I've written many a level loading function, so would be happy to make suggestions about how to do so. Also, I wasn't trying to be useful to ame gkkou, as you had already answered his question. My post was entirely directed at you, not him. Quote: Prove that I tried to imply that my suggestion is the proper way to load a level. Why would I want to prove something I never claimed you did? Again, please show some reading comprehension if you want to start making such statements. Quote: (My post actually implies that it's a simple but not necessarily correct solution and that the proper way to do it depends on the details and purpose of the task) It does? Where? In case you never actually read your own post, I'll quote it again for you: "Read my previous post. It's not a "void". It's called a function. You can't destroy it, change it or reuse its name. The easiest thing you can do is to make void setupGame2(), void setupGame3() etc. and call the appropriate one for each level. However, your code looks like a real mess and doesn't make much sense. Describe what you're trying to do so we could advise you a proper way to do it." I emphasized one line as it's the only part that really matters. Everything before that is quite correct and has nothing to do with what we are now discussing. Likewise, your last statements are also quite correct, and again has nothing to do with what we are now discussing. So, since only the bold sentence is what we are currently talking about, could you please elucidate for us exactly how that implies that it's not necessarily correct? Perhaps you assumed that people would infer that from what you have written, but you in no way whatsoever implied anything of the sort. p.s. On reflection, if the very last sentence of that post is referring to loading levels, then I'll grant that you were then attempting to imply that what you had suggested was not the proper way. However, that sentence is actually following on from another sentence entirely, it appears you are just trying to tell him that his messy code is not the proper way. Quote: You can prove neither, so quit it. I choose when I quit things, sorry. And I need give no proof, as I'm countering what you originally said. The burden of proof is actually therefore on you. Quote: Your arguments are invalid. So is that claim if you will not justify why you believe it to be so.
|
|
Stas B.
Member #9,615
March 2008
|
LennyLen said: All you told him was that it was an easy way. You made no attempt whatsoever to educate him as to why while it might be an easy solution it is not a good one. <i>That<i> is something you did wrong. I made no attempt to educate him as to why it may not be a good solution because for all I know, it may be a good solution. It depends entirely on the context, as I have already explained. I had no reason to believe that anything more complex was appropriate in this case, however, I did ask him to elaborate on the task so we could give more appropriate advice. Quote: On reflection, if the very last sentence of that post is referring to loading levels, then I'll grant that you were then attempting to imply that what you had suggested was not the proper way. However, that sentence is actually following on from another sentence entirely, it appears you are just trying to tell him that his messy code is not the proper way. It does imply that his code is not the proper way (as it was supposed to), but first and foremost, it implies that the proper way depends on what the task is all about. (Which in turn implies that I may suggest something different when I have more details.) It should be clear that this is the primary meaning because the second post is basically a paraphrase of the first one, where I say exactly the same things before even seeing his code. Quote: I choose when I quit things, sorry. And I need give no proof, as I'm countering what you originally said. The burden of proof is actually therefore on you.
The burden of proof is on you because I'm not the one making the claim. |
|
|
1
2
|