Computer Science Canada Portable Tile Generation System |
Author: | TheEvilOne [ Tue Apr 12, 2005 8:42 pm ] |
Post subject: | Portable Tile Generation System |
Alright, this is my second 'open source' post here. This time, I know something like this has probably been posted here before, but oh well... im posting it anyways ![]() This system is easily changable, and added on to. I programmed in in procedures that you can move wherever you want. If you feel like it, im sure you can make the variables be passed. For now, most things are just constants, and are layed out easily enough to find. Well, just unzip it, and remember, the Readme file is your friend ![]() Any Comments/Suggestions are welcome. I'm working on a complex collision/interaction system to go with the tiles, so you can make it so that the tiles have easy interaction with your characters. e.g. your character cant run into this tile, but if there is a sign tile nearby, you can read it, etc. |
Author: | Delos [ Tue Apr 12, 2005 9:19 pm ] | ||||
Post subject: | |||||
Pretty. One thing. Line 40. Change it from
to
Things will be a lot happier. |
Author: | TheEvilOne [ Tue Apr 12, 2005 9:24 pm ] |
Post subject: | |
You know... I meant to do that in the first place. And that stopped the error. I error checked that so many times and it just slipped my mind. Thank you ![]() ** Updated ** |
Author: | dann_west [ Wed May 04, 2005 1:56 pm ] |
Post subject: | Re: Portable Tile Generation System |
creative?... ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Author: | AzureFire [ Sat Dec 03, 2005 11:02 am ] |
Post subject: | |
Thank you!!!! I've been trying to learn how these text file maps work forever...lol one quick question. How do you make a tile solid, so that a player cannot walk through it? P.S. Sorry for bumping an old post ^_^ |
Author: | RedRogueXIII [ Sat Dec 03, 2005 3:59 pm ] |
Post subject: | |
Very cool, maybe i could integrate it with my own Zelda engine, see other post. and to make a non passible spot just make a 2 dimensional array of boolean. at spot (x,y) = false then cannot walk eg. * the code for declaring a 2d array eludes me right now... [edit] also when making map files that can be loaded and saved, you can also have multiple layers so that you could lay down the basic tiles first then on a new layer or paragraph you declare spots where you want bigger elements to go, eg houses or trees, the same could be said for map transitional data, spotx, spoty opens map(whatever). just to how pro map files can be. ![]() |
Author: | Cervantes [ Sat Dec 03, 2005 5:09 pm ] | ||
Post subject: | |||
RedRogueXIII wrote: * the code for declaring a 2d array eludes me right now...
RedRogueXIII wrote: [edit] also when making map files that can be loaded and saved, you can also have multiple layers so that you could lay down the basic tiles first then on a new layer or paragraph you declare spots where you want bigger elements to go, eg houses or trees, If the houses or the trees are fixed, I don't see the advantage of this. Could you please elaborate? |
Author: | Aziz [ Sat Dec 03, 2005 11:22 pm ] | ||
Post subject: | |||
Quote: For now, tile names must be numbers. Integer numbers to be exact. I'm working on a way to allow string names, but for now, im sorry to say that you have to use integers.
Why not make an array called filenames?
Now if you read a tile number, say 6, it's filename would be: filenames(6) + ".bmp" . ![]() |
Author: | Cervantes [ Sun Dec 04, 2005 10:18 am ] | ||
Post subject: | |||
Aziz wrote:
Don't forget to make that an array of strings. ![]() You might also look into making that an enumerated type. Sadly, we don't have a tutorial on the topic. AsianSensation was supposed to make one, but then he went to University. ![]() |
Author: | RedRogueXIII [ Sun Dec 04, 2005 1:55 pm ] |
Post subject: | |
what i mean when having trees and houses on a different layer is to just grab and place the whole graphic into the map, instead of calling all the individual tiles that compose the graphic. eg if a house took 4 tiles then on the tile layer set those to default and call the graphic on the computer's x,y axis. i hope that explains what i meant to say. |
Author: | Aziz [ Mon Dec 05, 2005 8:03 am ] | ||
Post subject: | |||
Cervantes wrote: Aziz wrote:
Don't forget to make that an array of strings. ![]() You might also look into making that an enumerated type. Sadly, we don't have a tutorial on the topic. AsianSensation was supposed to make one, but then he went to University. ![]() ![]() |
Author: | ZeroPaladn [ Mon Dec 05, 2005 10:17 am ] |
Post subject: | |
for collision detection for a tile system is to make a second (collision detection" layer as a picture. whatever you cant walk on, make it a diff colour, and declare it beofre you draw the main picture, do collision detection, then draw the main map. on most computers you dont even see the colission detection layer. |
Author: | jamonathin [ Mon Dec 05, 2005 1:16 pm ] | ||
Post subject: | |||
ZeroPaladn wrote: for collision detection for a tile system is to make a second (collision detection" layer as a picture. whatever you cant walk on, make it a diff colour, and declare it beofre you draw the main picture, do collision detection, then draw the main map. on most computers you dont even see the colission detection layer.
I dont think thats what he ment ZeroPally. Not saying that methods bad (not perfect). What you can do, is use your textfile. I mean, it right there, why not? So lets say in your text file, everywhere the number '4' is, your NOT supposed to walk there because theres some fat tree in the way. Well, if you have already loaded from your file to put a fat tree there, why not check using the same text file? Basically what you'll be doing is walking through the actual text file, rather than the screen. The screen will just show you what you're doing, in a prettier format ![]()
This isn't exactly what you would be using in that type of situation, but i juss whipped it together to help you understand what is going on. Good luck with that. |
Author: | AzureFire [ Mon Dec 05, 2005 4:44 pm ] |
Post subject: | |
ok thanks, seems simple enough. By the way ZeroPaladn, I sent you the signature without the PREVIEW tag in it. Check your PM inbox. |
Author: | Shyfire [ Mon Dec 05, 2005 5:15 pm ] |
Post subject: | |
i think what zero said is easier to understand and its what i use to an extent in rpgs and other games that i make |
Author: | jamonathin [ Tue Dec 06, 2005 11:36 am ] |
Post subject: | |
fatboi wrote: i think what zero said is easier to understand and its what i use to an extent in rpgs and other games that i make
Easier yes, effective yes, good practice no. I too have used that method, and the reason I said that was because azure has already used that method before. There's nothing wrong with it for basic rpg games, its just a lot of loading, and if you ever plan on making your game extensive, I would try to switch over. |
Author: | AzureFire [ Tue Dec 06, 2005 6:46 pm ] |
Post subject: | |
jamonathin wrote: fatboi wrote: i think what zero said is easier to understand and its what i use to an extent in rpgs and other games that i make
Easier yes, effective yes, good practice no. I too have used that method, and the reason I said that was because azure has already used that method before. There's nothing wrong with it for basic rpg games, its just a lot of loading, and if you ever plan on making your game extensive, I would try to switch over. Yea, the method he mentioned is very bad for RAM and performance. It's not very professional either. This way makes things a little easyer on the eyes (code-wise and visually). |
Author: | RedRogueXIII [ Tue Dec 06, 2005 7:40 pm ] |
Post subject: | |
just remebered something minor but meh,(about that kind of style) just remember the order you call your pictures is the same as the layer of appearance, so for the overhead objects all you have to do is draw them after drawing the guy, no need for the whatdotcolor stuff at all. |
Author: | jamonathin [ Wed Dec 07, 2005 1:13 pm ] |
Post subject: | |
RedRogueXIII wrote: just remebered something minor but meh,(about that kind of style)
just remember the order you call your pictures is the same as the layer of appearance, so for the overhead objects all you have to do is draw them after drawing the guy, no need for the whatdotcolor stuff at all. True, but that would require more images and more thinking. It'll look better, but if you have 100 bridges or somthing, thats 100 extra images ![]() |
Author: | AzureFire [ Fri Dec 16, 2005 8:09 am ] | ||||||
Post subject: | |||||||
jamonathin wrote:
On the right track, but there's a way for it to be done with less code and easyer for nubs like me ![]()
Then in your movement code... eg.
You should keep it AFTER the y>0 or if you get to close to the edge it may crash, thus the array and initialization being (-33) |