2D MMORPG - Basic at the moment
Well, i don't have a name for it yet.
I started this roughly about a week ago, i only done it for about a day then got bored and stopped until like 3 days ago.
This is being built from scratch, its a custom built client and server and im not using any pre-made engines.
I would first like to say the only thing from a RuneScape client i used was Class names, although these were refactored by Mopar so they aren't actually Runescape.
Now i have been building onto it and almost have the complete engine, there is no screenshots of gameplay since i havn't progressed that far yet.
Features:
PLEASE NOTE, ALL OTHER FEATURES/UPDATES WILL BE POSTED IN THE LOG.
UpdateServer:
This isn't a basic text based update server, when you load the client it will send the login packet with the update request. The server contains folders such as "0", "1", "2", "3" etc which are the cache request id's, these contain every file the client should have in the caches, this way i can just add new sprites or whatever into the folder and the server will know the client dosn't have that sprite or file, then it will send the bytes and the client will write it into the cache which is needed to be updated. I didn't bothered with crc's, i just used file lengths and requesting if it dosn't have all the files in the update server.
Advanced cache system:
I wrote the new cache system today, basically each sector of the client's cache contains a certain cache. For example sprites, music and other media will be contained in a cache while maps and objects will be stored in another. The main cache system is as follows;
ZipIO cache which contains sub-cache's, for instance "music", this subcache contains the music. The reason i chose ZipIO is because it's not only to use but it also is a good compression to use to reduce the cache size.
I tested the cache system before actually implementing it by simply testing the speed to read 400 map files from a subcache, each map file is appox 1kb and it took under 2000 milliseconds to read 400. So in a simple request for 1 or 2 maps it will load at a rate not even worth counting.
The client uses a simple decompressor to get the subcache data then process it for getting sprites etc, for example this is a simple sprite loader.
Code:
StreamLoader streamLoader = new StreamLoader(new Decompressor("content", "graphics").decompress());
Then the sprite class uses the ByteArrayInputStream along with datainputstream to get the file, and it takes next to no time.
When sprites are loaded they are kept buffered so they are not required to be loaded every single time, however things like music don't stay buffered as it's quite a bit of memory required.
Map editor/creator:
Well, this is a simple map creator i put together, it writes the maps out efficiantly and makes it alot easier to plot maps, i only added a few simple flat colour tiles to show it working, i will get textured tiles soon.
Map tiles are 25x25 pixels and the characters will be larger than these but it's more for detailing than 1 pixel per character.
You can click a tile to select it and then change the tile, object, or paint the selection.
Key:
Red outline means it's selected, the green tiles are simply grass i done select all then removed a few tiles and selected a few for the picture.
Picture: [Only registered and activated users can see links. Click Here To Register...]
I will post more updates soon, but it's pointless posting pictures of the game screen because it's not finished, it's basically a screen which has a basic login screen and that's it, since i don't have sprites or anything yet i havn't done anything.
__
__
__
If anyone feels they would be able to help with sprites then feel free to add me on msn, you can get my msn in my profile.
I don't want any help with the game itsself, just the graphic side of it.
__
__
__
Update log:
Quote:
31/1/09:
- Built a better rendering system, instead of single rendering which would have ment i would have to continously draw everything each time the map was changed or something, i created a class which allows multiple drawing. This will help for things such as interfaces and character drawing, so the client splits the screen into overlays, map tile rendering and game frame, aswell as an overlay for characters and text etc.
1/2/09:
- Built an interface handler, this is basically a class which allows sprites to be drawn at an x, y possition, it also handles rollover sprites, tooltip's and basic text.
- Sprites are loaded at the start, so they don't get loaded when needed any more which caused a tiny bit of processing lag.
3/2/09: - Re-wrote interface class, uses a format simular to RuneScape, in which each interface has a parent id, this is the actual interface id which is used to show the interface, then each parent contains a number of children for example sprites or text.
- Wrote item and npc classes.
- Started work on interface visual editor, so far it handles dragable input's, for example text and sprites, and also has save and load features.
- Wrote a class to draw the map, it uses your x and y coordinates then works out which maps it should load, for example if your on tile 20 on map piece 25 it would load the other 12 tiles from map piece 26 and display, this works in both axis.
3/2/09: - Re-wrote the update server, due to it not being as efficiant as it could be, now instead of the server checking the files the client has the server sends version files which contain the files names and lengths and the client checks them and replies if it requires any updates to the cache.
- Wrote login screen handling, it handles "rollover" abilities, simple text and will soon be updated with alot better sprites.
- Wrote a text handling class, since i couldn't be bothered to draw every single letter of the alphabet and all the special characters for each text style i wanted for now i just used the RuneScape text images, not the class i wrote my own since i use a different cache format etc.