Paperdoll
#1
Posted 10 November 2005 - 05:02 AM
#2
Posted 10 November 2005 - 05:14 AM
#3
Posted 17 November 2005 - 05:42 AM
i already run a few servers on it.
#4
Posted 13 December 2005 - 11:40 AM
#5
Posted 14 December 2005 - 10:31 PM
So. The game is broken up into a grid, much like all games. If you go from one location in the grid to an adjacent location, it unloads the information of the old location and loads data for the new one. So the user's computer would only download the sprites that are completely necessary, and no more.
So the idea is this: Break the game up into a smaller grid, so that the amount of data that needs to be downloaded is very small. The client runs a check to see which other users are in the area, dowloads from the server the sprites that match that user and no more. The client does not care about users that are not in the current grid position because they are not seen. Ignorance is bliss, and a minimum of work is done.
I cross-examine my idea with my view of the way the world works and I find problems.
So you don't want to load all the new information of each square on the grid every time you cross a border. So have a grid of grids.
Since I like to go to a lot of work on something so unnecessary and boring:
So the blue X is you. Say hello.
So you move to an adjacent square that is green. The client maintains all basic Green data files, but quickly checks for users in that area, and promptly downloads their sprites from the server. At the same time it erases the character sprites from the previous green square. Cross a red line however, and be subject to a loading time that is a bit longer, as entire tile maps and music files and basic sprites are loaded, as well as user character sprites from that grid.
Uh, I dunno. I take ideas and run with them. I'm not sure if I ran in the right direction, maybe I just threw my brain into the oncoming traffic of the crazy bird-cars in the other lane. They have quite an impact on my train of thought.
sum day ill eat ur cat ricko...
#6
Posted 15 December 2005 - 01:44 AM
So on a linear basis this is what happens in a typical game:
Note that to load an image into memory you create a blank "surface" which then has the image drawn on to it. After that you can take certain rectangles off of it and copy them to another surface, this is called "blitting".
Game Starts
Loads the tile sets (large bitmaps full of tiles) into the memory.
Loads all the other graphics as well.
Loads the map array into memory (all the basic data for all the maps like the name, numbers, revision numbers, tiles, etc.)
The server sends the players data to the player along with most of the data for every player on the same map.
The game loop starts (The game loop is the most important part, it is what redraws the screen/captures key input/etc.)
GameLoop
--1. Previous movement, data from server, etc. is processed
--2. Blit under tiles: This runs through the map's tile arrays and copies the tiles from the tileset's surface onto a buffer surface that the user never sees. (Called the back buffer.)
--3. Blit players: Players are blitted to their new locations from the spriteset's surface over top of the tiles onto the back buffer.
--4. Blit over tiles: all tiles that belong above a user get blitted over top of the current backbuffer.
--5. Flip buffers- The backbuffer is then blitted to the front buffer which is what the user sees. By "flipping" the back buffer onto the front buffer flashing of the screen is prevented because all the tiles and everything have been drawn, you are just copying a full image onto the front surface instead of doing a bunch of small blits for each tile/user/etc.
--5. Key presses are processed.
Loop Until User Quits
Game Ends
This is a simplified version of a game loop but it's basically how it works. As you can see you have basic idea. My concern in this regard was the memory consumption required to load yet another bitmap onto the screen and also to blit a whole new set of clothing onto the players (which would require new blits between 3 and 4). Currently the game is so poorly coded that it would be inefficient to use a paperdoll system because, since it has seamless maps, it blits out 9 maps (your map and the 8 maps around it) to the backbuffer every game loop. Then it takes a chunk of the back buffer with the user in the middle and blits that to the front buffer. It doesn't blit the players on the other maps but it blits out all the tiles and everything. This obviously causes major extra overhead for a) the memory consumed by the size of the backbuffer, blitting all those maps every gameloop as well as other little things. For now I really do not want to add to the current overhead of the game. (It takes up 80-100% of my CPU usage as well as ~155mb of ram.)
#7
Posted 15 December 2005 - 01:52 PM
Oh. Ok.
sum day ill eat ur cat ricko...
#8
Posted 15 December 2005 - 10:51 PM
Haha, did you catch all that?
#9
Posted 26 December 2005 - 08:10 AM
sum day ill eat ur cat ricko...
#10
Posted 31 January 2006 - 07:47 PM
sprites are tedious and predictable. try working a new angle please.
#11
Posted 01 February 2006 - 02:17 AM
Sprites are used in EVERY game whether you admit it or not. They are not limited to character images. So if you don't like them then just stop playing games and you won't have to deal with them.Where are sprites?
sprites are tedious and predictable. try working a new angle please.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users