Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 12-12-2005, 09:48 PM   #1 (permalink)
Rafkin
Registered User
 
Rafkin's Avatar
 
Join Date: Mar 2004
Posts: 20
Rafkin is on a distinguished road
Arrow Game project. I need some help.

Hi. I have been saying for sometime now that I wanted to create my own online game. I have worked out a few of the details of how the game will look, and act, and I finally want to get started on the project. Now, I know a few of you are already thinking "Good 3D games take lots of programmers and many years to develop." I am not going to try to delve into the 3D realm, and am instead sticking to a isometric game using bitmap sprites. It's much simpler and gives me the ability to offer what I want to offer the users.

What I have in mind is creating a client and a server that are both free to download. This will allow anyone who wants to host a server to be able to from thier own home computer, or from a server they may have that can handle it. In fact, while the client and the server programs are free, where I plan to generate income is from renting server space for those who want a map up on a more stable, more capable, and more permanent server that can handle many connections as opposed to on their dialup which can handle 4 or 5 players tops. The feature that this game would have, is the ability to not only create your own maps using floors, walls, and objects from the default selection, but also the ability to create your own floors, walls, and objects easily with an editor that is similar to MS Paint.

I think, the best place to start would be the image editor itself, followed by the map editor, and then the client and finally server. The thing that is making this a bit more complicated is that I want to create my own file formats, for the objects. Basically I want to create a file that contains multiple images for multiple objects, floors, or walls. Each image itself would be in bitmap form, with each byte being a number that coresponds to a pallet entry on a global 256 color pallet. I say global, because I want this one pallet to be used for all images. I may hard code the pallet into the program or more likely have it in a single image file that would be the first to load, so that even it is editable by those who know what they're doing.

First a little info on how the final game will work. Basically, I will have a isometric view turned 45 degree's to the side. So you'll be facing North-East instead of due North. In the game, with a click of a button or keypress, you can turn the camera angle to any of four views, all isometric. This would be North-East, North-West, South-West, and South-East. As such, the map will need to be drawn in the correct order depending on the camera viewpoint, and each object and floor will have one, two, or four viewpoints. For objects that look the same from all angles, only one is needed. Objects that look the same from North-East and South-West view, but different for the South-East and North-West view, two images would be needed. And objects that look different for all four views will need four.

Add to this that while floors need only one image per view, objects will need two, acting as two layers. The first layer will be drawn first, followed by any player who is occupying the same space, followed by the second layer. This allows one to draw objects that surround a player, such as a barrel, or a chair with an arm that covers part of the player. There may be occasions where a floor tile might want this same effect such as when a player is wading in waist deep water, so I may consider doing the same there.

I've already figgured out a bit of how I'd like the file format to be, though I'm sure it could use some improvement.
First I'll start off with file header:
01h - 9 bytes - Version "v01.xx.xx" - This will be version information.
0Ah - 3 bytes - File Size - This is to compare with actual file size to check for corruption
0Dh - 1 byte - Number of objects
0Eh - 1 byte - Type of objects (0=floor, 1=object, 2=wall, 3=player) - May add more as needed.

There will be only one type of object per file, named floor.* or wall.* but the byte is in there again to check if someone has changed the file name or done something else.

Then at byte 10h I'll start a table with a list of objects. Each object in this table will need to be same number of bytes, so I'll go with the first byte being object number, then several flags such as "walkable", "sittable", "gettable", and "tradable". I may come up with more later, so I'll padd these a bit to make room if I do. Then will come several bytes that simply tell the byte of the file for the start of each image. Sort of like Pointers. Objects that only need one image, will have all four pointing to the same byte. Objects that need four will have the four pointing to different locations within the file. There will also, for objects that are gettable (can be held in inventory), a fifth pointer to a 32x32 2D inventory image, which will show up in inventory when the object is held.

Then of course the images will have other information.. the Object will need a X and Y offset to show where the object is in relation to the position on the map. And each layer in an object will need X and Y offsets to show where they should be drawn in relation to the Object's X and Y coordinates. There is also, a need to figgure in the Players X and Y offsets in relation to this object, for if they are occupying the same space, we may need to move them. Such as on top of the table, or waist deep in the river, etc.

As you can see, I've got one heck of a project to work on, and I'd like to see if I can find some help, first in creating a window with an editor to create this file format, and how to load these images from this file format and have them share the same pallet, including a transparent color, and make them editable. Can anyone help me get this off the ground? I've looked for tutorials but most blitblt or other painting tutorials have me working with a class object that I gather is getting the pallet from the image it's loading. Where as this file format won't have the pallet included.

Any help or pointers would be good. Also, any suggestions on how I can improve what I've described so far?

P.S. if anyone is wondering how I will tell which object viewpoint to show when even the map viewpoint isn't certain.. If I number the map viewpoints from 0 to 3, and the object view points from 0 to 3.. then as they plop the object onto the map and turn it, I can take the current map viewpoint, the object viewpoint as it relates to the map, add those togeather, devide by 4, and the remainder will be the object image to use. Simple, huh?

Also, I know I've given too much info away in this single post.. there's more I havn't mentioned but I kinda don't want to make too much information on this game publically available untill I get it off the ground. If anyone wants to help with any of this, I am willing to share the information. Again, it's not the game itself that I plan to use to generate income, but rather hosting servers for those willing to rent.

Oh yea.. almost forgot. I'd like to do this in C or C++, and I now there's an option of using DirectDraw, which if i can find a way to feed it the proper images from the format I just laid out, I have no quams to figguring out how to use it. Otherwise, I'll need to figgure out how to get Blitblt to work.
Rafkin is offline   Reply With Quote
Old 12-12-2005, 10:19 PM   #2 (permalink)
Rafkin
Registered User
 
Rafkin's Avatar
 
Join Date: Mar 2004
Posts: 20
Rafkin is on a distinguished road
I just re-read what I typed, and while I am most certainly willing to admit to being an air-bag, I somehow managed to type all of that without being clear what it is I needed.

First step, I need to figgure out how to create a window with nothing but a bmp file shown. This will be the background of the object editor.

Second step, I need to figgure out how to blit portions of a bmp file to show the buttons and other controlls. This is so that even the editor is skinable, as will be all the windows.

Third step, I need to figgure out how to make a simple MS Paint style editor that handles two layers and will show two images with a transparent color in the main window for editing. Complete with magnifying, color fill, line, pencil, a color pallet to pick the color from etc..

Fourth step, I need to figgure out how to save from and read from the image file format I listed above.

Fifth step, I need to add any other final touches to make it fully functional, such as setting those flags etc.

After I get the editor working, I'll make several files to work from, then I will need to figgure out how to do the map editor. By the time I get to it, I should be able to use some of the information I learned from doing this object editor to apply to the map editor.

I'm not looking for anyone to do all the work for me.. Although any help would be appreciated. I do not own a company and cannot compensate, sorry.

What I would like, is any information that might help me make the above happen. I have experience with C and C++, though admittedly while I've made windows appear, and dialog boxes, and run through several tutorials, I have never actually created a "usefull" application before. This will be my first application that actually does something besides look pretty.
Rafkin is offline   Reply With Quote
Old 12-13-2005, 06:58 PM   #3 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Since you mention DirectDraw, am I correct in assuming you want to write and deploy only on Windows?
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 12-13-2005, 08:33 PM   #4 (permalink)
Rafkin
Registered User
 
Rafkin's Avatar
 
Join Date: Mar 2004
Posts: 20
Rafkin is on a distinguished road
Although ports to other platforms in the future may be a decent idea, for now my only target is the Windows enviroment.

Having said that, the server will want to come in two versions. One for Windows, which will be the standard that most people would use, and one for unix for those who have a server online, or for my own servers which will be unix or linux based.

The clients, map editors, object editors etc, will all be windows based.
Rafkin is offline   Reply With Quote
Old 12-13-2005, 09:40 PM   #5 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 598
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
If you're going to want to make a game, you might as well go about learning DirectX (windows only) or OpenGL (cross platform but no audio) now. Both API's have methods for creating a rendering context in a window for you to manipulate images in for your editors.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 12-15-2005, 09:16 PM   #6 (permalink)
Rafkin
Registered User
 
Rafkin's Avatar
 
Join Date: Mar 2004
Posts: 20
Rafkin is on a distinguished road
I just wanted to update the thread and let you know that my lack of posting doesn't mean I havn't read it, or am ignoring it. I am looking up directdraw tutorials, and as soon as I have a window that opens up with the background bmp, I'll re-post here for figguring out how to take an array of bytes that represent pallet entries on a global pallet and copy them to surfaces.
Rafkin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Project Lost Tomorrow recruiting Programmers and Sound Engineers chewtoy Standard C, C++ 1 12-07-2005 05:18 AM
Where to get information on game programing online for linux. slashdot Platform/API C++ 0 07-10-2005 12:02 PM
Project Management Project DavH27 All Other Coding Languages 14 08-18-2004 05:58 AM
Suggestion: Project Thread DavH27 Lounge 2 08-17-2004 10:23 AM


All times are GMT -8. The time now is 04:02 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting