Forum archive
WinMain.exe or Voxlap_DLL.exe???
- I'm playing with good old VOXLAP again.
This time I'm trying to make a DLL system, inspired by Hazards Voxlap.Net Engine but in reverse...
The system, at the momment :
.EXE
-all WinMain code
sound
windows handling
graphics interface
input
Load DLL and export functions to
-Voxlap
all data and functions associated with
-KPLIB
all loading/storage functions
From this an DLL is loaded which contains
-initapp
-uninitapp
-doframe
-DLL_Init
takes objects that give access to -Most- functions in .exe (see above)
This works fine. I have simple.c now compiled as a DLL and works great!
However I have just implemented MOST of justfly and have a slight problem... two functions access internal/hidden data within Voxlap (functions for darkening areas when they are shot) so I just commented them out. Other then that it also works perfectly!!!
So whats my question? Well what I was going to do was to have the 'hidden' data stored in one of the objects that gets sent to the DLL. Problem solved.
Then, this morning, I realised that I could have an alternative system.
Instead of having all the Voxlap code in the main .EXE I could just let people link to it in there .DLL. This would create a WinMain.exe where ANY code that has used this base can be dynamically loaded and execute.
How to decide? Well how much code is available that uses WinMain.cpp??? Not many of kens apps do, and Toms stuff (Antibot etc) does but not all of it will compile cos some libraries have been left out?
All opinions welcome! Open discussion on software design and priciples welcomed!!! Well how much code is available that uses WinMain.cpp??? Not many of kens apps do ...
Nearly everything I've written since 2001 that has some kind of graphics uses WinMain. Here's a list of projects that use WinMain: PingBall, EvalDraw, Globe, Slab6, Rubix, Kcirc, Kube, Checkers, Kpic, KC, KS2, Voxlap (VoxEd, KWalk, Game).
Tom has used WinMain extensively as well, including: MoonEdit (using a modified WinMain), Voxlap CaveDemo, GreenPill, AntiBotic, InvSeed, TexGen, PiSynth, GenEdit, Topo, SpaceGui, Labxd.- Yes, I understand that all your apps a re written using WinMain.cpp. This is the reason for WinMain.cpp existing of course :)
But not all of the projects are available as source was my point. However it seems that no-one is really interested in the system so I will keep working with the VOXLAP and KPLIB code in the main .EXE as this posses a more interesting design challenge :D
This code is of course still compatibile with *MOST* code written that uses winmain, as initapp, uninitapp & doframe are taken from the DLL. Incompatability arises for cases when 'extern' is used to acces an internal variable. Example of this is game.c for VOXLAP where it is possible to set which CPU to optimise for. In cases like this I am either commenting out or writing support methods to create encapsulation. - Hello again, one last try before I give up.
Is anyone interested in VOXLAP games and other projects being developed?
At the moment a few people make the occasional comment regarding Kens code but these all seem very isolated and just "for the fun of it" (which is cool...). Reason I ask is I have now graduated and in full time work. In the interim I left developement as was too busy trying to make money to move half way across the country and start my new job :)
Now I have the time I'm trying to decide what to work on... Does anyone give a stuff about the game I started to make? Is anyone interested in a DLL solution so that we can all make lots of little mods around a single solid base?
Sorry about the down beet tone of this post. Just very disappointed at the lack of comment from my previous post about the DLL idea.