I hadn't noticed that. I guess one of the Admins holds this opinion of me, as nobody else has the power to change my topic tags I think.
: Maybe because I forgot to tag, or just because I multi-posted and filled in the info later (to avoid a tutorial interspersed by chat, that I could add chapter links to) or just because I hold some strong, and unusual, opinions that I will keep. (not that I insist everyone agrees with me on them) Like Object Orientation does not make code more reusable, good documentation does that. Or Instant Messengers and Mobile Phones are EVIL.
I've fixed them now.
---EDIT---
Correction... I can edit DarkKnightH20s left click tags and call him names anonymously, it seems... (of course I wouldn't)
:
---EDIT---
Hmm. Well, yes you could use C++, but I hate it, it's too Object Orientated and even COBOL is easier to read. You could use C, but I don't really see any advantage to writing C when you can build fast, clean, clear assembler. It builds quicker, is more within your own control and despite popular opinion, I find Assembler just as readable as C. I learned and used C when I needed code to run on Z80, 68000 and 80x86 CPU based systems, but if I'm targeting only one CPU family, I don't need C.
As I've already said, you could use "useful" languages, which are more readable than Assembler, like Basic, or Pascal. XD But since the first things we are likely to want to do, is export code that is already in the game.exe or server.exe, and add to it (maps, levels, items, ages, file & data formats etc. etc.) and know that our DLL is isolated, and works just as it did when it was part of the main exe, before we port that code to a higher level language... Assembler is where I shall start.
Besides, most people here wanted to write in C# or VB.net when I mentioned importing DLLs, which is clearly not practical... you want C++ or C, I want Basic or Pascal (but I'm fine with C)...
x86 Assembler is one language we all
have to be familiar with if we are even going to attempt this. If we are not comfortable with Assembler, Olly will be too meaningless to achieve the connections between our DLL and the main game. So x86 Assembler it is for Part 1.
What should be Part 2?
- Using DLLs written in a variety of other languages?
- Loading DLLs, and importing their functions dynamically? (using LoadLibrary() or LoadLibraryEx())
- Exporting functions and data from game.exe to a DLL?
I have some I've built in Dev-C++, (and they are C++, rather than C as well; interestingly) and some I've built in FreeBASIC, I'd like to have some in Free Pascal and maybe VB6, as that used to be popular here before MS went all .NET on us. XD
I can build BCB DLLs, but there's too little difference between that and Dev-C++ unless you use the VCL. (There's no point for PT I think) I don't have Delphi or Visual Studio, and don't see any reason to pollute my existing Development Environment (Borland / GNU) with MS nonsense. Lazarus is sufficient for my Pascal needs.
I have exported some sections with ease. I've Implemented most of the common KPTTrans code section patches in DLL form. I've written up patch code others have suggested putting in the exe as a DLL... but probably exporting all SQL functions in the server to a new PTSQL.dll that reads registry or ini configuration and doesn't need "hexing" and / or could be re-targeted at a different SQL database engine would be far more useful and interesting as a study.
If you're concerned with the client and the way it looks and feels on a users PC, then the LoadLibrary() routine, and a means of locking to specific DLL checksums would be far more useful to you. The ability to choose software, Direct3D or OpenGL as the rendering engine, setting volume levels and number of channels on sound, dynamic resolution and render (fog) distance all spring to mind and would make a great difference to performance vs. quality decisions for the users.
Each of these things needs discussing... but which should be given the greater priority for Part 2, I'm not yet sure... I hope the comments here will give me an idea of what people want most. Certainly, there is too much there to place in a single thread. No???