Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

126 Neutral

About Sylon

  • Rank
  1. Sylon

    RAM usage in a 3d map array?

    Ah-HA! Clear now! Thank you ravyne!!!!
  2. Sylon

    RAM usage in a 3d map array?

    Tile properties -- good to know!!! Quote:Original post by ravyne2001The map is just a simple 2D or 3D array. The contents of each array element need just enough data to index the full range of tiles available. If you have 256 or fewer tiles, then you only need 1 byte to access the full range of tiles. If you have more than that, 2 bytes will allow you to access up to 65536 tiles. Alternatively, you could store a pointer to the tile property directly, which saves a multiply and add for each tile, but this will cost you 4 bytes on a 32bit system, or 8 bytes on a 64bit system. You will also have to generate the pointers at load-time since you can't simply store pointers in a file and expect them to work the next time the program is loaded. Honestly, its probably best to just go with 8 or 16 bit indexes., when you say "full range of tiles available," and "256 tiles or fewer," you mean the different types of tiles stored in the memory like dirt, grass, water, right? So then if there are more than 256 tiles in memory, you are saying that to load the entire 200x200x3 array on screen, it only needs 2 bytes altogether? Or you mean 2 bytes per tile on the array (so 200x200x3x2 bytes = 240,000)? I think I've read something about the pointers to the tile properties thing before (link the tile to an events list or something?) but that's a bit over my head for now.
  3. Sylon

    RAM usage in a 3d map array?

    Thanks man!!! One more thing: You said 600,000 was right - does that mean when I said 5 bytes memory per tile in the array, was I right?! Do arrays always take up 5 bytes per tile or does that number vary depending on the information stored in each tile or something?
  4. (I'm not a coder BTW) So if I plan on making a 2D map that has, 200x200 tiles, and 3 layers (200x200x3) which = 120,000 tiles. Each tile is 16x16. The colors are 16-bit (2 bytes per pixel right?). Let's say there are 3 types of tiles total. A grass tile, a water tile, and a dirt tile. First of all, do the actual range of colors in each tile type affect how much memory the tile takes up (maybe depending on the image format)? If not, then each tile is the same amount of memory, which would be 16x16x2 = 512 bytes. Now since the 3 tile images are stored somewhere and just need to be loaded up on the array, let's say all 120,000 tiles were dirt. In other words the 200x200 tiles is not one HUGE image, it's a bunch of loaded 16x16 dirt tiles, and the ONE dirt tile image is 512 bytes (probably). So how much RAM does it take for the array to display every dirt tile? (I'm just guessing here, you may find I don't know what I'm talking about, just trying to learn). Let's say to display every tile takes up 5 bytes. That means that the total RAM usage would be 200x200x3x5 ( = 600,000 bytes) + 512 = 600,512 bytes. Would that be correct? Then if there were 3 different tiles being used, it would be 600,000 + 512(3) = 601,536 bytes. Also if the water tile was animated with 2 frames, it might be 1024 bytes? Just trying to figure this stuff, sorry for any lack of key knowledge!!
  5. Wow, thanks! Yeah I just found something explaining all that image memory stuff. Man, I have a lot to learn. Programming has always intrigued me but when I try to study it in-depth, I get flustered!! Of course, I heard C++ was a little bit tough anyway. Thanks for your help!
  6. Caspian, wow, awesome answer, good stuff to know! I might consider maybe, bringing it down to 1280x1280x10 tiles (16,384,000 tiles). Two last questions: How did you get the 1.2 Gb RAM calculation off the 2560x2560x48? You multiplied the total amount by 4? Is it 4 bytes per tile, or does that vary depending on the programmer and other considerations? Then I'd also have to multiply the pixels in each image of each frame of animation and stuff, per object, right? Theoretically** If I create ALL the 2d art in the game, what would I have to multiply in order to find out how much RAM the graphics will take up alone? I kinda just want to know the equation for determining that stuff. After posting this I will try to research it on my own on the web. And then yeah that RAM would not even be including sound files, AI files, etc. etc.
  7. Captain P-- Thanks! Yeah I've thought about many of the qualities in my game and how to deal with the boredom and the micromanagement and stuff, yeah, it takes a lot of work but I have ideas, anyway. Plus the long turn thing, I was actually planning on that being the case - there already are some games out there where the turns can take days if there is a high time limit or something. There is actually a reason I want to derive those map numbers beforehand - I'm not just arbitrarily picking them out because it makes a nice 3d-ish game set on a big map, it's because I need to know the max map size so I can calculate the unit statistics in a more balanced way (particularly in this case the movement stats). For example the movement of the units may just be 40 tiles per turn - therefore the big map doesn't become so hard to cross, etc., but I can still have room for gameplay details on the smaller level. For example how many turns will it take for an infantry unit to cross the map vs a flying unit? I am testing out how things will look, and testing scale ratios, in MSPaint, and every statistic I am putting a lot of thought into how it can be balanced between civilizations. ------------ But basically what I'm reading from you is that, it might just not even be possible to have that many blocks, we'd have to test it out. What is the limit, the actual numbers themselves may be too much for the computer, or it all just might take up too much RAM? Which, in the case of the RAM, the computer would only need to have a horseload of RAM to play the game, right? Is there an actual physical limit to computer coding that can't be overcome by superior technological development in the realm of speed and memory? Hehe. By the way your AI WARS TBS looks interesting!
  8. Pickled-- That game looks awesome! Yeah I've seen it before. It doesn't have exactly everything I want but it has a lot more things that obviously my 2d TBS won't offer, especially the epic R-T battles! Caspian-- Ah, see I thought something would make my game less efficient! Wait so the processors aren't the problem? Let's say the programmer goes ahead and makes the 48 layers, with all its wasted space, LOL. Are you saying that processors would still be able to play the game at normal speed, but that there would be a lot of wasted space (is it RAM or something?) used up within the computer? Anyway thanks, that was a good answer. I'll have to rethink stuff.
  9. Hi! This question might be a big one mathematically, not sure. I'm an artist also, not a programmer but I want to know if my idea will make a slow game for PROCESSORS (not concerning net connection speed). Basically in my sci-fi turn-based strategy game I would like the "Giant" map to allow room for 12 players, each with at least 400 population max (the allotted time for taking turns in this game may last a day to a week[?]). The player will have a completely orthogonal overhead view of the map, which will be made of 16x16 tiles. I want the giant map to be able to at least be 2560x2560 tiles (1,677,721,600 pixel area). This map will also have height levels (graphical layers that the player can cycle through, inside anything bigger than a tank such as a large ship or house or building, even inside trees to see the levels of their branches and if anyone is hiding in them). The soil can be destroyed to make underground tunnels, which can sneak underneath the basements of a constructed building. Submarines can go underwater and underneath battleships, etc. Every 16x16 tile will have its own HP and "Armor" and a few other stats. ALL structures (usually 20x20 tiles) that are built will have destructible 16x16 wall tiles, from the interior and the exterior. Infantry can walk into those structures and if you click through the height levels you will be able to see the different floors of the structures. It's basically a 2d game with an orthogonal view and square collision detection, but which behaves kind of like 3d games. So let's say a giant map has about 48 layers of "height," from the bedrock to the sky above mountains. But the sky will mostly be transparent anyway, so let's give a rough estimate of about 36 layers of height concerning graphics. That means, in this map, there would be about 1677721600x36 pixels stored in the memory somewhere which = 60,397,977,600 and 90% of those 16x16 tiles will have their own HP statistics and animations and reactions to the environment, not to mention their own "damaged" frames of destruction and animations and the other 1000s of objects on the map. Remembering the RTS Command and Conquer on the Playstation (which was something crappy like 33 mhz?), things were really slow, but my maps are much larger and have many graphical layers and each tile has destructible statistics the computer must remember. However I guess RTSs might be slower than TBSs. Sorry I don't know much about memory and processing speed and stuff, but does anyone think this game will be slow with 12 players even given today's standard Ghz processors? Because, I KNOW 3d games use a lot more pixels and bigger objects but the terrain usually doesn't have its own unique stats and animations at the 16x16 level, right? And don't 3d games use more equations to draw on the art on screen than rasterized images (don't rasters take more space?) Even playing Age of Empires 2, a 2d isometric RTS, with its giant map (smaller than mine and which didn't have as many layers), with 8 players max and 200 population max per player, starts to slow down maybe 15% offline even with a 1.6 Ghz processor!!! Anyway thanks for helping and, thanks for reading, I know this is a big post.
  10. Oof. Yeah good point. I feel, very prehistoric right now!
  11. Dang was it that simple? Man. I am behind. I thought I knew basic VG programming "rules" (not code) but I guess my questions are no match for what's possible out there!! Even the 16x16 components being linked together and stuff? They will move in unison in the rotation? Hm. You made my day. My night. My morning, actually. I can go to sleep happy now, thanks man. Dreaming about my game art. LOL. Wow. You rock! Later.
  12. Hi! I'm back with more questions after all these...years. Anyway So if you saw the animation...yeah. Sorry it's not very artistic but I didn't want to go all out (it actually took me like 2.5 hours to make). So does anyone think it is POSSIBLE to graphically rotate the boat that specific way (except that it will use mathematical equations instead of actual stored frames of animation[?]) with all the things I mentioned? One more thing - the reason I want to know about this is because in my game I will design large rectangular objects like ships and planes, but I don't want to bother with them facing 8 directions (which includes 45 degree angles) - it's a pain for the artist AND the coder (well, if each 16x16 tile is its own component I think so). With a cartoony, you-can-feel-the-PHYSICS rotation animation, it will make the large objects' 90 degree rotations more realistically acceptable and enjoyable!!! See what I mean? Instead of it just taking 1 or 2 frames to rotate into the other positions. Thanks! Joe [Edited by - Sylon on February 29, 2008 1:04:46 AM]
  13. Well you guys have definitely convinced me to start learning to code! Yeah I realize my family and job will take a lot of my time. I was thinking my free time would be devoted over decades, to the game. But yes of course the future is not predictable. I guess all I can do now is hope! I'm currently reading a C++ tutorial. I didn't know notepad could be used to write the code (but not compile it). That's so cool!
  14. Gadzooks. Learn to program?! I dunno where to start! It's such a broad thing. It's MAJOR tempting for me to be a "good coder". I've tried to learn some code before but man I was left in the dark. How long did it take coders to get decent? Must have been years right? Do any of you think I could learn it by reading books and stuff and NOT going to college for it? Because currently I'm a senior in college, majoring in of course digital art. I don't want to abandon this topic just yet! We're making so much progress! Look at all these geniuses!
  15. Ah for once I am answering the questions! Quote:Original post by Traveler If I may, I have 4 questions for you: A) Who is going to write this game? B) You say plan to work years on this, perhaps even decades. Taken from my own experiences and from what I've read on various gamedev forums, including GD.Net, even if you have all the skills and knowledge required for a game like this, it's very likely that you'll abandon it at some point. There are various reasons but lack of skills and lack of interest are the two most common. Why such a big endeavor and not something smaller? C) Imagine you do finish it, after say 5 years. Do you realize that by then computational power in the area of graphics as well as physics have evolved to the level where for example pre-rendered graphics as we know them now from movies like Cars or The Incredibles, may very well be possible at real time? D) I'm not looking for an argument whether that statement is true, but given your plans and this idea. I was merely wondering if you've given some thought about that as well in you designs? Because many of your ideas, such as the perfect collision detection, realtime shadows, perhaps even physics too, will then become a fairly cheap trick, compared to the very difficult ones you are now looking for to make it all work in 2D. A. A team of people who can, if I don't learn to code it myself. I doubt I will learn to code it myself and you know why, haha. Hopefully I'll be able to pay the team. Otherwise it might have to be friends of mine who I can work intimately with. B. I have thought about this and came up with one conclusion: The game will be a hobby of mine so my life won't depend on it financially. Therefore it's expendable, but should I abandon it for any reason, I will give the graphics away for free to any project that wants it, and I'll keep the music for myself. But if the game just plain takes too long to complete, I'll probably quit trying to finish it when I'm maybe 80. As of now, I actually am doing a smaller project (but it wasn't started by me). I FEEL like I'll keep interest in the project because I've planned much of it already and it excites the hell outta me, plus I know what my art will look like overall, and that also excites me. C. I've imagined that technology will be better yes. Wouldn't it make my game just run faster? D. Not quite sure what you mean in statement C and question D but I plan on finishing the art itself after decades, not the game. I don't plan on having it coded yet. When it does get coded in the future, it will probably be more efficiently coded. The reason I want it done in 2d (the hard way) is because I am in love with 2d video games, not 3d ones. There is still a cult following of 2d lovers (you most likely know that). It's not just nostalgia, it's for various reasons. I am basically, to the best of my knowledge, making the grandest game of pixel art ever made. No corporate deadlines. Money not involved. No other artists with either their silly opinions or their different art styles, just me and mine. No coders waiting and waiting, pressuring for me to finish my art--I'll find a dev team after I'm done with everything, hopefully ready to go, except for a few minor things I'd need to tweak for the code (that's why I'm trying to understand the major code issues with art right now). Thanks for asking!
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!