Recent Posts

Pages: [1] 2 3 ... 10
1
Works in Progress / Re: Deciding on a new project
« Last post by hpg678 on November 17, 2017, 07:23:55 AM »
The last couple of weeks I've been absent from the community working on my latest project. I'm still working on the back story for the project, well actually i have one but I'm improving.

 I still have to develop enemies, guns and other characters though. Basically I've done 2 levels maps for testing purposes for collision detection and design.
You can check out my youtube video here. Mind you it is unedited.

Feel free to comment and suggest your opinions or criticisms.

2
Issues Help Desk / Re: Problem at startup, and not able to test/compile also.
« Last post by Alan_0100 on November 11, 2017, 03:28:53 PM »
SOLVED!

I've found the solution here:
https://github.com/enigma-dev/lgmplugin/issues/17

Thanks for the help!  ;)
3
Issues Help Desk / Re: Problem at startup, and not able to test/compile also.
« Last post by time-killer-games on November 10, 2017, 07:24:10 PM »
I guess I could be wrong but I'd imagine that you would need to have a Windows OS that is newer than XP.
4
Issues Help Desk / Problem at startup, and not able to test/compile also.
« Last post by Alan_0100 on November 10, 2017, 04:54:11 PM »
Hello, I'm running on WindowsXP SP3 - Java 1.7.0_25.
Besides of the error at start-up and unable to test or compile everything is fine.

Error Report:

Operating System: Windows XP
Version: 5.1
Architecture: x86

Java Name: Java HotSpot(TM) Client VM
Java Vendor: Oracle Corporation
Version: 1.7.0_25

Available processors (cores): 1
Free memory (bytes): 206078752
Maximum memory (bytes): 1013645312
Total memory available to JVM (bytes): 259522560

File system root: C:\
Total space (bytes): 38050111488
Free space (bytes): 4627472384
Usable space (bytes): 4627472384

File system root: D:\
Total space (bytes): 80023715840
Free space (bytes): 15887843328
Usable space (bytes): 15887843328

File system root: E:\
Total space (bytes): 80015491072
Free space (bytes): 7826849792
Usable space (bytes): 7826849792

File system root: F:\
Total space (bytes): 35656552448
Free space (bytes): 6216040448
Usable space (bytes): 6216040448

File system root: G:\
Total space (bytes): 0
Free space (bytes): 0
Usable space (bytes): 0

File system root: H:\
Total space (bytes): 0
Free space (bytes): 0
Usable space (bytes): 0

Stack trace:

java.lang.Error: Invalid memory access
   at com.sun.jna.Native.invokePointer(Native Method)
   at com.sun.jna.Function.invokePointer(Function.java:470)
   at com.sun.jna.Function.invokeString(Function.java:651)
   at com.sun.jna.Function.invoke(Function.java:395)
   at com.sun.jna.Function.invoke(Function.java:315)
   at com.sun.jna.Library$Handler.invoke(Library.java:212)
   at com.sun.proxy.$Proxy0.libInit(Unknown Source)
   at org.enigma.EnigmaRunner$3.run(EnigmaRunner.java:192)
 
5
Function Peer Review / d3d_unproject
« Last post by Solitudinal on November 07, 2017, 03:27:49 PM »
This handy function set allows you to convert a 2d screen coordinate (such as the mouse position) into 3d coordinates - basically the 3d coordinates that it's pointing at.

This is sometimes called unproject, because it reverses the projection process (which converts 3d coordinates into 2d screen coordinates). It's also sometimes called raycasting, since you are effectively casting a geometric ray from the camera/viewport into 3d space, and then in this case colliding it with the z-depth of whatever pixel it is (e.g. z=0 if you click on the floor).

4 functions are provided:
d3d_unproject returns a Vector3, if you are ok with OO programming.
d3d_unproject_x/y/z returns the respective x, y, and z coordinates, in GM's regular functional programming (where functions return a single number, rather than an object).
All functions take an x and a y coordinate, which refer to the location respective to the viewport. I.e. d3d_unroject(mouse_x,mouse_y)
Or if you're weird and actually use views in conjunction with 3d:
d3d_unproject(mouse_x - view_xview[view_current], mouse_y - view_yview[view_current])

These functions are a little expensive due to complex math going on behind the scenes, so try not to use them more than a few times every step. I.e. if you're using them for mouse coordinates, consider storing the results in a global variable.

NOTE this only works in OpenGL1, as it depends on a call to gluUnproject. I tried porting the code to OpenGL3, but I'm terrible with matrices and ENIGMA uses an awkward matrix format. I've included my attempted OpenGL3 code below if you want to try and fix it.

Code: [Select]
enigma::Vector3 d3d_unproject(gs_scalar x, gs_scalar y)
{
  GLdouble model[16];
  GLdouble proj[16];
  GLint view[4];
  GLdouble retX, retY, retZ;
  GLfloat gly, glz;

  glGetDoublev(GL_MODELVIEW_MATRIX,model);
  glGetDoublev(GL_PROJECTION_MATRIX,proj);
  glGetIntegerv(GL_VIEWPORT,view);

  //invert mouse y into openGL y
  gly = (float)view[3] - (float)y;
  //Read the depth of the moused pixel as the z
  //this stops the raycast at the first pixel collision
  glReadPixels(x,int(gly),1,1,GL_DEPTH_COMPONENT,GL_FLOAT,&glz);

  gluUnProject(x,gly,glz,model,proj,view,&retX,&retY,&retZ);
  //TODO: Provide a raycast_to_floor, stopping at a desired z rather than the first pixel collision
  //I believe the way to do this is to call gluUnProject twice at glz=0 and glz=1 to raycast,
  //then somehow collide that ray with the desired z.

  return enigma::Vector3(retX, retY, retZ);
}

gs_scalar d3d_unproject_x(gs_scalar x, gs_scalar y)
{
  return d3d_unproject(x,y).x;
}
gs_scalar d3d_unproject_y(gs_scalar x, gs_scalar y)
{
  return d3d_unproject(x,y).y;
}
gs_scalar d3d_unproject_z(gs_scalar x, gs_scalar y)
{
  return d3d_unproject(x,y).z;
}


OpenGL3 BROKEN code, which I created by researching a few places explaining how gluUnproject works:
Code: [Select]
//This code does not work. Please fix it.
enigma::Vector3 d3d_unproject(gs_scalar x, gs_scalar y)
{
  GLint view[4];
  GLfloat gly, glz;

  oglmgr->Transformation();
  glGetIntegerv(GL_VIEWPORT,view);
  //invert mouse y into openGL y
  gly = (float)view[3] - (float)y;
  //Read the depth of the moused pixel as the z
  //this stops the raycast at the first pixel collision
  glReadPixels(x,y,1,1,GL_DEPTH_COMPONENT,GL_FLOAT,&glz); //Not sure but I think this is broken

  //Now perform the unproject.
  //create an unprojection matrix by inverting the MVP. This is probably the part I screwed up.
  enigma::Matrix4 inv = enigma::view_matrix * enigma::projection_matrix;
  inv.Inverse();
  //Create the normalized ray in GL-space [-1,1]
  enigma::Vector4 tmp = enigma::Vector4((float)x / (float)view[2],gly / (float)view[3],glz,-1.0f);
  tmp.x = tmp.x * 2.0f - 1.0f;
  tmp.y = tmp.y * 2.0f - 1.0f;
  tmp.z = tmp.z * 2.0f - 1.0f;
  //Cast it
  enigma::Vector4 obj = inv * tmp;

  //Un-normalize the result (the magnitude is 1/obj.w)
  return enigma::Vector3(obj.x / obj.w,obj.y / obj.w,glz / obj.w);
}
6
Off-Topic / Re: ENIGMA Value
« Last post by hpg678 on November 04, 2017, 05:19:46 PM »
Thanks for the response guys. Even moreso for Josh's words. I understand a little better now the situation and will double my efforts to support ENIGMA.

I'm learning C++ on my own as well as writing my own extensions for ENIGMA. I have also have a few scripts to share with the community as well as building my own small studio to do tutorial videos using ENIGMA.

So expect more from me in the near future.

By the way guys......what do you think of these...........
7
Off-Topic / Re: ENIGMA Value
« Last post by time-killer-games on November 04, 2017, 01:56:09 PM »
@Josh - Goombert already expressed to me that he wouldn't mind being donated to, but all in all it isn't a big deal to him, and he said that most people here don't want to be paid either.
8
Off-Topic / Re: ENIGMA Value
« Last post by Josh @ Dreamland on November 04, 2017, 12:51:12 PM »
ENIGMA's problem isn't really money, in the most basic sense. I'm happy to continue to cover ENIGMA's server costs (they amount to maybe $20/mo). ENIGMA needs more expert attention. I occasionally block off some time to fix one of ENIGMA's big issues, but there are a couple that are too big for me to just knock out one weekend. The last time I rewrote ENIGMA's compiler, I was 19, and it took over a month. What kept me motivated was the challenge, and that aspect has gone away.

As far as motivating really talented people, I'd say that is a money issue. I work full-time as a software engineer. That comes with a lot of money, and a lot of bullshit. The bullshit eats up all of my personal bullshit buffer, which I would need in order to work on ENIGMA for extended periods of time. The money is sufficiently good that I could never expect this community to pay one person competitively (be it me, or some arbitrary expert in this field).

So basically, the server costs are noise. I am happy to cover them for this project. The cost of hiring an engineer who could actually make a difference for this project is too high for this community to support.

That said, I understand that some of our contributors are still in college. I think they should weigh in on whether they find the prospect of accepting donations to be motivating. Maybe they are in a position where the ability to make money from working on ENIGMA would allow them to do so more often. If that's the case, I would be happy to set up a donation system that would go directly to contributors who need it.

So, thoughts, college attendees?
9
Off-Topic / Re: ENIGMA Value
« Last post by time-killer-games on October 31, 2017, 10:49:14 PM »
Penis is not an option. How am I supposed to vote on this poll with no penis flopping in it?
10
Off-Topic / ENIGMA Value
« Last post by hpg678 on October 30, 2017, 03:47:33 PM »
In a post by the user Fervi, it was mentioned that the developers were sad because of ENIGMA not being popular enough.  The user went on to state their reluctance to accept money using for their product. Though I admire that about them, being a realist, I could not in good conscience use their product to make money without making some kind of donation. I did it for GameMaker 5 and GameMaker 8, so I would not have a problem if having made money from selling one of games, I could not give back to the developers.

So what do you think?
Pages: [1] 2 3 ... 10