The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
April 22, 2018, 09:48:35 PM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  Project Support Forums
| |-+  OpenGL Forum
| | |-+  My Game Engine
« previous next »
Pages: [1] Print
Author Topic: My Game Engine  (Read 11835 times)
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


My Game Engine
« 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.
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #1 on: January 11, 2012, 11:11:16 AM »

Replace the Camera function with this one

Code:
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.
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #2 on: January 23, 2012, 03:37:24 AM »

Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #3 on: January 29, 2012, 01:16:50 PM »

« Last Edit: February 16, 2012, 12:56:01 AM by Farabi » Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #4 on: February 16, 2012, 12:55:01 AM »

Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #5 on: February 20, 2012, 09:07:16 AM »

Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #6 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
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
jj2007
Member
*****
Gender: Male
Posts: 6011



Re: My Game Engine
« Reply #7 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'
Sad
Logged

Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #8 on: February 27, 2012, 01:40:41 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'
 Sad

Have a look at "\lib" folder, there is graphic.inc and graphic lib. And for Gl.inc and GLU.inc see my attachment.

* Glu.zip (12.11 KB - downloaded 250 times.)
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
jj2007
Member
*****
Gender: Male
Posts: 6011



Re: My Game Engine
« Reply #9 on: February 27, 2012, 01:59:04 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
Logged

jj2007
Member
*****
Gender: Male
Posts: 6011



Re: My Game Engine
« Reply #10 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

Code:
physicEngine.inc(80) : Warning A4184: ..
newton.dll.inc(11) : Warning A4184: ..
scene.inc(47) : Warning A4184: ..
Tmp_File.asm(93) : Warning A4184: ..
Logged

Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #11 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.

* graphics.zip (0.89 KB - downloaded 258 times.)
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #12 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)
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Farabi
Neuroscientist Student
Member
*****
Gender: Male
Posts: 2409


MASM+OpenGL Fanatic


Re: My Game Engine
« Reply #13 on: May 16, 2012, 01:07:26 PM »



I really love to show it.
Logged

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!