Computer Science Canada Most Complex Program? |
Author: | Imm0rtal [ Mon Mar 13, 2006 9:43 pm ] |
Post subject: | Most Complex Program? |
I currently have a Zelda Game.. Features include: -Sprite that switches directions and has more then one animation for walking (3) -Allows you to change area's with custom walls (Places you cant walk over) for each location. -Has a menu you can bring down which shows all items you have collected as well as allowing selection of items -Has chests in certain areas that can be opened and remember if they are opened/shut when you renter a previous area. I was just curious how far some of you have taken your games in comparison to mine. Gone farther? Curious how to do the above? I read somewhere that Turing wasn't recommended for making games which I can understand due to the large size and slowness of code execution but I think that honestly anything is possible as long as your game needs no Z coordinate. Not a bragging post just really damn curious what you other guys have been up to as far as "Revoloutionary Games made in a rather simple language" (Say what kind of game and some cool features you haven't seen others do that might seem difficult in turing) |
Author: | cool dude [ Mon Mar 13, 2006 11:12 pm ] |
Post subject: | |
shouldn't this be in the off topic or general discussion forums? anyhow i've see really amazing games in turing which proves that turing is capable of making games although much harder to make 3D games unless your "catalyst" lol. i'd like to see your game so far so post the code and we'll give u suggestions for improvement |
Author: | Andy [ Mon Mar 13, 2006 11:18 pm ] |
Post subject: | |
Evasive Maneuvers |
Author: | Cervantes [ Mon Mar 13, 2006 11:33 pm ] |
Post subject: | |
I was going to make Warcraft II, but then I installed linux. Imm0rtal wrote: I read somewhere that Turing wasn't recommended for making games which I can understand due to the large size and slowness of code execution but I think that honestly anything is possible as long as your game needs no Z coordinate.
Personally, I think the slowness and the lack of 3D support are not the important reasons for this statement. I think the biggest reason that Turing is an awful choice for big games is its lack of OOP capability, with particular regard to inheritance and polymorphism. Aggregate data structures - classes/objects - are a must for any large program, and Turing does not handle them well at all. |
Author: | [Gandalf] [ Tue Mar 14, 2006 1:27 am ] |
Post subject: | |
Chess: This is really, the only thing I am still working on in Turing, whenever I have some spare time with nothing else to do. It's actually quite hard to implement the whole setup, let alone the AI, as well as some of the other features I am planning. I'll probably post it here once I get around to it (probably in months yet to come). Some other graphical games I have made: Target Practice Word Typing Snake Asteroids Ehm... can't remember any more right now, but there's tons... |
Author: | Imm0rtal [ Tue Mar 14, 2006 1:39 am ] |
Post subject: | |
Chess would be alot more intensive then a zelda game.. mostly because of AI. If you accomplish that project I shall bow before you. I would post my game but with all the pictures its about 9megs even Zipped/Rarred.. I might borrow some web space when I have a decent amount done.. So far I just made the structure of the game so I could easily add areas/items/monsters without pulling my hairs out. (I have it down to copy and paste + Coding Wall coordinates + Randomizing Monsters) again.. its nowhere near to being a game and I only work on it in my spare time seeing as I finished my turing class a year ago.. Also: Turings slow execution is a HUGE factor to take into consideration when making an RPG.. C++ is able to execute thousands of lines of code instantly.. I feel a pause after 500.. My game is constantly within a loop of a loop of a loop at LEAST. Drawing pictures to the screen is sometimes slower then I would like depending where I add it. While the things you mentioned are important.. they do have simple if not stupid/repetitive work arounds. Also Anyone who makes a Truely 3D game with turing is either The owner of Holtsoft or has ALOT of time on their hands. (Just Kidding) |
Author: | Cervantes [ Tue Mar 14, 2006 9:06 am ] |
Post subject: | |
Imm0rtal wrote: Also: Turings slow execution is a HUGE factor to take into consideration when making an RPG.. C++ is able to execute thousands of lines of code instantly.. I feel a pause after 500.. My game is constantly within a loop of a loop of a loop at LEAST. Drawing pictures to the screen is sometimes slower then I would like depending where I add it. While the things you mentioned are important.. they do have simple if not stupid/repetitive work arounds. Also Anyone who makes a Truely 3D game with turing is either The owner of Holtsoft or has ALOT of time on their hands. (Just Kidding)
A loop within a loop within a loo, at least? Sure, Turing might be noticeably slow on that, but is it really Turing's fault? Also, a lot of the slowness you're experiencing might be because of drawing pictures (picMerge). Apparently the new version of Turing (4.1) speeds this up a lot. Yes, there are often workarounds to the problems of Turing's OO approach, but how do we work around them? Often, it's Imm0rtal wrote: (I have it down to copy and paste + Coding Wall coordinates + Randomizing Monsters)
Copy and paste. This breaks one of the most important rules of programming: DRY - Don't Repeat Yourself. You shouldn't have to. There's no logical reason why you should have to type out the same thing more than once. Anyways, perhaps the reason I have so much trouble with Turing's OO approach is because I've spent time with Ruby, which is incredible for OOP (and other things). In all fairness, I remember when I was first learning classes in Turing, I thought they were amazing. |
Author: | tupac [ Tue Mar 14, 2006 9:28 am ] |
Post subject: | |
a buddy of mine needed a quick year end program... cuz he cudnt hame one himself... so i made it for him. it was an overhead scroller... im not sure wat these games are called, but it looked like this: you are a plane, and you can move all over the screen, and the background is land and water, and it looks as if you are moving foreward. when a bad plane comes at you, you gotta shoot it. so yea, i made that. And for my last yr's year end project (gr.10), i made a "street fighter" game. |
Author: | Albrecd [ Tue Mar 14, 2006 11:31 am ] |
Post subject: | |
Quote: I think that honestly anything is possible as long as your game needs no Z coordinate.
I guess nobody told this guy that you cant use the z coordinate in Turing. http://www.compsci.ca/v2/viewtopic.php?t=1354&highlight=ultimate+mario |
Author: | Imm0rtal [ Tue Mar 14, 2006 11:55 am ] |
Post subject: | |
Albrecd wrote: Quote: I think that honestly anything is possible as long as your game needs no Z coordinate.
I guess nobody told this guy that you cant use the z coordinate in Turing. http://www.compsci.ca/v2/viewtopic.php?t=1354&highlight=ultimate+mario I think you should read what I said more closely.. Then you will see we are in full agreement my friend. |
Author: | md [ Tue Mar 14, 2006 5:51 pm ] |
Post subject: | |
I think you should both think about what your saying and realize that graphics is not tied to your language of choice at all. I'm willing to bet I could implement a rudamentary 3D engine in turing without any problems at all. Then I'd be able to use 3D coordonates. **Note: Z is not always depth; it depends greatly on the system you are using. |
Author: | Imm0rtal [ Tue Mar 14, 2006 10:55 pm ] |
Post subject: | |
Cornflake wrote: I think you should both think about what your saying and realize that graphics is not tied to your language of choice at all. I'm willing to bet I could implement a rudamentary 3D engine in turing without any problems at all. Then I'd be able to use 3D coordonates.
**Note: Z is not always depth; it depends greatly on the system you are using. Unfortunatly Turing isn't Technically a language so this does not apply to it. Its only a translation into C++. If you wish to prove me wrong you can certainly go develope a enviroment that supports implementing a Z coordinate using turing commands. However going Off-Topic on this thread is not the way to make such a thing happen. Thanks. |
Author: | TokenHerbz [ Tue Mar 14, 2006 11:44 pm ] |
Post subject: | |
Arg, Astroids, thats a game which has cause me the greatest deal of fustration and stress. Its a game which requires you to have a vast understanding in trig... Which in my case is low since i have forgotten everything since i left school So.. Ima make something easier! my current game i made was: Semi-graphicial RPG (pretty sweet, but small untill i make it longer) pong (really basic easy game) TicTacToe (also easy) im not going to list the MANY ones which crapped out on me, and didn't work, or the ones i never finished, or the testing programs, but im gonna say 90% of the things i make are to learn the Turing language, and are completely useless. |
Author: | Martin [ Wed Mar 15, 2006 12:39 am ] | ||
Post subject: | |||
Imm0rtal wrote: Unfortunatly Turing isn't Technically a language so this does not apply to it. Its only a translation into C++. If you wish to prove me wrong you can certainly go develope a enviroment that supports implementing a Z coordinate using turing commands.
Turing is most definitely a language. The only thing that gets run by a computer is machine code. Everything else has to get translated to that. C++ gets converted to assembly, which then gets converted to machine code, and there are probably some more steps in there. Whether or not it gets converted to something else is irrelevant. And syntactically, there's no problem creating a 3d engine in Turing - in fact, a number of people have already done so. The issue that they run into is not that they don't have the commands, but that drawing with Turing is too slow to do anything incredibly complex. You're not going to be able to remake Doom 3, but a couple hundred polygons won't be a problem. "Z coordinates" aren't this magical data structure that all of a sudden makes life easy. A z coordinate is just another number. Instead of storing X and Y, you're storing X, Y and Z. You could have as many coordinates as you want. Here's some code.
Done. |
Author: | Imm0rtal [ Wed Mar 15, 2006 11:12 am ] | ||
Post subject: | |||
Martin wrote: Imm0rtal wrote: Unfortunatly Turing isn't Technically a language so this does not apply to it. Its only a translation into C++. If you wish to prove me wrong you can certainly go develope a enviroment that supports implementing a Z coordinate using turing commands.
Turing is most definitely a language. The only thing that gets run by a computer is machine code. Everything else has to get translated to that. C++ gets converted to assembly, which then gets converted to machine code, and there are probably some more steps in there. Whether or not it gets converted to something else is irrelevant. And syntactically, there's no problem creating a 3d engine in Turing - in fact, a number of people have already done so. The issue that they run into is not that they don't have the commands, but that drawing with Turing is too slow to do anything incredibly complex. You're not going to be able to remake Doom 3, but a couple hundred polygons won't be a problem. "Z coordinates" aren't this magical data structure that all of a sudden makes life easy. A z coordinate is just another number. Instead of storing X and Y, you're storing X, Y and Z. You could have as many coordinates as you want. Here's some code.
Done. Thank you for your off-topic post. You did miss interpret my post. A z- coordinate is what you just explained and just because something is possible does not make it plausible. To answer your other question.. Turing "code" is translated into a C++ run enviroment which means.. The code is read using C++ and then all the "functions" are translated and printed to the screen. You do not get to choose what libraries are used as that has already been determind (Which is my reason for saying the z- coordinate is the bane of turing). You are bound by whatever functions the software allows. Think of it like a software program where you write "black screen" and the program makes the screen black. Does that mean it is a new founded language? or just software taking what you type and performing an action. So I guess Turing could be considered a language.. it does eventually get translated into binary.. as does everything you see on your computer. I tend to argue that technically Turing is C++ since that is the last step before it becomes Assembly. Back on Topic ::: TokenHerbz wrote: Arg, Astroids, thats a game which has cause me the greatest deal of fustration and stress.
What was the biggest problematic thing for this game? (Just Curious) My Guess: Figuring out when your bullet or laser hit the baddies.. |
Author: | Bored [ Wed Mar 15, 2006 11:42 am ] |
Post subject: | |
I currently have a few Turing projects that i am working on and all are pretty complex and have the basic set up done. But i'll start off with my two best complete projects. Space Combat - a top down ufo shooter that has 5 weapons, i beleive 3 gametypes, a dumb but strong ai, and a simple elf built gui Arcade Racer - a top town racing game that features 3 vehicles, multiple laps, and support for two players. The game uses physics that allow for power sliding, drifting, etc. Both of these projects have finished versions but i am also working on new versions of each. Now for the incomplete porjects (large list) Bored Shooter - A top down shooter that I have barely the basic engine for and has a very complex what dot colour collision Worming - A worms game that I am creating and currently have the engine set up for. The engine is simple to follow as long as you understand Newtons 3 laws. Bored Net - A network module I am working on that will allow for EASIER programming of network games in turing. 3B - An incomplete 3D engine I started a while ago. Probably never gonna be worked on again. But hey it was actually starting to come along, sorta. |
Author: | Imm0rtal [ Wed Mar 15, 2006 12:08 pm ] |
Post subject: | |
Bored wrote: I currently have a few Turing projects that i am working on and all are pretty complex and have the basic set up done. But i'll start off with my two best complete projects.
Space Combat - a top down ufo shooter that has 5 weapons, i beleive 3 gametypes, a dumb but strong ai, and a simple elf built gui Arcade Racer - a top town racing game that features 3 vehicles, multiple laps, and support for two players. The game uses physics that allow for power sliding, drifting, etc. Both of these projects have finished versions but i am also working on new versions of each. Now for the incomplete porjects (large list) Bored Shooter - A top down shooter that I have barely the basic engine for and has a very complex what dot colour collision Worming - A worms game that I am creating and currently have the engine set up for. The engine is simple to follow as long as you understand Newtons 3 laws. Bored Net - A network module I am working on that will allow for EASIER programming of network games in turing. 3B - An incomplete 3D engine I started a while ago. Probably never gonna be worked on again. But hey it was actually starting to come along, sorta. I came across a interesting method when I was hacking a action game where you could cycle through Objects using Pointers and each of these object sections contained their coordinates. Nothing to do with turing but I was curious.. Have you ever tried to assign your baddies with variables that tell their location instead of using pixel color? Did it work? If it didn't.. why not? I was hoping I would be able to use Coordinates over pixel colors when determining where the bad guys were. Thanks for your time. |
Author: | TokenHerbz [ Wed Mar 15, 2006 1:17 pm ] | ||
Post subject: | |||
Imm0rtal wrote:
Its actually trying to use the sin/cos things to properly move your ships angle, and it will allow you to knoow which anngle you are facing to move that way, but, even though i get the logic, and know how to do it, it dosn't move correctly, so im still playing around with it... Still tough! |
Author: | Imm0rtal [ Wed Mar 15, 2006 1:22 pm ] | ||
Post subject: | |||
TokenHerbz wrote: Imm0rtal wrote:
Its actually trying to use the sin/cos things to properly move your ships angle, and it will allow you to knoow which anngle you are facing to move that way, but, even though i get the logic, and know how to do it, it dosn't move correctly, so im still playing around with it... Still tough! Interesting! I have never attemped a game that worked on angles. Now I wanna see source code.. |
Author: | chrispminis [ Wed Mar 15, 2006 2:25 pm ] |
Post subject: | |
@ Imm0rtal Greetings! I'm a fairly new programmer having learned Turing a few months ago. But collision with coordinates is very easy. In fact it's one of the first things I learned, even before I figured out arrays I was using linear collision. I would think the hardest part of Asteroids isn't the collision but rather the movement, such as the thrust and rotation. I think we have some excellent tutorials on linear and circular collisions, just check the Turing Tutorial section, particularly, the Complete Turing Walkthrough. If you want some sample source code illustrating both types of collisions I could send you some of my old unfinished projects.[/code] |
Author: | Cervantes [ Wed Mar 15, 2006 6:13 pm ] |
Post subject: | |
Imm0rtal wrote: Thank you for your off-topic post. You did miss interpret my post. A z- coordinate is what you just explained and just because something is possible does not make it plausible. To answer your other question.. Turing "code" is translated into a C++ run enviroment which means.. The code is read using C++ and then all the "functions" are translated and printed to the screen. You do not get to choose what libraries are used as that has already been determind (Which is my reason for saying the z- coordinate is the bane of turing). You are bound by whatever functions the software allows. Think of it like a software program where you write "black screen" and the program makes the screen black. Does that mean it is a new founded language? or just software taking what you type and performing an action. So I guess Turing could be considered a language.. it does eventually get translated into binary.. as does everything you see on your computer. I tend to argue that technically Turing is C++ since that is the last step before it becomes Assembly. Turing is definately a language. You write code in it and that code can be executed by the computer. The code you write is designed to be understandable to you, not the computer. Programming languages are human languages, not computer languages. You are not restricted by Turing's library. You don't need a standard library function that takes x, y, and z coordinates to draw in 3D. You can use the standard library function that takes x and y coordinates, combined with a little math, to draw in 3D. Never say never! |
Author: | Imm0rtal [ Wed Mar 15, 2006 6:56 pm ] |
Post subject: | |
Possible not Plausible.. Technically anything is possible when it comes to computers. |
Author: | MysticVegeta [ Wed Mar 15, 2006 7:15 pm ] |
Post subject: | |
"Technically." |
Author: | TokenHerbz [ Wed Mar 15, 2006 7:39 pm ] |
Post subject: | |
Then ill have to find out how to make it spit out 100 dollar bills at me :S |
Author: | Martin [ Wed Mar 15, 2006 8:39 pm ] |
Post subject: | |
Imm0rtal wrote: You did miss interpret my post. A z- coordinate is what you just explained and just because something is possible does not make it plausible.
To answer your other question.. Turing "code" is translated into a C++ run enviroment which means.. The code is read using C++ and then all the "functions" are translated and printed to the screen. You do not get to choose what libraries are used as that has already been determind (Which is my reason for saying the z- coordinate is the bane of turing). You are bound by whatever functions the software allows. Think of it like a software program where you write "black screen" and the program makes the screen black. Does that mean it is a new founded language? or just software taking what you type and performing an action. So I guess Turing could be considered a language.. it does eventually get translated into binary.. as does everything you see on your computer. I tend to argue that technically Turing is C++ since that is the last step before it becomes Assembly. Is Perl a programming language? It gets converted to C when compiled. Does that mean that Perl is C? I don't know of any Perl programs that you can compile with gcc. Is C even a programming language then, as it's restricted by whatever functions your processor has available? After all, it's not x = x + 1;, it's addi $4, $4, 1. Underneath that you have the machine code. C has the advantage of having OpenGL libraries already written by people to handle all of the math for you. Years and years of programming by many people have gone into the libraries, so matching it on Turing would be impossible because of time constraints. Underneath all of that though, the math still exists. For simple things like rotating a cube, the math is also really easy. Search the forums for posts by Catalyst or HomerSimpson. People have done it. |
Author: | Tony [ Wed Mar 15, 2006 9:13 pm ] |
Post subject: | |
look, it all comes down to being able to draw a dot on the screen. DirectX / OpenGL just have a lot of math under the hood to make the drawings faster. Turing doesn't provide this math because there's no need for it at a highschool level. Turing does provide all the means needed to implement such math though. Forget 3D, lets go a step further - Catalyst's hypercube. Ownage! |
Author: | Imm0rtal [ Wed Mar 15, 2006 10:19 pm ] |
Post subject: | |
Tony wrote: look, it all comes down to being able to draw a dot on the screen. DirectX / OpenGL just have a lot of math under the hood to make the drawings faster.
Turing doesn't provide this math because there's no need for it at a highschool level. Turing does provide all the means needed to implement such math though. Forget 3D, lets go a step further - Catalyst's hypercube. Ownage! Very Interesting.. |
Author: | Bored [ Wed Mar 15, 2006 11:36 pm ] |
Post subject: | |
Imm0rtal wrote: I came across a interesting method when I was hacking a action game where you could cycle through Objects using Pointers and each of these object sections contained their coordinates. Nothing to do with turing but I was curious.. Have you ever tried to assign your baddies with variables that tell their location instead of using pixel color? Did it work? If it didn't.. why not? I was hoping I would be able to use Coordinates over pixel colors when determining where the bad guys were. Thanks for your time. Collision can be a tricky thing escpecially the more acurate you want it and the more complex the shapes. I've only ever once used whatdotcolour for collision and it was very complex the way i used it. I had actually drawn barriers around each object for the specific object i was moving. It actually worked for ovals and squares even if they rotated. The best collision I have ever done was one where every object had a sorta chasis built of lines that whent around the outside. So basically I would find the intercept of the lines and if it lide between both points of both lines then they had collided. I'm also working on a project that uses vectors instead of co-ordinates but for collision i basically convert to co-ordinates because they are easier to work with for collision. |
Author: | Imm0rtal [ Thu Mar 16, 2006 6:36 pm ] |
Post subject: | |
I always preferred coordinate collision over pixel color only because Often many things would be the same color.. and the things that you could collide with were not always a straight one color. |
Author: | [Gandalf] [ Thu Mar 16, 2006 7:26 pm ] |
Post subject: | |
Immortal, true as that may be, distance collision is much more difficult once you get more complex shapes (ie. a picture you imported). Did you not read Bored's post? |
Author: | Imm0rtal [ Fri Mar 17, 2006 12:47 am ] |
Post subject: | |
[Gandalf] wrote: Immortal, true as that may be, distance collision is much more difficult once you get more complex shapes (ie. a picture you imported). Did you not read Bored's post?
I am using images i have imported.. |
Author: | [Gandalf] [ Fri Mar 17, 2006 1:12 am ] |
Post subject: | |
Are they perfect, or almost perfect shapes? (ie. circle, rectangle) That's the only way you'll get decent distance collision (at least if you haven't implemented a more complicated collsion system). Lets say you have this weird looking guy: How would you tell there was a collision with him? |
Author: | Andy [ Fri Mar 17, 2006 9:27 am ] |
Post subject: | |
whatdotcolor! |
Author: | NikG [ Fri Mar 17, 2006 10:07 am ] | ||
Post subject: | |||
To TokenHerbz Re: Quote: Its actually trying to use the sin/cos things to properly move your ships angle, and it will allow you to knoow which anngle you are facing to move that way, but, even though i get the logic, and know how to do it, it dosn't move correctly, so im still playing around with it... Still tough!
I don't know if you're figured out the problem yet, but if not, I might be able to help. I needed to work with angles for my little basketball game template (http://www.compsci.ca/v2/viewtopic.php?t=11580). If you run it, you'll notice that as the player moves, the ball moves as well... it's always facing towards the net. Here's how I did it:
The Ball is always 12 pixels in front of th player (relative to the rim). What I needed to do was find out where the ball should be based on where the player is. Also, I wanted to store the angle in a variable so that I could use it later for shooting purposes. The astute reader would notice that the angle will always be between 0 and 90. I didn't want it to go higher (to 180 or 360 degrees), so instead I just used the sign command to find out whether to add or subtract. (Note: when using the trig functions, be careful of a div by zero error at 90 degrees. That's why I have the code above for whether the player.x = rim.x, cuz that means the angle is 90) So how does this apply to you? Well the code above shows that all you need is 2 coordinates (maybe your ship's tail and it's head, if you've got the rotation code working properly). Once you have that, you can easily figure out the angle using arctand and then using cosd and sind, you can get where they should move. Let me know if anyone needs further explanation. |
Author: | NikG [ Fri Mar 17, 2006 12:30 pm ] | ||||||
Post subject: | |||||||
My bad; I just realized that I didn't really tell you how to do movement, just angles. Ok, again using my bball game as an example:
This gave me the length from the ball to the rim. So, all I need to put in my loop is the following:
You see, the length between the ball and the rim automatically keeps decreasing by 1.5. Then all I needed was to check that Ball.X = Rim.X and Ball.Y = Rim.Y to know the player scored. It may seem like it's different for you because unlike you, I had a fixed location for my ball to end up at (Rim). But actually, the only change is that you'll have to keep the length fixed. That way, the ship will keep aiming towards a constantly changing point.
Now all you gotta figure out is how to implement the thrust into this. Hope I helped. |
Author: | md [ Fri Mar 17, 2006 4:37 pm ] |
Post subject: | |
you people and your simple 2D images; if you use models instead of pictures you can do all sorts of nifty collision detection. Then just texture the model and your all set! ** note that models can indeed be 2D |
Author: | MysticVegeta [ Fri Mar 17, 2006 4:42 pm ] |
Post subject: | |
Cornflake wrote: you people and your simple 2D images
There exists noobs like me who cant touch 3D. |
Author: | [Gandalf] [ Fri Mar 17, 2006 9:20 pm ] |
Post subject: | |
Cornflake wrote: **note that models can indeed be 2D
Cornflake, what exactly do you have in mind? That is possible in Turing? |
Author: | [Gandalf] [ Fri Mar 17, 2006 9:21 pm ] |
Post subject: | |
Ah, crud. My post is badly set up. Note that the quote from Cornflake is to answer MysticVegeta's post above. |
Author: | Imm0rtal [ Sat Mar 18, 2006 12:56 am ] |
Post subject: | |
[Gandalf] wrote: (implemented a more complicated collsion system)
|
Author: | [Gandalf] [ Sat Mar 18, 2006 1:03 am ] |
Post subject: | |
I see... May I inquire as to what kind of "more complicated collsion system" you used? |
Author: | md [ Sat Mar 18, 2006 6:22 am ] |
Post subject: | |
[Gandalf] wrote: Cornflake, what exactly do you have in mind? That is possible in Turing?
And that is exactly the kind of problem I have with people these days. Of course it's possible! Turing is a programming language, it can do anything that any other language can do. It may not do it as well or with the same amount of code, but it'll get it done. |
Author: | [Gandalf] [ Sat Mar 18, 2006 6:39 am ] |
Post subject: | |
Indeed... Yes, I contemplated that for a while before, so I do realize your point, and again, it wasn't the best post. How should I say this then... Possible without veering massively off your main objective, recreating things which have been worked on extensively and have large libraries to in other langauges. Ah. Practical might be a better word, now that I think about it. Hopefully you'll forgive my often simplified terms and ideas in the future. |
Author: | md [ Sat Mar 18, 2006 10:42 am ] |
Post subject: | |
As for practicality, sure it's practical! Once it's written you don't need to write it again and it can be used by many other people. Though due to the complexity of the code required and the size it might be best to make hte modeling library your final project, and the game a demo of it's power. |
Author: | Bored [ Mon Mar 20, 2006 10:20 pm ] |
Post subject: | |
For my final project I used 2d-models for my collision detection. Each object had a model made up of points around it's outside. I then used the lines these points created for my collision. I found the point of intercept between two lines, and if that point lied between the two points from each line then the lines must be touching (draw it out and you'll see). I did this for every line on both objects I was comparing and when they hit I had it move them back to where they where before they hit then did some calculations to make them bounce. |
Author: | codemage [ Wed Mar 22, 2006 9:34 am ] |
Post subject: | |
Translation has nothing to do with whether or not Turing is a language. If I find a useful webpage in Chinese, but I babelfish translate it into Engrish, it doesn't suddenly cease to be a webpage. The 4.1 version of Turing supposedly offers a great improvement in efficiency with the graphics unit. You probably want to snag a version, Imm0rtal, if your program isn't running smoothly with the previous version. |
Author: | ZeroPaladn [ Wed Mar 22, 2006 2:19 pm ] |
Post subject: | |
ive been screwing around with collision detection for some time, and for me the best way to do colision detection is to create a collision layer. Very simple, and you can use whatever colours you want for the pics you import, just as long as they have a corresponding collision layer "tile". this layer, along with the tiles, is drawn before the screen you see on the monitor, do all of your collision detection using whatdotcolour there, then draw the screen you would like to see, View.Update, and your good to go! |
Author: | Imm0rtal [ Wed Mar 22, 2006 5:34 pm ] |
Post subject: | |
codemage wrote: Translation has nothing to do with whether or not Turing is a language. If I find a useful webpage in Chinese, but I babelfish translate it into Engrish, it doesn't suddenly cease to be a webpage.
The 4.1 version of Turing supposedly offers a great improvement in efficiency with the graphics unit. You probably want to snag a version, Imm0rtal, if your program isn't running smoothly with the previous version. While performance is great right now.. I forsee problems in the future when my loops become 1000+ lines long. I am using version 4.1. |
Author: | [Gandalf] [ Wed Mar 22, 2006 7:04 pm ] |
Post subject: | |
The speed improvements aren't revolutionary, but they're not bad either. Here are some stats: In my 600+ line chess (which is shortened, for example one line return statements) program, using Turing 4.1 on a Pentium 3 @ 500Mhz, I get ~6 FPS using Pic.SetTransparentColour with .bmp's. I get a constant 30 FPS (I limited it at 30) using transparent .gif's. |
Author: | Imm0rtal [ Wed Mar 22, 2006 7:17 pm ] |
Post subject: | |
[Gandalf] wrote: The speed improvements aren't revolutionary, but they're not bad either. Here are some stats:
In my 600+ line chess (which is shortened, for example one line return statements) program, using Turing 4.1 on a Pentium 3 @ 500Mhz, I get ~6 FPS using Pic.SetTransparentColour with .bmp's. I get a constant 30 FPS (I limited it at 30) using transparent .gif's. Unfortunatly.. the more complete my game becomes.. the more things it needs to check for.. constantly.. Unless I had boolean variables and if statements that would totally "turn off" certain parts of my game when they were not needed anymore.. but who can tell what will truely be uneeded in a game like zelda where you are constantly revisiting areas.. I just don't see a "secure" method of reducing all the checks that need to done.. Maybe I could turn those boolens from true to false and back to true depending where the person is.. which could turn 50 checks made into like 1... Which I have been considering for a while if this game gets much bigger... |
Author: | Cervantes [ Wed Mar 22, 2006 8:19 pm ] |
Post subject: | |
Games like Zelda have big maps, indeed. I'm not talking about a single area, though. I'm talking about the entire world, in the game. There's no need to check for a collision between Link and a baddie on the other side of the continent, because we know there won't be one. It is too far. So, we can safely split the world into sections. That's one of the reasons these games have different areas to them. Sure, you could make the world one big connected place, but seperating it into areas is a convient way of reducing the amount of collision (and other kinds of) checks that you have to do. Even if you don't want to split your game into areas, you can do the same thing, only behind the scenes. Split the area up into sections, divided by "imaginary" lines. You only need to check collisions etc. for spaces in the same or adjacent sections. You can optimize the size of the sections (probably using calculus. That would be fun. Anyone done it?) to achieve the best result. |
Author: | Imm0rtal [ Wed Mar 22, 2006 11:46 pm ] |
Post subject: | |
Cervantes wrote: Games like Zelda have big maps, indeed. I'm not talking about a single area, though. I'm talking about the entire world, in the game. There's no need to check for a collision between Link and a baddie on the other side of the continent, because we know there won't be one. It is too far.
So, we can safely split the world into sections. That's one of the reasons these games have different areas to them. Sure, you could make the world one big connected place, but seperating it into areas is a convient way of reducing the amount of collision (and other kinds of) checks that you have to do. Even if you don't want to split your game into areas, you can do the same thing, only behind the scenes. Split the area up into sections, divided by "imaginary" lines. You only need to check collisions etc. for spaces in the same or adjacent sections. You can optimize the size of the sections (probably using calculus. That would be fun. Anyone done it?) to achieve the best result. I did exactly what you said. I have a check to make sure they are in the correct area and then it loads all the pictures along with the checks for what state those are in (IE Chests are Open/Closed.. Switches are Up/Down or Pots are Docile/Smashed ect..) As well as my collision method. The problem is.. when you have 100 + Areas.. Everytime it loops around it has to make a check against all those 200 Areas Everytime you Move.. Basically. My method was this: If Person is in X Area then her can only move to Y Areas so Z areas could all be part of nested if statements within a larger if statment that had a more general check. As of now this is my ONLY solution to making less checks everytime something happens and thus speeding up the game overall. |
Author: | chrispminis [ Thu Mar 23, 2006 12:13 am ] |
Post subject: | |
I think he means for you to check which area you are in. Then check for all the collision and stuff for that area (and for adjacent areas if necessary) and then not check anything for the other areas at the time since what happens in the other areas don't effect you, and you know you can't be colliding with a baddie in a different area. This saves a lot of checking, and can be done with booleans (to check if an area is being used). Or you could use integers. Or strings. Just a question to everyone out there. Have you found that booleans are sort of obselete in Turing? Sure it's the basics of on/off, true/false, 1/0 etc. But... aren't variables that act as booleans much more effective and versatile? Since booleans may only act for two different situations, but integers may act for many in one round, I see them as much more useful. Unless I'm missing something. But out of habit, for situations that require only two possibilities I have a tendency to use booleans. Meh, you could use strings as I've seen, and used. [/code] |
Author: | codemage [ Thu Mar 23, 2006 9:09 am ] |
Post subject: | |
Booleans are effective when you have only one of two choices: They only cost one bit to store. Arrays or lists of booleans are "cheap" on memory. Integers aren't. (Being cheap on memory counts for a lot when you're using Turing - and it's a good practice in any language). Booleans make for very readable code. Even a non-programmer can read If LinkHasWonTheGame = true Whereas integer opcodes like If EndCondition = 4 Require a much more intimate knowledge of the program. If you have a bunch of separate integer opcodes, you'll likely have to keep returing to your declaration area to figure out what the numbers mean. |
Author: | md [ Thu Mar 23, 2006 10:01 am ] |
Post subject: | |
Umm... I dunno what language you've been using but from my expereince booleans are bytes or sometimes even two bytes. Storing data as an individual bit is really quite slow, using booleans is much faster. That's not to say using booleans isn't a good idea; just that they take up n-bytes space instead of n-bits. |
Author: | NikG [ Thu Mar 23, 2006 10:09 am ] | ||
Post subject: | |||
Imm0rtal Quote: The problem is.. when you have 100 + Areas.. Everytime it loops around it has to make a check against all those 200 Areas Everytime you Move.. Basically.
chrispminis Quote: I think he means for you to check which area you are in. Then check for all the collision and stuff for that area (and for adjacent areas if necessary) and then not check anything for the other areas at the time since what happens in the other areas don't effect you, and you know you can't be colliding with a baddie in a different area. This saves a lot of checking, and can be done with booleans (to check if an area is being used). Or you could use integers. Or strings.
Using a boolean would mean having to have a boolean for every single area (where all are false except the one for the area you're in). Another option is to keep a single variable holding your location. Then all you need to do is check one before and one after the amount of that variable. All you need for this to work is an initial declaration of all the areas (in an array). Quick example:
|
Author: | Imm0rtal [ Thu Mar 23, 2006 10:41 am ] |
Post subject: | |
Judging by the replies.. I don't think you know exactly what I am saying.. |
Author: | Legolas [ Thu Mar 23, 2006 3:26 pm ] |
Post subject: | |
Hate to tell you, but I programmed something almost exactly similar to what you are describing a while back Immortal. Only ever posted the early stages of it: http://www.compsci.ca/v2/viewtopic.php?t=7545 The final version most of the inside of the houses done, first dungeon mapped, and I managed to get it so that it was smooth scrolling. This was over a year ago so I am not sure if I still have the final project. Might have some of the smooth scrolling code which if I find I will post up as an example. -nsf-legolas |
Author: | Imm0rtal [ Thu Mar 23, 2006 3:37 pm ] |
Post subject: | |
Legolas wrote: Hate to tell you,
How come? Legolas wrote: but I programmed something almost exactly similar to what you are describing a while back Immortal. Only ever posted the early stages of it: http://www.compsci.ca/v2/viewtopic.php?t=7545 The final version most of the inside of the houses done, first dungeon mapped, and I managed to get it so that it was smooth scrolling. This was over a year ago so I am not sure if I still have the final project. Might have some of the smooth scrolling code which if I find I will post up as an example. -nsf-legolas Although a VERY interesting game.. I would like to consider mine a little better. Or maybe I am just a tad Biased. |
Author: | Legolas [ Thu Mar 23, 2006 3:39 pm ] |
Post subject: | |
Perhaps...but I'll have to go with what I've seen, which out of the two, is only mine |
Author: | Imm0rtal [ Thu Mar 23, 2006 8:27 pm ] |
Post subject: | |
Legolas wrote: I'll have to go with what I've seen, which out of the two, is only mine
Not for long! |
Author: | Bored [ Tue Mar 28, 2006 9:51 pm ] | ||||||||||
Post subject: | |||||||||||
chrispminis wrote: Just a question to everyone out there. Have you found that booleans are sort of obselete in Turing? Sure it's the basics of on/off, true/false, 1/0 etc. But... aren't variables that act as booleans much more effective and versatile?
Since booleans may only act for two different situations, but integers may act for many in one round, I see them as much more useful. Unless I'm missing something. But out of habit, for situations that require only two possibilities I have a tendency to use booleans. Meh, you could use strings as I've seen, and used. 1. Only 1 bit of space required (important in larger projects) 2. Easier to read code
3. Less if statments
4. Can use boolean algebra
|
Author: | md [ Tue Mar 28, 2006 10:45 pm ] |
Post subject: | |
booleans do not use only one bit. They use an entire byte. They *could* be represented as a bit, but the memory savings are not worth the huge speed loss. Oh, and I don't care what your running you should not be running out of space unless you have WAY too many variables. Booleans are nice because they are the best representation of logic there is. when you use an integer you need to remember what 1 is and what 0 is. True is always true. Oh, and yes; you could reuse an integer for something else, but if your doing that then you probably have issues in teh way your code works. If it should act like a boolean some of teh time then it should be a boolean all of the time. |
Author: | Bored [ Tue Mar 28, 2006 11:06 pm ] |
Post subject: | |
Oh I actually meant to say byte not bit but that was actually me mispelling it as bite and missing a key on the keyboard while typing. As for the memory it may not be a problem in the programs you'll be making in Turing but is a good habit in the case that you move on to the higher stages of programming where memory becomes a problem and must be savored and held upon a pedastool in order to accomplish the task at hand. In other words get used to it now to make an easier transition (I probably should have expanded on that before) |
Author: | Andy [ Tue Mar 28, 2006 11:14 pm ] |
Post subject: | |
actually, it does matter.. when you're doing recursion you'll get a stack overflow much faster if you used integers instead of booleans |
Author: | chrispminis [ Tue Mar 28, 2006 11:29 pm ] | ||
Post subject: | |||
Bored wrote: Oh I actually meant to say byte not bit but that was actually me mispelling it as bite and missing a key on the keyboard while typing.
LOL. Cunt. I mean Hi. Common typo. Anyways. From what I hear a big advantage of booleans over integers is logic value, and convenience of identification. What if you were to use strings? Such as...
Would that not be convenient identification as well? But what are the technical aspects of strings? |
Author: | Imm0rtal [ Tue Mar 28, 2006 11:32 pm ] |
Post subject: | |
As far as im concerned Boolean = a integer variable that I constantly change from 0 to 1. |
Author: | Bored [ Wed Mar 29, 2006 7:33 am ] | ||||
Post subject: | |||||
Imm0rtal wrote: As far as im concerned Boolean = a integer variable that I constantly change from 0 to 1.
can you do this with an integer without using more lines
or this
|