flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Examples and Tutorials > fun opengl game (3D) + guassian blur shader example

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



Joined: 20 May 2009
Posts: 699
fun opengl game (3D) + guassian blur shader example
I wanted to recreate the nice game geometry wars 2;
code should use no more than sse3, so even HaHa should be able to run it.

Code:
; controls:
;
; keyboard    gamepad           action
;----------------------------------------
; enter       right bummper     pause
; 1           left bummper      change camera mode
; 2           dpad right        change final shader
; 3           dpad up           increase bloom effects
; 4           dpad down         decrease bloom effects
; wasd        left stick        move
; arrows      right stick       shoot
; left mouse                    shoot
; space       a                 bomb
;
; camera motion:
;   tg : move forward / backward
;   fh : move left / right
;   yn : move up / down
;
; camera rotation:
;   uo : rotate about view direction
;   jl : rotate left / right
;   ik : rotate up / down
;
; camera.inc has more details on the camera modes 



Description:
Download
Filename: aGW.zip
Filesize: 116.62 KB
Downloaded: 229 Time(s)



Last edited by tthsqe on 28 Oct 2014, 00:22; edited 16 times in total
Post 13 Sep 2013, 07:22
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
very beautiful!
Post 13 Sep 2013, 09:18
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 19:57; edited 1 time in total
Post 13 Sep 2013, 13:44
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1203
Location: Athens, Greece
Quite impressive work tthsqe. The best game i've seen posted in fasm board.
Post 13 Sep 2013, 17:46
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
are you left handed tthsqe?
finding very hard to use wasd for moving =)
but really beautiful game!!
Post 13 Sep 2013, 21:05
View user's profile Send private message Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 699
I though right-handed people used left hand for movement and right hand for shooting. Smile
Anyways, I'm not quite impressed with the particle explosions. They probably should be uniformly distributed in 3D on a sphere and then projection onto the plane as the enemies are. Also, the snake should be 3D as well, but I got lazy there.
Post 13 Sep 2013, 21:20
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5909
Location: Poland
tthsqe

You must have been inspired by aliens because your game evokes just unearthly feelings. Razz It's like a battle simulator for cosmic warriors, all those bends of space-time when you bomb everything around with space bar, whirls that absorb the light etc. Wink

Great work. Smile
Post 13 Sep 2013, 21:41
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 699
I not sure what it is similar to this - I just wanted to create some aesthetically pleasing graphics. I'll probably try to make the whole thing 3D and allow the camera to move from its post directly above the grid.
Post 13 Sep 2013, 21:52
View user's profile Send private message Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 5909
Location: Poland

tthsqe wrote:
I not sure what it is similar to this - I just wanted to create some aesthetically pleasing graphics. I'll probably try to make the whole thing 3D and allow the camera to move from its post directly above the grid.

In my opinion it's a perfect video game. With certainty, I'd like to see its 3D version. Smile
Post 13 Sep 2013, 22:02
View user's profile Send private message Send e-mail Visit poster's website Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1171
Location: Unknown
Stupid post removed.


Last edited by HaHaAnonymous on 28 Feb 2015, 19:57; edited 1 time in total
Post 13 Sep 2013, 22:54
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
ok, nice improvement, tthsqe

but i got a suggestion,

could we use mouse right click as jet movement?
so, left click, fire as we click
right click, our jet move to where we click.

zoom doesn't seem working, +-
maybe a key to reset default view (view like in first version, because the ability to pan / rotate camera... is a little bit confusing, )

(white) exploding doesn't seem anti alias?
running with GT630 here.


Description:
Filesize: 140.62 KB
Viewed: 2521 Time(s)

exploding.png


Post 16 Sep 2013, 09:29
View user's profile Send private message Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 699
I am in the process of maximizing the visual particle effects and making some better 3D enemy models.
Do you have any ideas for some more enemies? The sky is the limit here, and possibly cpu time, although the physics/ai thread currently runs at thousands of frames per second.
As for the mouse, I was thinking of two different camera styles for game play:
1. the camera is square to the grid (angle of 1+0i+0j+0k) and follows the player around in about the z=200 plane. This is what I currently have, and mouse input as you describe it does make sense, as well as keyboard and gamepad input.
2 the camera is in "first person", that is, directly over the player with a view direction perpendicular to the z axis. This would be very fun to see the fireworks displays as enemies explode, but it is not clear how to use mouse/keyboard/gamepad input in this case. Any ideas?
Post 16 Sep 2013, 10:24
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
glad to hear from you tthsqe,

Quote:

Do you have any ideas for some more enemies?


ok, i just stuck with one idea for your enemies, as requested by you =)
before that, how bout reduce the exploding white color, coz the boxes color hardly seen during explode,.
[bug] the mouse click fire seems to only able to fire 20, 30, 40 (clock direction)

i think the current available boxes enemies are quite nice and cute, maybe a game AI that,
if 3 boxes of same/different colors located in a 4x4 grid, they will join to form one super box in a halt 2 seconds integrate procedure? and unleash 1 combined kill shot towards us? (this would allow us to see how random is that random too)

now it seems, all boxes just rush to us,
from what i see, rank from appearance
blue > purple > green > pink > orange snake, is their speed equal to the speed that our jet could move? (right now, i am playing by escape and not firing them, hehehe)

btw, what cause the grid to display twisted like that, (kinda beautiful if you ask me)

1. maybe the camera could use blender view scheme? numpad?
well, i suggest camera movement only available through numpad,
so, more organize and less confusing (sorry to most laptop player, hehehe)

num 8 camera pan up
num 5 camera pan original game default position
num 2 camera pan down

num 4 camera pan left
num 6 camera pan right

angle move through num 7, counter move using num 3
angle move through num 9, counter move using num 1

i guess, maybe we could set Ctrl + 0 to memorize current camera position, so when user press numpad 0, scene will go to that saved camera position (like in blender 3D)


overall, the game is in pretty good shape!


Description:
Filesize: 137.73 KB
Viewed: 2514 Time(s)

exploding.png


Post 16 Sep 2013, 11:08
View user's profile Send private message Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
MEIN GOTT (!). 466 kibibytes. thats around 280 or something like this A4 pages equal continual text to read only this is to be understood. Well mainly i would have to look into includes and possible self modification and whatnot to find out about safety level. then if no self modificaiton and no such memory things and no downloads for code from outside and no stack overflows for implanting code.. then probably its safe enough. Although i dont check these for other games however this gaming something extended would be for donations.


Last edited by matefkr on 16 Sep 2013, 18:32; edited 1 time in total
Post 16 Sep 2013, 18:22
View user's profile Send private message Reply with quote
matefkr



Joined: 02 Sep 2007
Posts: 1291
Location: Ukraine, Beregovo
sleepsleep told may other fasmers join your project. if help is needed add me skype: mate.zoltan21 (as much as i can help i may help as needed).
Post 16 Sep 2013, 18:23
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
i just made promotional 3D model, our enterprise, =)

the irony is, this picture is much bigger than all the code, executable combined,,, lol Laughing Laughing Laughing

i exported the object to OpenGL - C, based on guide here,
http://ksolek.fm.interia.pl/Blender/
Blender OpenGL / C header exporter

attached with enterprise.h file


Description:
Filesize: 438.38 KB
Viewed: 2493 Time(s)

enterprise.png


Description: enterprise.txt (exported from blender)
Download
Filename: enterprise.txt
Filesize: 12.41 KB
Downloaded: 72 Time(s)

Post 16 Sep 2013, 20:30
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
Image

the grid is awesomely beautiful! Wink
Post 17 Sep 2013, 05:57
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
hi tthsqe,
i found something nice as a model for our game design,

check this out,
diatom,
http://en.wikipedia.org/wiki/Diatom

all the natural objects look awesomely COOL!!! should match our game pretty well,
https://www.google.com/search?q=diatom&source=lnms&tbm=isch
Post 17 Sep 2013, 07:47
View user's profile Send private message Reply with quote
tthsqe



Joined: 20 May 2009
Posts: 699
Before introducing more complex models (I agree - those diatoms do look great), we ought to maximize the CPU -> GPU triangle transfer rate, or store some of the models on the GPU. Do you know how to do this? I have a strong feeling all of the calls to glvertex3f are not the best way.
Post 17 Sep 2013, 08:00
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 6924
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
Post 17 Sep 2013, 08:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.