RTsoft Forums  

Go Back   RTsoft Forums > Codedojo Game Development Area > CodeDojo: Programming

CodeDojo: Programming Talk about how horrible the Dink source is and other game makin' type things.

Reply
 
Thread Tools Search this Thread Display Modes
Old 07-11-2003, 07:17 AM   #1
Seth
Administrator
 
Seth's Avatar
 
Join Date: Jul 2002
Location: Japan
Posts: 1,135
Exclamation

I'm planning to release the Dink source under a very liberal "do what you want with it" license very soon. I figured I'd better put up a forum so people could all complain and crucify my programming techniques (from the ancient past, mind you!) in one place.
__________________
Seth A. Robinson
Robinson Technologies
Seth is offline   Reply With Quote
Old 07-11-2003, 08:34 AM   #2
Guest
 
Posts: n/a
Default

1st
  Reply With Quote
Old 07-11-2003, 02:12 PM   #3
Guest
 
Posts: n/a
Default

Wow! I've been waiting for this for a loooong time
  Reply With Quote
Old 07-12-2003, 02:29 AM   #4
Guest
 
Posts: n/a
Default

Seth, what caused you to suddenly release the source code?

-- Merlin (Andrew)
  Reply With Quote
Old 07-12-2003, 03:13 AM   #5
Guest
 
Posts: n/a
Default

Just thought I'd post this here in case Seth had any comments on it. *I posted this on the dink network a little while ago.

------------

Just happened to browse onto the site and what do I see. Well anyways, I can't afford the time to get involved in another project like this after working on WDE (had to force myself off that project). Besides, I really need to start and finish my own game. But I thought I might give everyone a few suggestions on what might be done.

First off the suggestion of some source control is a very good idea. You definitely don't want the codebase splitting off into multiple directions.

The absolute first thing that should probably be done is clean up the source code. Don't do anything else until this is done. Looking at RTSoft's board I saw that Seth had said that there were 30,000 lines of code in mostly 3 files. 3 files is WAY too few files for that amount of code, especially with C++. You will need to split these 3 files in probably 10 times that to even come close to organising them. C++ classes should also be implemented (moreso at least) to contain the code for these files. Looking at the WDE might help in this regard, but perhaps not.

One thing that should definitely be done is port dinkc to a proper interpretter by using a tool such as lex or yak. I'm sure there's better since from what I've seen of those two they are rather difficult to get to work with without a lot of work. The only one I've worked with is Visual Parse which is simply awesome but at $500 a copy not a viable solution. Unless you've had a class on compiler design this could be a difficult thing to set up.

Graphics: 16-bit/32-bit color. I would recommend supporting both but you should give preference to 16-bit for speed and to reduce download size. Adding jpeg support might be an interesting addition to reduce file size. Higher resolutions are not possible without changing the dink format and so should be probably not be done. You also wouldn't want to switch the code to directx 8 or 9 since you won't be using any of the features in them. Better to keep a wide userbase by not requiring users to install them.

Porting: Since someone mentioned porting to other platforms you must keep in mind the game is coded in directx. If you do intend to make this work on other platforms you'll need a C++ cross platform library such as SDL. Allegro might also work although I don't know anything about it. This change should be done to the base source code if done. Splitting off the source code is not a good idea.

Sound/Music: I'm not sure if I can recommend this or not as it will mean very large downloads. Mp3 support should probably not be considered due to license issues and file size. Ogg vorbis support would probably work well. Those files tend to be half the size of comparable mp3s. It's also license free. For implementation you can either choose to use libraries such as fmod or the ogg vorbis library. The ogg vorbis library would be my choice although using fmod would allow support of many many different formats (mp3s, ogg, mods, midi, etc).

Movie playing: choose a high quality codec like divx (such as xvid). This will still absolutely wreak havoc on download sizes but is much preferrable to using mpegs or old avi files. Make sure to not require the codec to be installed but rather is included with the new game. Also make sure of the licensing before choosing a format.

Also, I would recommend splitting off the exes so that you keep the old dink.exe and create a new one. Unless you want to reproduce all the bugs (and I guarantee this will be problematic if you want to make real improvements to dinkc) this is probably the best solution. Maintaining the buggy old code inside the cleaned up code would just be a nightmare. And I'm not sure you can claim to be cleaning up code if you leave bugs in.

The dink editor: If you make any major changes to the dink file structures you will break both WDE and dinkedit. So are you going to update both or not.

File formats: I would recommend eventually changing the file structures so that the dink.dat and map.dat both fit into one file. Adding support for multiple maps seems like something that is desirable. The map.dat also only utilizes on average maybe 10% of the file efficiently. Whether you want to implement some of the features the extra data was for (sprite rotation, etc) or remove them is up for you to decide. You should probably also eliminate the .ff format (microsoft fastfile actually) in favor of some comprehensive wad format for all files. That would also eliminate the need for .d files which are compressed .c files, not compiled .c files.

Removing the limit on sprites and only using the space necessary would also be good. I would note that unless someone has a lot of time to spend you probably don't want to go messing with these files. The limit on tiles could also be removed (rather easily actually). You shouldn't even think of the possibility of eliminating screen scrolling as that would break nearly everything.

Really though, I'm not sure if it's worth it to change the file formats. Might as well start coding a different game from scratch than make major changes to these.

Well I'll stop here. I'm not in any way saying this is how things should be done rather that these are simply some ideas to discuss. I'm sure many people have other/better ideas since I'm just spouting these ideas off as I type.

-------------------nexis@comcast.net
  Reply With Quote
Old 07-12-2003, 04:55 AM   #6
Seth
Administrator
 
Seth's Avatar
 
Join Date: Jul 2002
Location: Japan
Posts: 1,135
Exclamation

To answer Merlin about why I decided to release now, I dunno, I just had some free time. Been planning to release it for a while, and now that it's pretty obvious I'll never find the time to go and clean it up/fix bugs, I might as well at least give others the chance to do so before it's not totally useless to anybody.

What really stopped me from releasing it before now was thinking someone would try to make a Dink II, (something I plan to do at some point) and otherwise abuse the copyright and ownership of Dink Smallwood and its related media.

But I think my license I've written makes it pretty clear they can't do that.
__________________
Seth A. Robinson
Robinson Technologies
Seth is offline   Reply With Quote
Old 07-12-2003, 04:23 PM   #7
-WC-
Lesser Knight
 
Join Date: Jul 2002
Location: Your moma's house
Posts: 42
Send a message via ICQ to -WC- Send a message via AIM to -WC- Send a message via MSN to -WC- Send a message via Yahoo to -WC-
Default

You are aware that there will be 5 million engines floating around here, right? Just got practice, I might try to re-write your engine code, but I doubt I will release it.
__________________
--WC
-WC- is offline   Reply With Quote
Old 07-12-2003, 08:37 PM   #8
Seth
Administrator
 
Seth's Avatar
 
Join Date: Jul 2002
Location: Japan
Posts: 1,135
Exclamation

Fragmentation was definitely an issue, but now that it's a six year old game... <shrug>

I don't think it will really happen, probably only one or a few versions will see much distribution (it would have to be GOOD, probably released by a self formed group/team/alliance, could be a sourceforge project, or multiple source forge projects by different people) or matter much even if it does.

I think people will have fun looking over the source and being amazed that the game worked and LOL'ing for a week or so at it.
__________________
Seth A. Robinson
Robinson Technologies
Seth is offline   Reply With Quote
Old 07-13-2003, 11:41 AM   #9
Guest
 
Posts: n/a
Default

but you'll be amazed what an opensource community can do nowdays to ugly code, its like plastical surgery, with exception that its free!..

and most/all of what you said nexis is correct..
  Reply With Quote
Old 08-14-2003, 02:10 AM   #10
sim
Serf
 
Join Date: Jul 2003
Posts: 4
Default

why do some people complain about the code i mean the game works its fun to play and it worked i think seth did a pretty good job with the code
__________________
Sim
sim is offline   Reply With Quote
Old 08-20-2003, 03:01 AM   #11
Guest
 
Posts: n/a
Default

Have you even seen the code?
  Reply With Quote
Old 01-27-2004, 07:40 PM   #12
Guest
 
Posts: n/a
Thumbs up

Hey, I started to read that article that was posted here. I read the part about so much code in only 3 files and it should be placed in about 10 times that....( I'm not a programmer, I would love to be, I taught myself basic back in 1988, I'm 45, soon to be 46... I don't know where to start... just some background real quick) It seems to me that if you can condense that much into three files and it works, You truely have a touch of genious... my hats off to you Seth.. by the way... I would like to speak to you about developing something for me...
  Reply With Quote
Old 01-27-2004, 07:48 PM   #13
Ahso Rottenfeather
Serf
 
Join Date: Jan 2004
Location: Michigantown, IN  USA
Posts: 2
Send a message via MSN to Ahso Rottenfeather
Default

one more thing... I am downloading Dink right now so I can try out the game... I'm an old rpg playin fool... been playin em since as far back as I can remember... I just love em...
Ahso Rottenfeather is offline   Reply With Quote
Old 01-27-2004, 08:28 PM   #14
Ahso Rottenfeather
Serf
 
Join Date: Jan 2004
Location: Michigantown, IN  USA
Posts: 2
Send a message via MSN to Ahso Rottenfeather
Default

Why won't it show that there is a new post in this category?
Ahso Rottenfeather is offline   Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dink Smallwood Source License Seth CodeDojo: Programming 9 07-16-2003 03:47 PM
FQ 0.94 released, Flash source Seth Funeral Quest 4 03-13-2003 12:33 AM
Source Code Wavesphere Dink Smallwood 4 10-27-2002 09:13 AM
Dink Smallwood source code Phoenix RTsoft Tavern 11 07-28-2002 03:28 AM


All times are GMT. The time now is 11:57 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.