Forum Topic: My First (working) 3d Engine

(6,977 views • 241 replies)

This topic is 9 pages long. [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ]

<< < > >>
None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/1/09 04:06 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

Zenyara and I have been doing allot of work on the engine, and things are coming on nicely. Done now is a view bob effect, crouching (control), jumping (space), a view shake effect (we will use if you get hit by something) and an advanced editor. Also, clipping is pretty much done.
WASD to move, mouse to look, press and hold shift to detach mouse control (to put the mouse in the middle of the screen)
http://spamtheweb.com/ul/upload/010209/7 5641_main.php


Shouting

putzpie

Reply To Post Reply & Quote

Posted at: 2/1/09 04:39 PM

putzpie NEUTRAL LEVEL 08

Sign-Up: 11/25/07

Posts: 3,149

That's fucking tight. You should make an FPRPG, like king's field for the PSX.

But a wolfenstein clone would probably be easier.

My site
Click here to proceed to decapitate small children with wii remotes
If you didn't start out on the PSX, you're not a gamer >:(

BBS Signature

None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/1/09 04:47 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 2/1/09 04:39 PM, putzpie wrote: That's fucking tight. You should make an FPRPG, like king's field for the PSX.

But a wolfenstein clone would probably be easier.

When I make this open source, people can exactly recreate Arena for all I care. We will hopefully create something a bit more in-depth than wolfenstein, because (wait for it..) my engine can do walls not at 90 degrees! I'm going back to working on texture mapping now, I'll see you all on the other side.


None

catd77

Reply To Post Reply & Quote

Posted at: 2/1/09 04:51 PM

catd77 NEUTRAL LEVEL 15

Sign-Up: 03/02/08

Posts: 652

At 1/27/09 05:25 PM, 14hourlunchbreak wrote: That looks great, except that you can go through walls.

Like my friend in a COD tournament, anyway awesome, and also, thnx for not posting this on NG and saying "work in progress-my first 3d"


None

Deathcon7

Reply To Post Reply & Quote

Posted at: 2/1/09 05:08 PM

Deathcon7 NEUTRAL LEVEL 21

Sign-Up: 10/01/03

Posts: 5,870

hitTests are choppy. They throw you back rather than canceling out your movement.


None

ColdLogic

Reply To Post Reply & Quote

Posted at: 2/1/09 05:13 PM

ColdLogic EVIL LEVEL 19

Sign-Up: 11/12/03

Posts: 524

i got stuck on the corner of a wall, couldnt move


None

Nano256

Reply To Post Reply & Quote

Posted at: 2/1/09 07:13 PM

Nano256 DARK LEVEL 13

Sign-Up: 02/12/05

Posts: 1,473

Clipping needs major work. Frankly, it sucks.

Move on to ActionScript 3.0 already!
The third post below this one is a lie.

BBS Signature

None

KynetiK-27

Reply To Post Reply & Quote

Posted at: 2/1/09 07:19 PM

KynetiK-27 NEUTRAL LEVEL 10

Sign-Up: 07/23/06

Posts: 740

Clipping repels too hard.
Minimap seems zoomed in too much to be useful to the player.
Mouse is super sensitive, I hope you plan on a command for this too.

Just minor things, everything else is very sexy.


Happy

zenyara

Reply To Post Reply & Quote

Posted at: 2/1/09 11:30 PM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

This engine is very rough draft (work-in-progress).

I'll be working with Stalin98 to work out the bugs because I am super anal when it comes to how things should work.

I am sure we'll figure out the perfect wall code for "non-bouncing". I created a 2d map in the past that actually used a "pre-check" so you wouldn't move toward the wall at all (thus no bounce). if(myX+speed<wallX){//move(speed+x);}els e{myX=wallX-1);

As for Mouse Sensitivity I think we're going to create a smart mouse class that will tell if your camera view is not aligned with a wall properly in conjunction with the mouse position and reposition itself automagically.

Mini-Map - I agree that it is zoomed in too much and we'll fix it. (Easily done)

An upcoming update (very soon) will include the HUD, player's hand, weapon changer (scroll or 1-5), sniper zoom (scope)

I also want to get a 3rd person view camera working and we'll start each load-in with the camera starting from about 30+ yards behind and above the player, and zooms down and into the player's view.

We're building this for a first-person shooter so there won't be a bunch of additional interface that you might find in an RPG. Our HUD will be simple.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

zenyara

Reply To Post Reply & Quote

Posted at: 2/1/09 11:41 PM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

Another solution I thought of for when the mouse starts leaving the screen is to allow useage of the arrow keys to rotate camera's view (if possible), until the player can spin around to adjust for it.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

zenyara

Reply To Post Reply & Quote

Posted at: 2/1/09 11:45 PM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

One more thing I forgot to add. We need to fix it so camera-bob stops when player is in the "crouch" position.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

zenyara

Reply To Post Reply & Quote

Posted at: 2/1/09 11:51 PM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

At 2/1/09 11:41 PM, zenyara wrote: Another solution I thought of for when the mouse starts leaving the screen is to allow useage of the arrow keys to rotate camera's view (if possible), until the player can spin around to adjust for it.

I figured it out.

hitting left or right arrow gives an instant 90 degree spin to either direction for instant compensation, so you can pull your hand off the mouse or keyboard for a second and "tap" 90 left or right to quickly adjust, and we could make it 180, but 90 sounds better.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

adam2510

Reply To Post Reply & Quote

Posted at: 2/1/09 11:54 PM

adam2510 EVIL LEVEL 13

Sign-Up: 10/02/05

Posts: 3,727

how about if your mouse is at the very left of the stage the view will be 0 if its at the center it will be 180 and the very right 360?

Web Hosting: Free! Premium!

BBS Signature

None

echeese

Reply To Post Reply & Quote

Posted at: 2/2/09 12:07 AM

echeese FAB LEVEL 09

Sign-Up: 03/17/05

Posts: 117

I am experienced with raycasting in flash. If you need any advice, let me know. I have a way to have "perfect" wall collisions.


None

zenyara

Reply To Post Reply & Quote

Posted at: 2/2/09 12:22 AM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

At 2/1/09 11:54 PM, adam2510 wrote: how about if your mouse is at the very left of the stage the view will be 0 if its at the center it will be 180 and the very right 360?

Would suck for aiming, trust me I've tried it.

I figured out the perfect solution though. (although it's up to Stalin98 to implement)

We'll use 'C' and 'Z' to instantly give you +/- 90 degree rotation. I tested it out and i think that's the solution for sure.

echeese wrote: I am experienced with raycasting in flash. If you need any advice, let me know. I have a way to have "perfect" wall collisions.

What is your solution? Please explain. Thanks.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

echeese

Reply To Post Reply & Quote

Posted at: 2/2/09 12:25 AM

echeese FAB LEVEL 09

Sign-Up: 03/17/05

Posts: 117

Well, depending on how you have your maps defined, you basically check how far the player is from the wall, and if it's intersecting, you push it back until it's just touching.


Happy

zenyara

Reply To Post Reply & Quote

Posted at: 2/2/09 12:30 AM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

At 2/2/09 12:25 AM, echeese wrote: Well, depending on how you have your maps defined, you basically check how far the player is from the wall, and if it's intersecting, you push it back until it's just touching.

Ya, that's basically what I said in a post above. Do a pre-check at the time of your move request and if you don't intersect, then move and if you do intersect then make it 1 px less than the wall's location.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

echeese

Reply To Post Reply & Quote

Posted at: 2/2/09 12:33 AM

echeese FAB LEVEL 09

Sign-Up: 03/17/05

Posts: 117

Do you need help with texture mapping? It seems like each wall column is just repeated


None

zenyara

Reply To Post Reply & Quote

Posted at: 2/2/09 12:44 AM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

At 2/2/09 12:33 AM, echeese wrote: Do you need help with texture mapping? It seems like each wall column is just repeated

Right now they are just one bitmap because we haven't gotten farther into the editor yet. We're perfecting camera movement first.

Check out the latest updates:

Toga Games (crew)

BBS Signature

Happy

zenyara

Reply To Post Reply & Quote

Posted at: 2/2/09 11:28 PM

zenyara NEUTRAL LEVEL 13

Sign-Up: 06/17/05

Posts: 1,200

Ok, we added sound to jump, walk, and a song loop.

I didn't pay attention to it, but Stalin98 has added the ability to re-adjust your mouse position by simply holding shift (which stops the camera rotation) and frees the mouse to move wherever you want. Works quite well.

I'm off work tomorrow, so I'll be adding the HUD and other things (developer console perhaps).

We should have another update to show soon.

Check out the latest updates:

Toga Games (crew)

BBS Signature

None

Nuttro

Reply To Post Reply & Quote

Posted at: 2/3/09 04:07 PM

Nuttro LIGHT LEVEL 22

Sign-Up: 04/26/07

Posts: 848

At 2/2/09 11:28 PM, zenyara wrote: Ok, we added sound to jump, walk, and a song loop.

I didn't pay attention to it, but Stalin98 has added the ability to re-adjust your mouse position by simply holding shift (which stops the camera rotation) and frees the mouse to move wherever you want. Works quite well.

I'm off work tomorrow, so I'll be adding the HUD and other things (developer console perhaps).

We should have another update to show soon.

It shouldn't be shift otherwise (with my computer anyway) it will go through every text link on the webpage outside the flash.


None

Mr-Money

Reply To Post Reply & Quote

Posted at: 2/3/09 04:24 PM

Mr-Money NEUTRAL LEVEL 16

Sign-Up: 11/05/05

Posts: 2,782

Very good engine. Now, to decompile.. ;)


None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/3/09 04:26 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 2/3/09 04:24 PM, Mr-Money wrote: Very good engine. Now, to decompile.. ;)

*Gasps*
I'm making the engine opensource when its done anyway, so why rip it when its unfinished?


None

Super-Yombario

Reply To Post Reply & Quote

Posted at: 2/3/09 04:33 PM

Super-Yombario FAB LEVEL 06

Sign-Up: 03/16/07

Posts: 1,183

I notice the double-jumping problem... I know you're using AS3, but I found a solution for it in AS2:
make a variable that is true/false to see if the player has pressed the 'jump' button. When the character presses Space, it makes the variable False. When he releases space, it makes it true. And when you press space it makes sure the variable is True or it won't jump.

RIP Ed McMahon - RIP Farrah Fawcett - RIP Michael Jackson
But wait, there's more...
RIP Billy Mays


None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/3/09 04:46 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 2/3/09 04:33 PM, Super-Yombario wrote: I notice the double-jumping problem... I know you're using AS3, but I found a solution for it in AS2:
make a variable that is true/false to see if the player has pressed the 'jump' button. When the character presses Space, it makes the variable False. When he releases space, it makes it true. And when you press space it makes sure the variable is True or it won't jump.

Same thing applies in AS3, I just added jump / crouch in quickly before I went offline for the night.
Question : In hexadecimal, what is the binary shift per every digit? ( << ).
I have a var that stores how much alpha I want to take from each pixel (for shadow), and it is in the form 0xFF. I want to shift it up the right number with <<, to put it here: 0xFF000000, but don't know the increment. I'm guessing 8 per digit, because binary is base-2 and hex is base-16, but is it exponential? And if I guess, and it's right, I won't know if it is because its +8 or if I just got lucky, so knowing the inc would be better.


None

dELtaluca

Reply To Post Reply & Quote

Posted at: 2/3/09 04:48 PM

dELtaluca LIGHT LEVEL 20

Sign-Up: 04/16/04

Posts: 5,561

you can see how many by noting that 0xf = b1111, so each hexadecimal digit occupies 4 bits, so if you need to shift from 0xAA to 0xAA000000 you are shifting 6 hexadecimal digits along, 6x4 = 24 bits. so shift left by 24

My social worker says im special!

BBS Signature

None

Cojones893

Reply To Post Reply & Quote

Posted at: 2/3/09 04:50 PM

Cojones893 EVIL LEVEL 22

Sign-Up: 03/09/03

Posts: 2,596

They have to be uint's do to the upper limit of the int variable.

var a:uint = 0xFF;
var b:uint = a << 24;

None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/3/09 04:51 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 2/3/09 04:48 PM, dELtaluca wrote: you can see how many by noting that 0xf = b1111, so each hexadecimal digit occupies 4 bits, so if you need to shift from 0xAA to 0xAA000000 you are shifting 6 hexadecimal digits along, 6x4 = 24 bits. so shift left by 24

Thanks, good to know it was 4 not 8. Could have made a mess of things...


None

zuperxtreme

Reply To Post Reply & Quote

Posted at: 2/3/09 04:58 PM

zuperxtreme NEUTRAL LEVEL 08

Sign-Up: 01/02/05

Posts: 1,629

At 2/3/09 04:26 PM, StaliN98 wrote:
At 2/3/09 04:24 PM, Mr-Money wrote: Very good engine. Now, to decompile.. ;)
*Gasps*
I'm making the engine opensource when its done anyway, so why rip it when its unfinished?

Don't worry, more people looking at your code means more people finding errors ;)


None

StaliN98

Reply To Post Reply & Quote

Posted at: 2/3/09 05:16 PM

StaliN98 LIGHT LEVEL 10

Sign-Up: 07/27/07

Posts: 690

At 2/3/09 04:58 PM, zuperxtreme wrote: Don't worry, more people looking at your code means more people finding errors ;)

Of which there are many, I assure you. There's probably a thousand ways to improve my methods, but it is my first try, so give me a break.


All times are Eastern Standard Time (GMT -5) | Current Time: 04:36 PM

<< Back

This topic is 9 pages long. [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!