flat assembler
Message board for the users of flat assembler.

Index > Windows > opengl first person camera

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
rCX



Joined: 29 Jul 2007
Posts: 172
Location: Maryland, USA
rCX 29 May 2009, 15:21
Really cool. I wish I had that much skill Very Happy
Post 29 May 2009, 15:21
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 29 May 2009, 18:58
Hi Alphonso
I thought that i had nailed this one down, guess not.

Hi rCX
Not so much skill involved, im only a beginner.
I seen some of your posts and you are much better than i am.
I have only been playing with fasm for about a year or two.
Most of my experience is from writing Win32 and OpenGL apps in C/C++.
I have a nice game engine in these language so im porting little parts
of it to fasm syntax purely for the learning experience and for fun.
When i first looked at fasm sources i had no idea how asm worked
but i was farmilliar with Win32 so a lot of stuff was recognizable.
If it wasnt for these examples i would still be coding hello world apps.

I have made some changes to the timer code, maybe this helps?
Also some new changes made to the texture loading procedure.
There is now a 7 day poll for people who rather not respond by post.

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 29 May 2009, 18:58
View user's profile Send private message Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 295
Alphonso 30 May 2009, 03:18
bitshifter wrote:
Hi Alphonso
I thought that i had nailed this one down, guess not.
Seems to be a problem with the exe in the package. When compiling the source it works great at ~670fps. Haven't tried with the new timer code as it is working fine now.

EDIT: Looking at the file dates the source is newer than the executable
Code:
27/05/2009  17:21               266 readme.txt
30/05/2009  10:22    <DIR>          API
30/05/2009  10:22    <DIR>          EQUATES
30/05/2009  10:22    <DIR>          TEXTURE
27/05/2009  17:34             9,728 fps.exe
13/02/2009  18:40               766 fps.ico
28/05/2009  15:40            25,524 fps.asm
    
Shocked Hope your not spending too much time to find coding problems that don't exist.
Post 30 May 2009, 03:18
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 30 May 2009, 11:59
Hey thats funny, i may have had a mixup with all these files here.
Or maybe the zip was corrupted because they should be the same age.
I think this new version is going to produce some good results for people.
Anyway it seems that any of the changes i made are for the better.
So far so good on the poll, were at a solid 5 and 0. Razz
Post 30 May 2009, 11:59
View user's profile Send private message Reply with quote
Dreamz



Joined: 10 Apr 2009
Posts: 25
Location: US
Dreamz 10 Jun 2009, 16:00
Hey,
nice!! Its amazing! it does not go very smooth, probably cuz im in safe mode lol
btw i use blender to make models, its awsome, and free.
blender.org
and it has a built in game engine Smile
Post 10 Jun 2009, 16:00
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 18 Feb 2010, 09:26
New version!

Minor changes:

1) Rearranged code/data sections (some anti-viri complain)
2) App icon now loaded from exe resource instead of file.
3) New control, F1 key now minimizes the window.
4) Message pump and window proc changed to monitor window focus.
Now when the window loses focus it frees up CPU usage (dont be a hog)

Have fun Smile

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 18 Feb 2010, 09:26
View user's profile Send private message Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 350
Location: Poland
macgub 19 Feb 2010, 09:55
@bitshifter
Maybye it's silly question, but from where can I download your app Question
Post 19 Feb 2010, 09:55
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 19 Feb 2010, 10:00
Post 19 Feb 2010, 10:00
View user's profile Send private message Visit poster's website Reply with quote
macgub



Joined: 11 Jan 2006
Posts: 350
Location: Poland
macgub 19 Feb 2010, 11:44
OK, thanks. Earlier I don' see any attachment there. It sometimes dissapear. I don't know the reason.

Cool demo Cool

EDIT OK, I know the reason. That attachment is only for users that loged in.
Post 19 Feb 2010, 11:44
View user's profile Send private message Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 767
tthsqe 27 Feb 2010, 21:33
Does anybody have a example of using openGL in 64 bit code?
Post 27 Feb 2010, 21:33
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 12 Mar 2010, 11:31
maybe render will be better if you use 8 images for the walls instead of 4.

then, it will be an octogonal border instaed of square border, and render will be better.


there is a bug when exiting the program.
Code:
FPS caused a page fault in the module KERNEL32.DLL at 015f:bff7a128.
Registers :
EAX=0e829528 CS=015f EIP=bff7a128 EFLGS=00210206
EBX=004ac6b4 SS=0167 ESP=0053fd64 EBP=0053fd98
ECX=00000000 DS=0167 ESI=004ac5d0 FS=68bf
EDX=3f800000 ES=0167 EDI=0e82960c GS=0000
Octets à CS : EIP :
89 51 08 8b 53 08 8b 43 04 8d 8b 0b 10 00 00 c1 
stack state :
0053fd98 004ac5d0 00410000 0001f570 bff7b30e 00410000 004ac5d0 000000e4 00000200 00415940 0000ffff 0001f570 004ac5d0 0053fde0 bff7b953 00410000 
    


thanks for this code.
i will try to play with for image rendering. Very Happy

see you later!
Post 12 Mar 2010, 11:31
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 12 Mar 2010, 13:23
Sky-box is usually 6 images ±X±Y±Z
Where do you put these 8 images?
I can think of 14 images where there are 6+8 images. These extra 8 images are on each corner of the skybox to about 25% of the length/width/height.

...and the error happened on which OS, Service Pack, graphics card, RAM/CPU etc.
Post 12 Mar 2010, 13:23
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 12 Mar 2010, 13:48
win98.
when i click the skull, it will redim the explorer window, and the mouse cursor will act as if it was in the skybox.
i presume a worse implemented hinstance or something like this. because if it works under win98, but bugs, it means there is a bug.
and for a better win application, i think the best is to do them always compatible for win98, because it is sure to work under earlier versions.

and for the skybox, i see this:

+X,+XZ,+Z,+Z-X,-X,-XZ,-Z,-Z+X

and the sky with only +Y,-Y

then, the horinzon will be an octogon. and angles will be smoother.
Post 12 Mar 2010, 13:48
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 30 Apr 2011, 02:59
I liked it and it wasn't lagging like High Level Language compiled OpenGL programs.

You should make a game in asm.. It runs very smooth on my PC.
Post 30 Apr 2011, 02:59
View user's profile Send private message Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 30 Apr 2011, 05:12
New version with minor changes...
1) Min processor now = Pentium PRO due to FPU instructions (fcomi,fcmov*)
2) Camera rotation math only recalculated during mouse movements.
3) Font generation code rearranged to shave a few instructions.
4) Perspective and Orthographic matrices now precalculated for later use.

NOTES:
1) Orthographic projection puts pixel [0][0] at top left unlike the standard OpenGL style with [0][0] at bottom left.
2) To use less CPU simply uncomment the Sleep call.
3) Some GPU do better with depth test enabled, others not.
If you get slow frame rates, try commenting glEnable,GL_DEPTH_TEST out.
4) Some GPU also do better with bitmap font, you can use my wgl Font code instead. Get it here: http://board.flatassembler.net/topic.php?t=9885
If people continue to show interest, i will continue to update the code...

Also, if a moderator could delete the POLL from this thread, thanks.
Post 30 Apr 2011, 05:12
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20451
Location: In your JS exploiting you and your system
revolution 30 Apr 2011, 05:27
bitshifter wrote:
Also, if a moderator could delete the POLL from this thread, thanks.
Done.
Post 30 Apr 2011, 05:27
View user's profile Send private message Visit poster's website Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 206
Location: Brazil
ctl3d32 30 Apr 2011, 12:00
Nice! Thumbs Up!
Post 30 Apr 2011, 12:00
View user's profile Send private message Reply with quote
Coty



Joined: 17 May 2010
Posts: 553
Location: &#9216;
Coty 03 May 2011, 15:13
Wow I can't believe I never noticed this at all Shocked

Hey bitshifter, this is great! Are you making a full 3D game like this? It would be great, my netbook hits over 103 - 120 fps! So far its the fastest running 3D demo I have tried on it Very Happy Maybe it will slow down when it begins to get more things to render...
Post 03 May 2011, 15:13
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 04 May 2011, 06:55
< Are you making a full 3D game like this?
This is just a toy, my main project is a full-software driven 3D engine.
I really need resource developers for sounds/models/textures and such.
Post 04 May 2011, 06:55
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 02 Jul 2011, 01:14
do you think it is possible without a lot of modification of your code to do the fps with this image?
http://fr.wikipedia.org/wiki/Fichier:Milkyway_pan1.jpg

it can be cool to have a universe fps, with accelerated time, then, we can see planet rotation.
Post 02 Jul 2011, 01:14
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.