Show Posts

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.


Topics - Goombert

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »
196
General ENIGMA / Game Maker 8.1 uses half the ram ENIGMA does
« on: August 08, 2013, 01:58:39 PM »

197
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.

198
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.
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

199
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?

200
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.

201
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.

202
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.

203
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?

204
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.

205
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()
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.

206
General ENIGMA / DirectX Image formats and Fonts
« on: July 29, 2013, 09:15:06 PM »
Ok well this something we need to discuss.  ENIGMA has its own code for loading various image formats, but Direct3D has a S*** TON of built in formats supported...

from...
http://msdn.microsoft.com/en-us/library/windows/desktop/bb172801%28v=vs.85%29.aspx
".. the following file formats: .bmp, .dds, .dib, .hdr, .jpg, .pfm, .png, .ppm, and .tga"

DirectX also has internal classes for dealing with fonts, you can simply request them by name and tell it to render, it takes like 5 lines of code...
http://www.two-kings.de/tutorials/dxgraphics/dxgraphics09.html
You can also ask it to build a mesh from font numerics and it will do so.

So this begs the question as to what to do about our fontstruct as it obviously needs moved so that its not included in our DX system when it doesn't need to be.

DirectX also provides internal classes for drawing sprites and batching them...
http://www.two-kings.de/tutorials/dxgraphics/dxgraphics09.html

Now this also leads to another thing as to whether or not we want to use those sprite functions for backgrounds as well. Not to mention in GameMaker sometimes people will apply transformations to text and sprite drawing functions to use them as 3D billboards. I would like some input from you guys Harri, forthevin, Josh.

Edit:

I have managed to get texture loading and draw_sprite implemented...

As you can see there is a tad bit of a problem, DX uses ARGB, ENIGMA loads textures into RGBA :( You can tell by the sprites pixel color being off.

207
After trying this several times with DirectX 10 and failing, I decided to give DX one more chance to be a part of our game engine, and it finally worked with DX9. The headers and libraries are distributed with MingW for DX9 so no need to install the Windows or DirectX SDK, if you are on Windows you will simply be able to switch it under API settings and use it. Now of course not all functions have been implemented, the implementation status is listed below. This will increase the compatibility of ENIGMA on native Windows platforms and for those people Micro$hit likes to screw over with bad OpenGL support.

So we are now looking particularly for Windows users to help implement the graphics functions for DirectX. There's a lot of functions to be done, varying in difficulty so people from all skill-levels should be able to help. I am going to be writing a ton of the code as well, your help is going to be appreciated.

Currently Implemented:
 Sprites: Full support
 Backgrounds: Full support
 Models: Full support
 Primitives: Full support
 Tiles: No Support
 Fog: Experimental Support
 Transformations: Almost full support
 Projections: Full support
 Views: Experimental Support
 Curves: No support
 Standard Draw: Almost full support
 Lighting: Experimental Support
 Shaders: Limited or Buggy support
 Text and Font: Full support
 Particle Effects: No support
 Surfaces: Almost full support
 Texture: Limited or Buggy support
 Blend Modes and Color: Full support
 Vertex Formats: No support

208
General ENIGMA / Doxygen Commenting Removed
« on: July 27, 2013, 07:07:07 PM »
This was the stupidest idea I had since I have been here. The original intention was to provide quicktips from an auto completion window in a new IDE and make our code more "friendly". In reality is just bloated the repository and made a mess of the source code, the Wiki is more thoroughly documented, can be run through an xml document processor for quicktips in an IDE, and also much better organized and where I want people focusing their attention.

209
General ENIGMA / Half Pixel Alignment
« on: July 27, 2013, 06:16:10 PM »
If any of you have ever worked with SVG or other vector graphics then you know you need to do half pixel alignment. OpenGL and DirectX work the same way. If nobody noticed, there was a bug where drawing an outlined rectangle wouldn't fill the pixel in each of its 4 corners, that was due to half pixel alignment.

I resolved this by changing the orthographic projection code to offset by half pixels instead of full pixels.
Code: [Select]
glOrtho(x-1,x + width,y-1,y + height,0,1);
Should have been...
Code: [Select]
glOrtho(x-0.5,x + width,y-0.5,y + height,0,1);

Anyway I am committing the fix soon and 2D stuff will no longer be misaligned or have edge artifacts. This was just a friendly reminder to everyone. Also be aware that DirectX9 eclusively has a half texel bug regarding sampling which must be resolved in a shader.

210
General ENIGMA / 3D Particle Effects
« on: July 26, 2013, 03:21:37 PM »
Yes hello, hai, this is something I have definitely been planning on adding the particle effects extension. It should be relatively easy to abstract into handling 3D particles without much changing. I do not know how Game Makers particles exactly work however as I never used them before because I tend to make 3D games. Forthevin, I don't know if you maybe want to take a crack at it, if so let me know, otherwise I am going to eventually do it myself. :P

Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 »