Request for a valuable movement script...

(SeaCigar) #1

LOL. Hey guys, this is SeaCigar; after a LONG period of downtime, I’m back to harass you all again.

The question I have is regarding a type of movement you have seen in many, many 3D videogames, which is often sadly taken for granted. This movement scheme takes the position of the main character in relation to the camera, and adjusts movement accordingly.

An example would be… Mario 64, zelda 64, sonic adventure, star fox adventures, jet force gemini, crash bandicoot… you name it; all the good 3D action adventure games uses this control scheme, with a few exceptions, like resident evil (and I believe the later sequels add on this control scheme as an option.)

basically, the controls work like this; press up, the character walks away from the camera, towards the horizon. press down, the character walks towards the camera, away from the horizon. press left or right, and the character walks parallel to the camera’s line of sight, making the character circle around the camera in the direction chosen by the player’s line of sight.

by combining this with a semi-intelligent camera, you could make a 3D adventure game with far greater aesthetic options; for example, moving the camera wouldn’t disrupt the player, because the control script would allow him to veer towards the new location of his destination. anyone who has tried to make an efficient control scheme with the semi-retarded auto camera feature in blender will know what I am talking about; more often than not, you must parent the camera to the main actor, sacrificing the free moving feel of an intelligent camera for the sake of a solid control scheme.

the other option is to make the controls respond like the resident evil scheme; this entails the left and right keys making the character rotate on their axis, with the up and down keys making the character proceed or draw back, respectively. while this is okay for most cases, many of you who play video games feel much less restricted with a free roaming control scheme; its one of the main gripes I have alsways had with the resident evil series.

in case anyone is wondering what I am talking about… well, if you know me, I have been trying to make a video game for my senior project… sadly, when I presented the single complex 2 and 1/2 D level I had made to my teacher, the jerk said it wasn’t enough. so, yes, I was a little ashamed to come back to the forum, after I promised to use the ideas that all you wonderful people had presented to me in the past, which I tried hard to make come to fruition…

I talked with him, and he told me that the best thing I could hope for is something similar to the mini-levels in super mario sunshine… many of you may not know what that entails, so I will explain; hidden in each of the main levels are mini levels which serve to hone your basic mario skills; there are no items to collect, and the fancy-schmancy powers of your water pack are gone, along with the pack itself. the levels themselves defy logic; suspended in the middle of nowhere, with a bunch of floating moving blocks from which to jump to and fro…

basically, I am to make the most fundamental of 3D platformers; no powerups, and no unique abilities beyond running and jumping, with perhaps a few special manuvers to keep things interesting, such as a long jump, and wall jump. There is no plot other than to get the sparkley at the end of the gauntet, and no method to the madness of living in the middle of floating nothingness.

in other words; quantity versus quality :-?

SO, we come down to the reason for all this; does anyone know how I could make a control scheme like I have explained? I need it, desperately… however, I know that if you were to succeed in making such a script, you would have a valuable commodity that could, in theory, be used for profit; nowhere is there a better control scheme for 3D action adventure games. So if you succeeded, you could then sell your panted script to individuals such as myself.

indeed, I have other ideas for a working control scheme, but this is the best option I could hope for.

I am not asking for a hand out; should a talented programmer make a script that can do what I ask, I would be willing to pay whatever that individual asked for it (within reason, of course). Should anyone have any ideas or questions, let me know; I’ll be around.

(guru202) #2

Saluk has the camera script that is pretty good.

Also, read GAME DEVELOPER October 2002. It features an article called "Creating an Event-Driven Cinematic Camera: Part 1 Read it!

I will also be producing an awesome game, my friend. My teacher is demanding too. :smiley:

(lizard809) #3

what you are requesting is simple trigonometry
i have made the guy move according to the camera’s rotation, if you combine this with the camera actuator or saluks script it would be better

took me 30 mins

hope it’s what you want

oh yeah, keys are:
w=away from camera
s=towards camera
a=move left
d=move right

(SeaCigar) #4

:smiley: LOL, simple trigonometry… well, thanks for making me feel like a retard; you see, the furthest trig I have taken so far is the most basic one in high school; and while I see the similarities in the two subjects that would allow for such a script, I’m afraid actually putting said knowledge to practical use is still a little beyond my grasp.

However, I still appreciate your help; If anything comes to fruition from this, I will definately give you credit. I’m surprised I got such a prompt response, actually, and without needing to pay (even though I still would have).

I see I’ll have to take a few more trig and programming classes… :slight_smile:

(SeaCigar) #5

I would like to take a moment to thank lizard again for helping me with that script. since I got it, things have been running smoothly on the gaming front. I even managed to get a decent looking skybox parented to the object you placed which the object follows, making a pretty looking “infinite” background. And since the object scales without rotating, the skybox follows the main character without rotating, meaning there aren’t any problems with it looking off center at any given time.

The main character itself is looking good; it’s a robot; a little R2-D2 looking thing, you know, a trash can on wheels. it’s set up with hydraulic wheels for jumping, and a pop up lid for releasing gadgets. The only gadget in use at the moment is a propeller for slowing your descent. It seems a little simple, I know. However, the animation is coming along smoothly, and with creative level design, I could have a nice little freeware platformer.

you saved my rear, dude. I will study the script you gave me so I can become an adept programmer, or at least be a little more self sufficient. and I will put you in the credits, either in game, or more likely in the final readme file.