This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
181
General ENIGMA / Executable Icon and Description on Windows
« on: August 21, 2013, 12:50:56 pm »
I have managed to get exe info and an icon onto executables by simply creating a resource.rc and resource.h under Win32 and linking the rc file from the Win32 makefile. Now the only problem is I need to obtain EnigmaStruct with GameSettings in resource.rc for it to know what values to give the exe.
Should I move this to the compiler source and have compileEGMf write the resource.rc file itself to Preprocessor_Environment_Editable and then link it in?
Joshfag, halp ~
UPDATE: I have now got it working, compile.cpp when it writes modes and settings now writes the exe and icon info to a Resources.rc in Preprocessor_Environment_Editable which is later linked from the SHELL/Makefile

I just need to know if this is how it should be done and if it is ok if I commit it like this, and should I include guard this to only do it when your on Windows, etc. Joshfag, answer me back ~
PS: Also I did not use Studio's icon that is the one packed into the GMK file and passed to EnigmaStruct
Should I move this to the compiler source and have compileEGMf write the resource.rc file itself to Preprocessor_Environment_Editable and then link it in?
Joshfag, halp ~
UPDATE: I have now got it working, compile.cpp when it writes modes and settings now writes the exe and icon info to a Resources.rc in Preprocessor_Environment_Editable which is later linked from the SHELL/Makefile

I just need to know if this is how it should be done and if it is ok if I commit it like this, and should I include guard this to only do it when your on Windows, etc. Joshfag, answer me back ~
PS: Also I did not use Studio's icon that is the one packed into the GMK file and passed to EnigmaStruct
182
General ENIGMA / Java Plugin Freezing Explanation
« on: August 14, 2013, 10:56:11 pm »
I just want to explain to everyone, why it is that some of you may have had problems with the plugin freezing while loading.
I have currently been building the newest LateralGM jars targeting Java 7. When I made this change several months ago, the compilation speeds of LateralGM and its general performance drastically improved. But a new issue arose.
You see we use JNA which is a noobs wrapper to JNI for goobers too lazy to do shit themselves. JNA is used for native callbacks to our compiler library, or compileEGMf, extension may vary depending on platform. This means when I have been compiling LGM for 1.7 the boobs on 1.6 and 1.5 have been running into a freeze at plugin loading, for whatever reason, by they a macfag on an OS that can't even handle running the correct Java version, and no I don't mean PowerPC's, I mean MacOS Lion, gregfags computer.
I will from now on target Java 6 when compiling LGM, but no lower, as I do not want to force the slow lagginess of Java 5 back onto everyone.
I have currently been building the newest LateralGM jars targeting Java 7. When I made this change several months ago, the compilation speeds of LateralGM and its general performance drastically improved. But a new issue arose.
You see we use JNA which is a noobs wrapper to JNI for goobers too lazy to do shit themselves. JNA is used for native callbacks to our compiler library, or compileEGMf, extension may vary depending on platform. This means when I have been compiling LGM for 1.7 the boobs on 1.6 and 1.5 have been running into a freeze at plugin loading, for whatever reason, by they a macfag on an OS that can't even handle running the correct Java version, and no I don't mean PowerPC's, I mean MacOS Lion, gregfags computer.
I will from now on target Java 6 when compiling LGM, but no lower, as I do not want to force the slow lagginess of Java 5 back onto everyone.
183
General ENIGMA / GMX Support
« on: August 13, 2013, 09:58:13 pm »
Just a little side note to everyone, I am implementing GMX support to LateralGM, you will be able to save and load Game Maker Studio projects in a few days...

However, some options may be cleared, this feature in LGM is really only for downgrading your project to GMK. My documentation of the format can also be found on the Wiki.
http://enigma-dev.org/docs/Wiki/GMX_Format

However, some options may be cleared, this feature in LGM is really only for downgrading your project to GMK. My documentation of the format can also be found on the Wiki.
http://enigma-dev.org/docs/Wiki/GMX_Format
184
General ENIGMA / Stop button and other callbacks for the ENIGMA/LateralGM plugin
« on: August 13, 2013, 12:12:10 am »
Well, threads in Java and C++ don't have any insta-kill call that you can just kill a thread like a process from task manager. I am thinking compileEGMf should be added a compileEGMfStop, as pausing and resuming the thread can easily be done from the plugin and it should work like game_end but then the only thing is the stop button won't do anything while you are in the middle of compiling. there is just no effective way to kill the thread. I am assuming compileEGMf is also what should implement the setWorkingDirectory callback. Just looking for some input here Josh.
185
General ENIGMA / Proper working directory and output messages
« on: August 09, 2013, 03:02:00 pm »
You decide.
186
General ENIGMA / Game Maker 8.1 uses half the ram ENIGMA does
« on: August 08, 2013, 01:58:39 pm »
187
General ENIGMA / Patching and rebuilding the portable ZIP
« on: August 08, 2013, 09:44:07 am »
These are instructions are on rebuilding the portable ZIP when new LateralGM versions need included or other bug fixes/changes.
Patching and rebuilding.
Step 1
Download and install 7zip, if you already have it, continue to the next step.
http://www.7-zip.org/download.html
Step 2
Open 7zip and navigate to the directory where the you ENGIMA's portable ZIP located, right click and hit 7zip->Open Archive. If you don't have a copy of the latest portable ZIP just get it from the link below.
http://enigma-dev.org/downloads/2013-05-21/ENIGMA-Installer.exe
Step 3
Apply your changes to the archive, make sure you do not run LateralGM or ENIGMA or it will download the repository and you'll bloat the ZIP and defeat the purpose. You can also extract the entire ZIP and then rebuild it with 7zip by leaving the default compression and simply enabling "Create SFX" under "Options" to create the self extracting zip as an executable (*.exe)
Step 4
Ok we are all done with that then!
Hacking the ZIP icon, description, and copyright information.
Step 1
Download and install Resource Hacker from the link below, if you do not already have it, which is the program we are going to use to do this. Scroll down the page at the link below if you can't see the setup, its there, just scroll down a bit.
http://www.angusj.com/resourcehacker/
Step 2
Open Resource Hacker from Start->All Programs and hit File->Open then navigate to and open the self extracting ZIP you created. You can also just right click it in Windows Explorer and select "Open In Resource Hacker" it installs an option there by default, for me it does anyway.
Step 3
Make your changes to the exe, set the icon, and the copyright info, modify dialogues, etc.
Step 4
Save your changes to the exe, and reupload the ZIP somewhere and you're done.
Patching and rebuilding.
Step 1
Download and install 7zip, if you already have it, continue to the next step.
http://www.7-zip.org/download.html
Step 2
Open 7zip and navigate to the directory where the you ENGIMA's portable ZIP located, right click and hit 7zip->Open Archive. If you don't have a copy of the latest portable ZIP just get it from the link below.
http://enigma-dev.org/downloads/2013-05-21/ENIGMA-Installer.exe
Step 3
Apply your changes to the archive, make sure you do not run LateralGM or ENIGMA or it will download the repository and you'll bloat the ZIP and defeat the purpose. You can also extract the entire ZIP and then rebuild it with 7zip by leaving the default compression and simply enabling "Create SFX" under "Options" to create the self extracting zip as an executable (*.exe)
Step 4
Ok we are all done with that then!
Hacking the ZIP icon, description, and copyright information.
Step 1
Download and install Resource Hacker from the link below, if you do not already have it, which is the program we are going to use to do this. Scroll down the page at the link below if you can't see the setup, its there, just scroll down a bit.
http://www.angusj.com/resourcehacker/
Step 2
Open Resource Hacker from Start->All Programs and hit File->Open then navigate to and open the self extracting ZIP you created. You can also just right click it in Windows Explorer and select "Open In Resource Hacker" it installs an option there by default, for me it does anyway.
Step 3
Make your changes to the exe, set the icon, and the copyright info, modify dialogues, etc.
Step 4
Save your changes to the exe, and reupload the ZIP somewhere and you're done.
188
Announcements / XInput, Gamepads, and Windows Joysticks
« on: August 07, 2013, 09:12:09 am »
Well I implemented and finished up XInput and DirectInput extensions for Windows.
The constants...
http://enigma-dev.org/docs/Wiki/Gamepad_constants
The functions...
http://enigma-dev.org/docs/Wiki/Input_Functions
Greg has tested them already and we know they work, even from an emulator or virtual machine. Gamepads currently only support Xbox 360 controllers and only on Windows when you enable the XInput extension. You may connect up to 4 devices at any given time, but you should query xinput using the gamepad function provided to see the max number of gamepads you actually can connect. Everything is well documented for you guys, happy programming!
Also, here is a map of the control constants (right click->View Image to enlarge)...

Here is a simple little code example that you can move an object around with the left axis and run with the letter 'A' using.
The constants...
http://enigma-dev.org/docs/Wiki/Gamepad_constants
The functions...
http://enigma-dev.org/docs/Wiki/Input_Functions
Greg has tested them already and we know they work, even from an emulator or virtual machine. Gamepads currently only support Xbox 360 controllers and only on Windows when you enable the XInput extension. You may connect up to 4 devices at any given time, but you should query xinput using the gamepad function provided to see the max number of gamepads you actually can connect. Everything is well documented for you guys, happy programming!
Also, here is a map of the control constants (right click->View Image to enlarge)...

Here is a simple little code example that you can move an object around with the left axis and run with the letter 'A' using.
Code: (edl) [Select]
// demonstrates using the 'A' button on player 1's Xbox 360 controller to move a player around the screen
var spd, lhaxis, lvaxis;
lhaxis = gamepad_axis_value(0, gp_axislh);
lvaxis = gamepad_axis_value(0, gp_axislv);
spd = sqrt(lhaxis * lhaxis + lvaxis * lvaxis) * 5; // calculate the magnitude
spd += gamepad_button_check(0, gp_face1) * 15; // when player is pressing 'A' speed will increase 15
direction = point_direction(0, 0, lhaxis, lvaxis); // use the value of the left axis to determine the player direction
x += lengthdir_x(spd, direction); // use the horizontal position of the left axis to throttle horizontal speed
y -= lengthdir_y(spd, direction); // use the vertical position of the left axis to throttle vertical speed
189
General ENIGMA / Default Font Glyph
« on: August 06, 2013, 04:24:15 pm »
Some of you may not be aware as you have not much interaction with the plugin to LateralGM. canthelp discovered that the default font is rendered inside the plugin using Java AWT, you see ENIGMA uses sprite fonts, like every other game engine including Game Maker. So for there to be a default one, the plugin takes the default Java font and renders it and passes the glyphs over to ENIGMA. This is very dumb, this is done every time you compile, not that slow, but is part of the reason why compile is slow. It should be done internally by ENIGMA, otherwise ENIGMA basically depends on Java or something else to render that default font. canthelp discovered it when building the CLI that he could not call draw_text when he had no font resources. We should include a default sprite font with ENIGMA, what do you think Josh?
190
General ENIGMA / DirectSound and XAudio
« on: August 06, 2013, 02:27:49 pm »
Well I got DirectSound all written up here and working, but I feel like just trashing it. All it provides is those old deprecated sound_effect functions and 3D sounds. But fundies has alerted me to the fact that I actually can compile XAudio 2 with MinGW32 for Windows XP through Windows 8 and even Xbox 360. So I am thinking we just leave this DirectSound stuff deprecated and I trash DSound in favor of XAudio. What do you guys think?
Edit: If it is ok for me to go ahead and deprecate the shit completely, I am going to update LateralGM to remove the effects checkboxes as well.
Edit: If it is ok for me to go ahead and deprecate the shit completely, I am going to update LateralGM to remove the effects checkboxes as well.
191
General ENIGMA / Model Index Buffers
« on: August 03, 2013, 12:39:50 am »Quote
//Are these functions really needed? They just break stuff!
Whoever left me that gold fucking nugget in the source code, here is my response: Yes
Game Maker traditionally does not provide functions for passing indices to the index buffer, making it pretty awful for optimized models. If you don't know how an index buffer works, then Google it. I would prefer that topics be posted here under "General ENIGMA" for discussion by all developers, lets try to avoid comments like this in the source code from now on guys, ok? Please proceed to discuss a change in the function specification if you like, I am open to other idea's.
I am also wanting us to add a...
Code: [Select]
void d3d_model_push_colordata(gs_scalar* data);
void d3d_model_push_texturedata(gs_scalar* data);
and also maybe like this...Code: [Select]
void d3d_model_push_colordata(int dslist);
So that a pointer to an array can be passed by the end programmer to push an entire array or data structure list of color data into the model, avoiding for loops and shit.
192
General ENIGMA / Frustum Culling and View Hashing
« on: August 03, 2013, 12:33:39 am »
Well this is obviously an easy way we can get games speeded up. I am talking of course of adding a quadtree for culling 2D objects outside the view. I don't intend or am I even suggesting to implement this for the draw_sprite commands or anything, just simply for objects who are set a sprite and do not have a draw event and by default simply draw their sprite.
The reason is because sometimes people implement their own view bounds checking, for instance, cheeseboy does in his Raptor Blasters game. Also programmers may have their own methods of making their game faster that our method might impede. Therefore I am only suggesting this for objects that do not have draw events.
The idea is simple, we divide all the objects update into a quadtree based on their local x and y and mask, then simply draw only the ones in view by default.
193
General ENIGMA / Direct3D 10 and Windows Software Development Kit
« on: August 02, 2013, 07:20:01 pm »
Well after investigating why I had problems with adding a Direct3D 10 graphics system, I have figured out why. MinGW ships the D3D 9 headers and libraries but only one of the D3D10 headers and two of its libs libd3d10 and libd3dx10, the d3dx10.h header is needed for transformations and vector classes. So this means regardless of installation we need to add the requirement for users that want D3D10 or later to install the Windows SDK, which now directly includes the DirectX SDK, they are no longer separate. This is a huge SDK, and in turn requires .net Framework 4, meaning we also need to add a dependency for that if people want the D3D10 or later graphics. I think this is why YYG's are still using D3D9. Thoughts guys?
Edit: Studio also requires you to install .net 4 and .net 3.5 for Windows 8
http://docs.yoyogames.com/source/dadiospice/000_using%20gamemaker/001_installation.html
So should we just focus on .net framework 4, and be a step ahead of them?
Edit: Studio also requires you to install .net 4 and .net 3.5 for Windows 8
http://docs.yoyogames.com/source/dadiospice/000_using%20gamemaker/001_installation.html
So should we just focus on .net framework 4, and be a step ahead of them?
194
General ENIGMA / Half Pixel Alignment, OpenGL and DirectX
« on: August 01, 2013, 02:27:16 am »
As some of you may not be aware, vector graphics require a half pixel align or else there are edge artifacts, anybody who has worked with SVG's knows about this. Anyway, DX and OGL require you do the half pixel alignment yourself for 2D rendering. Now Josh's original proposal to me was to just shift the ortho projection function by (-0.5,-0.5) and that appeared to work because I was using draw_rectangle. Now this does not fix it for every draw function, as x and y are by default float because of gs_scalar and what both graphics API's use internally. This means if you call say draw_sprite(random(room_width), random(room_height)); you'll end up with half the sprites half pixel aligned and the other half of them not. The only way I could resolve it locally was to cast to integer before passing the coordinates to the draw functions and then letting the projection matrix shift (-0.5, -0.5)
The only solution to this I can think of is to either explicitly require integer for x and y with 2D drawing functions (which breaks them for transforming say a sprite into a 3D billboard as float is still the highest precision allowed). We could create a separate scalar for 2D x and y drawing functions so people can easily choose their cast. Or we can manually enter (-0.5, -0.5) to every single 2D drawing function. Looking for input on this you guys, specifically you, Josh Dreamyland.
The only solution to this I can think of is to either explicitly require integer for x and y with 2D drawing functions (which breaks them for transforming say a sprite into a 3D billboard as float is still the highest precision allowed). We could create a separate scalar for 2D x and y drawing functions so people can easily choose their cast. Or we can manually enter (-0.5, -0.5) to every single 2D drawing function. Looking for input on this you guys, specifically you, Josh Dreamyland.
195
General ENIGMA / DirectX Models and Primitives
« on: August 01, 2013, 02:19:21 am »
Yes, I already spoke on this a bit before, but Direct3D offers an internal mesh class that can do optimization and has interfaces for dynamic level of detail (LOD), and can also by default load (*.x) model files, which models can be exported from Blender in.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb147196%28v=vs.85%29.aspx
From what I can gather however, the mesh class works with triangle lists internally, however you can get a pointer and control locking and unlocking of its index and vertex buffer, however I was looking at the specification for DrawSubet()
So I am unsure if we can use this to create models that can have other primitive types. It is however possible for us to make it so that people only thing they are using the other primitive types and just hack them all into triangle lists, after all that is the fastest way to do it, that is *the* primitive of the GPU. Quads all that shit are on there way out and are already software processed in OpenGL 3 and later.
Also, when the base mesh interface loads a (*.x) model file it also gives you the file name from its material telling you where its texture is located. The base mesh interface holds transformation, texture, and material information, so we would also need to add a d3d_model_get_texture() function to avoid having inaccessible textures in memory. Just looking for some input guys... I want to say just go ahead and use it but idk, I would have to hack in and fake other primitive types, which albeit would be really fast anyway, but idk if you guys are ok with me doing that or what or if we should just write our own mesh interface like I did with OpenGL 3.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb147196%28v=vs.85%29.aspx
From what I can gather however, the mesh class works with triangle lists internally, however you can get a pointer and control locking and unlocking of its index and vertex buffer, however I was looking at the specification for DrawSubet()
Quote
D3DX Meshes use indexed triangle lists, and are therefore drawn with IDirect3DDevice9::DrawIndexedPrimitive.
So I am unsure if we can use this to create models that can have other primitive types. It is however possible for us to make it so that people only thing they are using the other primitive types and just hack them all into triangle lists, after all that is the fastest way to do it, that is *the* primitive of the GPU. Quads all that shit are on there way out and are already software processed in OpenGL 3 and later.
Also, when the base mesh interface loads a (*.x) model file it also gives you the file name from its material telling you where its texture is located. The base mesh interface holds transformation, texture, and material information, so we would also need to add a d3d_model_get_texture() function to avoid having inaccessible textures in memory. Just looking for some input guys... I want to say just go ahead and use it but idk, I would have to hack in and fake other primitive types, which albeit would be really fast anyway, but idk if you guys are ok with me doing that or what or if we should just write our own mesh interface like I did with OpenGL 3.