Forum archive
.EXE Export
- Please Ken try and figure out how to get evaldraw to export .exe for the next feature.
Btw i love evaldraw it has helped me earn to program so much i could not live without it but the only thing that makes me stop is no .exe export
Thanks and I hope its not to much work Re: .EXE Export
If Ken adds the option to export EXEs, they will probably just be skimmed down versions of Evaldraw that remove the editing abilities and automatically run a script on startup.
But in all honesty, it's a lot of work that might not be really worth it. :-\- mikewas, you know you can make .bat files that load your .kc script when you click them? Does the same job as an EXE except your code won't be hidden.
Here's an example .bat if you don't know:
start evaldraw.exe yourScriptFile.kc /800x600 /window
Also, the evadraw.txt readme tells you more about various command line options. - but the .bat file just opens up evaldraw with my script and it is still editable
- Not if you use /runonly
Here are all of the cmd-line options:Command line options:
>evaldraw [.KC file] [/XDIMxYDIM] [options...]
Available options and examples:
/640x480 Select resolution
/win Run in a window
/full Run fullscreen
/qme Allows ESC to quit (for MoonEdit integration)
/runonly Disables the menu system and allows ESC to quit
/host Host 2 user server, waiting for join
/host:3 Host 3 user server, waiting for joins
/host:2:32123 Host 2 user server on TCP port 32123
/join Join server on localhost (local machine)
/join:localhost:32123 Join named server using TCP port 32123
/simlag Simulate lag on network connect (for local testing)
/simlag:250 Simulate lag; specify lag in milliseconds
/clip Load script from windows clipboard
Example: >evaldraw sphere.kc /800x600 /full - Hmm, I didn't know these things. However, the scripts can still be edited with something like notepad.
To prevent this from happening, just remove ALL the spaces and extra lines in your source file. The result will be one long, hairy string of code. It's readable, but who wants to mess with that?
Example:
void draw_world( float camx )
{
int fcamx;
int endx;
int x, y;
int x2, y2;
int x3, y3;
byte* dat;
fcamx = floor(camx);
endx = fcamx+21;
/* run through the tile map */
for( x=fcamx; x<endx; x++ )
for( y=0; y<10; y++ )
{
/* get real image coordinates */
x2 = ((x-fcamx)<<4)-(camx-fcamx)*16;
y2 = y<<4;
x3 = 0;
if( x2 < 0 )
{
x3 = -x2;
x2 = 0;
}
if( x2 > 304 )
{
x3 = x2-304;
}
/* choose a tile to draw */
switch( map[y][x] )
{
case 0: dat = &back_bmp.data[0];
break;
case 1: dat = &rock_bmp.data[0];
break;
}
/* draw the chosen tile */
for( y3=0; y3<16; y3++ )
{
if( !x2 )
memcpy( &double_buffer[ ((y2+y3)<<8) + ((y2+y3)<<6) + x2 ], &dat[(y3<<4)+x3], 16-x3 );
else
memcpy( &double_buffer[ ((y2+y3)<<8) + ((y2+y3)<<6) + x2 ], &dat[y3<<4], 16-x3 );
}
}
}
Becomes:
void draw_world( float camx ){int fcamx;int endx;int x, y;int x2, y2;int x3, y3;byte* dat;fcamx = floor(camx);endx = fcamx+21;/* run through the tile map */for( x=fcamx; x<endx; x++ )for( y=0; y<10; y++ ){/* get real image coordinates */x2 = ((x-fcamx)<<4)-(camx-fcamx)*16;y2 = y<<4;x3 = 0;if( x2 < 0 ){x3 = -x2;x2 = 0;}if( x2 > 304 ){x3 = x2-304;}/* choose a tile to draw */switch( map[y][x] ){case 0: dat = &back_bmp.data[0];break;case 1: dat = &rock_bmp.data[0];break;}/* draw the chosen tile */for( y3=0; y3<16; y3++ ){if( !x2 )memcpy( &double_buffer[ ((y2+y3)<<8) + ((y2+y3)<<6) + x2 ], &dat[(y3<<4)+x3], 16-x3 );elsememcpy( &double_buffer[ ((y2+y3)<<8) + ((y2+y3)<<6) + x2 ], &dat[y3<<4], 16-x3 );}}}
It's a bit tedious, but it works. Just remember to keep a copy of your scripts that hasn't been obfuscated. ;) - If you start to learn c++, you can combine voxlap and evaldraw libs to get close to the same effects.
My current voxel dungeon is being written in evaldraw and as I finish certain functions I'm translating them to C++ and using voxlap for the rendering.
I believe the evaldraw lib has everything else non-graphic wise, and voxlap's library has quite a few functions besides voxel handling. - Thanks for defending my time by providing alternatives, but it turned out not to be so hard to implement this feature. I simply copy EVALDRAW.EXE and append the current script to it. This doesn't result in any speed or size benefit, but it does succeed in reducing the file count.
Have fun waiting for the next release : ) - That sounds wonderful.
- thanks Ken im happy you didn't have to do a lot of work and cant wait for the release
- You know this could become popular in the indie gaming community with exe support. Evaldraw is pretty solid and I've tested it on various machines.
- I wouldn't be too sure of that for the moment. Most of the indie community gravitates between C# and C\C++. C# because of its link between PC and XBox 360 and C\C++ as they are the most extendible and trusted languages in the plain of existence. Don't get me wrong I use Evaldraw for pretty well anything as a test platform but as far as I can see C\C++ will nearly always be up the top and as Evaldraw is limited the the features that Ken puts in himself there really isn't much competition. Also not many people are open to the idea of voxels for some reason. I showed a fellow programmer some test code for the Voxlap05 engine and he merely called a low poly game. WTF!!! After an hour argument I finally got him to say that voxels and voxel technology itself are the future of game engines and that he should bow down to any programmer who creates an entire game engine out of them. lol. School is so fun! Also it is worth noting that I gave him the source code to Voxlap and he couldn't even create a sample game. Still Evaldraw however good that we think it is, and it really is really really really good don't get me wrong. Even in the indie gaming world I can't see it really taking off all that quickly if at all. LONG LIVE EVALDRAW!!!!!!!!!!!!!!!!!!!!!!!!
- The indie community is pretty diverse and broad these days, its a great introduction to C++ that younger developers could find useful.
Everyone has different taste in visuals. Some people are more into the ultra-real, high specs, cpu crushing engines. However there are plenty of people how appreciate old school graphics, its regaining popularity since the opposite has over saturated the market and been a lot of clones.
Evaldraw also runs on linux and MacOS through wine, and Evaldraw is free to use. I think it could get some attention. - The argument is futile we just have to wait and see.