The MASM Forum Archive 2004 to 2012

Project Support Forums => OpenGL Forum => Topic started by: Farabi on January 11, 2012, 01:08:10 AM

Title: My Game Engine
Post by: Farabi on January 11, 2012, 01:08:10 AM
http://ompldr.org/vYzZxYg/OGLE.zip

This is the source code I promised, I've rearranged it for you. Free for commercial or not.
Title: Re: My Game Engine
Post by: Farabi on January 11, 2012, 11:11:16 AM
Replace the Camera function with this one


fCameraLook proc uses esi lpcamera:dword

invoke glClearColor,FP4(0.0),FP4(0.0),FP4(0.0),FP4(0.0)
invoke glClear,GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT or GL_STENCIL_BUFFER_BIT
invoke glEnable,GL_DEPTH_TEST
invoke glMatrixMode,GL_MODELVIEW;
invoke glLoadIdentity
invoke glColor3f,FP4(1.0),FP4(1.0),FP4(1.0)
invoke gluPerspective,FP8(45.0),FP8(1.33333333333333),FP8(1.0),FP8(1000000000.0)

mov esi,lpcamera
invoke glRotatef,[esi].fCam.Rotation.X,FP4(1.0),FP4(0.0),FP4(0.0)
invoke glRotatef,[esi].fCam.Rotation.Y,FP4(0.0),FP4(1.0),FP4(0.0)
invoke glRotatef,[esi].fCam.Rotation.Z,FP4(0.0),FP4(0.0),FP4(1.0)
invoke glTranslatef,[esi].fCam.Position.X,[esi].fCam.Position.Y,[esi].fCam.Position.Z

ret
fCameraLook endp


In order to make a multiple camera viewing. You'll need this as a lightviews before you can create a shadow texture, but I never done it.
Title: Re: My Game Engine
Post by: Farabi on January 23, 2012, 03:37:24 AM
(http://ompldr.org/vY2Nnaw/Test.JPG)
Title: Re: My Game Engine
Post by: Farabi on January 29, 2012, 01:16:50 PM
(http://omploader.org/vY2lqYw)
Title: Re: My Game Engine
Post by: Farabi on February 16, 2012, 12:55:01 AM
(http://omploader.org/vY3RxYg)
Title: Re: My Game Engine
Post by: Farabi on February 20, 2012, 09:07:16 AM
http://www.wix.com/farabio/firstpage All in red is my demo.
Title: Re: My Game Engine
Post by: Farabi on February 25, 2012, 02:37:49 AM
New Source Code. Free for commercial or non commercial, but donating a new laptop that support OpenGL 3.0 is Appreciated  :cheekygreen:



http://omploader.org/vY3ZlMw/ogle.rar
Title: Re: My Game Engine
Post by: jj2007 on February 27, 2012, 12:55:56 PM
Tmp_File.asm(28) : Error A2087: Cannot open include file 'gl.inc'
Tmp_File.asm(29) : Error A2087: Cannot open include file 'Glu.inc'
Tmp_File.asm(34) : Error A2087: Cannot open include file 'graphics.inc'
:(
Title: Re: My Game Engine
Post by: Farabi on February 27, 2012, 01:40:41 PM
Quote from: jj2007 on February 27, 2012, 12:55:56 PM
Tmp_File.asm(28) : Error A2087: Cannot open include file 'gl.inc'
Tmp_File.asm(29) : Error A2087: Cannot open include file 'Glu.inc'
Tmp_File.asm(34) : Error A2087: Cannot open include file 'graphics.inc'
:(

Have a look at "\lib" folder, there is graphic.inc and graphic lib. And for Gl.inc and GLU.inc see my attachment.
Title: Re: My Game Engine
Post by: jj2007 on February 27, 2012, 01:59:04 PM
Quote from: Farabi on February 27, 2012, 01:40:41 PM
Have a look at "\lib" folder, there is graphic.inc and graphic lib. And for Gl.inc and GLU.inc see my attachment.

There is graphic.lib but not graphic.inc
Title: Re: My Game Engine
Post by: jj2007 on February 27, 2012, 02:40:14 PM
Strange. Maybe it doesn't like the 36 warnings? I had to put a .nolist to make it assemble at all, and it was indeed incredibly slow for project with only 28k of asm code. Usually, JWasm is a factor 2-3 faster than ml.exe :eek

physicEngine.inc(80) : Warning A4184: ..
newton.dll.inc(11) : Warning A4184: ..
scene.inc(47) : Warning A4184: ..
Tmp_File.asm(93) : Warning A4184: ..
Title: Re: My Game Engine
Post by: Farabi on February 28, 2012, 12:02:25 PM
Here is the file.

JWASM compilation is slew on you too right? I think how to solve it simple. Create another new parser using hash table or dont multicheck the function code so each function need a proto definition first, that is too bad, I like JWASM because it doesnot need to create a proto first, save time typing.
Title: Re: My Game Engine
Post by: Farabi on April 08, 2012, 08:39:49 AM
For those who interested about progress of my study on Graphic, I updated the source code and create a simple triangle mesh collision detect

http://ompldr.org/vZDl6cQ/ogle.rar (9,8 MBytes)
Title: Re: My Game Engine
Post by: Farabi on May 16, 2012, 01:07:26 PM
(http://ompldr.org/vZHJvcg/SSC.PNG)

I really love to show it.