3d wolfenstein-ish engine

Post your own tutorials, guides and demos.

Post » Sun Oct 12, 2008 10:49 pm

[quote="SoldjahBoy":c5qlm6ov]Making it full screen like, I dunno... every other FPS game on the market... would fix the problem of the mouse focus.

~Sol[/quote:c5qlm6ov]
well of course, but that's not really a solution to the problem -- merely a way to avoid the problem.
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sun Oct 12, 2008 11:18 pm

Wow... with strafing and mouse aim... that's like a real FPS! Amazing stuff! Have... ten bonus points...

You could keep the mouse inside the window by wrapping it when it gets to the edge of the window - not the edge of the screen.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sun Oct 12, 2008 11:30 pm

[quote="Ashley":15eir1tx]Wow... with strafing and mouse aim... that's like a real FPS! Amazing stuff! Have... ten bonus points...

You could keep the mouse inside the window by wrapping it when it gets to the edge of the window - not the edge of the screen.[/quote:15eir1tx]
yeah i was trying to see how that'd be possible...

edit: ah, the window object seems to be my golden ticket. will have new .cap when i finish
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Mon Oct 13, 2008 12:19 am

version 2 of mouselook -- now you can assign something like shoot to a mouse click without trouble (i demonstrate this with a muzzle flash).

couple of things though --

i'd like the devs to add condition "compare mouseX" -- to get around this, i set a global variable to mouseX and compared that, but it seems like that should be unnecessary.

the only way i found to find the edge of the window was to use the window object, and i found that it included the border of the window.. which made things a tad more complicated. i wish it was easier to just find the edge of the gameplay area.

it's not perfect -- you can break it if you move the mouse extremely fast, but i'm not sure it's possible to fix that -- even great retail games like counter-strike suffer from this

edit: also, when i set mouseY to the same value every tick, it seems to cause some problems when moving the mouse right.

updated it with a more complicated way to restrict the mouseY that doesn't give you choppy movement at slow speeds. re-upped the choppy version with a comment. slowly move the mouse right to see the difference.
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Mon Oct 13, 2008 5:26 am

[quote:2ob644xv]i'd like the devs to add condition "compare mouseX" [/quote:2ob644xv]

dfyb that mouse thing can be done by going to the system object's conditions, you'll find "compare" at the bottom. Then enter "MouseX" in the top value and what ever else you want to compare it to.


Personally I prefer the method where the mouse is always set to the center of the screen, then you compare how much it moves away from the center.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Mon Oct 13, 2008 10:26 am

[quote="dfyb":2t8z5zme]the only way i found to find the edge of the window was to use the window object, and i found that it included the border of the window.. which made things a tad more complicated. i wish it was easier to just find the edge of the gameplay area.[/quote:2t8z5zme]
You want the client X/Y, not the window X/Y.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Oct 13, 2008 3:27 pm

Thanks for the help Dfyb, Mind if I use that (or modified version of) code in my own game?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Mon Oct 13, 2008 8:13 pm

[quote="Jayjay":1kzs1mlv]Thanks for the help Dfyb, Mind if I use that (or modified version of) code in my own game?[/quote:1kzs1mlv]
you can definitely use it -- if i release a .cap, it's free game
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Tue Oct 14, 2008 9:58 pm

AWSOME! Really cool!

Since i haven't looked through the code i don't really know how this works, but would it be possible to add jumping?
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Thu Oct 16, 2008 5:29 am

[quote="Attan":psoyuxeg]AWSOME! Really cool!

Since i haven't looked through the code i don't really know how this works, but would it be possible to add jumping?[/quote:psoyuxeg]
Thats sort of like going from Wolfenstien to Doom :D
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

PreviousNext

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest