Jump to content


Photo

Paperdoll


  • Please log in to reply
10 replies to this topic

#1 SniperTR

SniperTR

    Nub

  • Members
  • Pip
  • 8 posts
  • Location:Australia
  • Interests:CARZ! yeh

Posted 10 November 2005 - 05:02 AM

you should put paperdolling to make it original.
SniperTR Inc........

#2 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 10 November 2005 - 05:14 AM

I was considering this but with the wide variety of sprites we're using and the how much ram the game currently takes up, I don't think it would be a good idea. In the next one however I may add it. Depends on my artist(s)'s (if I ever find any) talent.

#3 SniperTR

SniperTR

    Nub

  • Members
  • Pip
  • 8 posts
  • Location:Australia
  • Interests:CARZ! yeh

Posted 17 November 2005 - 05:42 AM

you should try to do it, i can host you a server soon when i get my new internet, plus my computer(Server tower) has good specs.


i already run a few servers on it.
SniperTR Inc........

#4 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 13 December 2005 - 11:40 AM

I don't mean server ram, I mean loading the bitmap for it into memory takes up the width of the bitmap * height * bitdepth in bytes which can be huge, especially since there are a ton of other images in memory. We'll see what happens.

#5 Caseyweederman

Caseyweederman

    Moderator/Corridors of Time Admin

  • Admin
  • PipPipPipPip
  • 1,147 posts
  • Gender:Male

Posted 14 December 2005 - 10:31 PM

Hm... I keep trying to think of solutions, but being a pre-programmer (I swear, I'll start learning soon!), I can think of a very small variety of things which may or may not be entirely plausible.
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:
Posted Image
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 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 15 December 2005 - 01:44 AM

Lol. *wipes your brain off the window* :P :P Jokes. Even though you aren't a programmer (yes, I know you're going to start some time in the future maybe :P) this is at least along the lines of what to do/is done. I shall explain how it works. For the record, although I'm not sure if this is what you meant, no graphics/music are downloaded from the server they are all client side.

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, B) 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 Caseyweederman

Caseyweederman

    Moderator/Corridors of Time Admin

  • Admin
  • PipPipPipPip
  • 1,147 posts
  • Gender:Male

Posted 15 December 2005 - 01:52 PM

:blink:
Oh. Ok.

sum day ill eat ur cat ricko...


#8 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 15 December 2005 - 10:51 PM

:wacko: ISN'T IT CRAZY!? :wacko:

Haha, did you catch all that?

#9 Caseyweederman

Caseyweederman

    Moderator/Corridors of Time Admin

  • Admin
  • PipPipPipPip
  • 1,147 posts
  • Gender:Male

Posted 26 December 2005 - 08:10 AM

Wow. Seems to me sprites suck. Where are my polygons???

sum day ill eat ur cat ricko...


#10 Mizukage

Mizukage

    Fondusian

  • Members
  • PipPipPip
  • 626 posts
  • Location:The times between sleep and waking.
  • Interests:Ninja, anime and pie, in that order.<br><br>ask casey for more.

Posted 31 January 2006 - 07:47 PM

Where are sprites?

sprites are tedious and predictable. try working a new angle please.

#11 Drackir

Drackir

    Admin/Project Leader

  • Admin
  • PipPipPipPip
  • 1,519 posts
  • Gender:Male
  • Location:Canada

Posted 01 February 2006 - 02:17 AM

Where are sprites?

sprites are tedious and predictable. try working a new angle please.

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users