Old School Side View

Hi guys,

just for fun and to try to learn 3D and UDK "by myself", I'm trying to create a "remake" of Metroid Fusion on the UDK.

(Yes I know that there is more than 3 Metroid Fusion's remakes actually, but it's just for me)

So, for thoses who doesn't know Metroid Fusion, it's a 2D platform game on Gameboy Advance.
It looks like that :

So it's a kind of old Mario game but in the future, with Samus, (the character) and a "gun".

So, it's a "static" side view.
Why "static" ?
Because the camera follows the player but that's all, it isn't rotating around the character.
The player can only moves forward, backward, jump and crouch.
(And AIM in X axis and Z axis (Vertical and Horizontal))

Here are my problems :

1. The player can still use the Y axis (so, moving on the left/right and aiming everywhere, he's supposed to be able to aim only staight in front of him and behind him).

2. The camera can still use the Y axis too (so, when the player is aiming behind him, the camera rotates around the player to go behind the map)

I'm suppose that I'm not clear, so I'm trying a last attempt :

In fact I'd like to get exactly the same gameplay as in Metroid Fusion.

Except one thing.

In Metro


  • cholden
    Offline / Send Message
    cholden polycounter lvl 13
    To get the EXACT camera you need for this title, you'll likely need to setup the camera for each room on a specific track so that it follows the player within the contraints of each room. You should look at Shadow Complex, as it's a metroidvania game using unreal and does all of this exactly.

    Now, for a quick camera to give you the same result without the accuracy, add a camera and a player spawn. Setup the camera to look at the side of the player, and set this up in kismet:


    Again, quick camera, this will work. Mouse aims up and down, forward/back move the character. You could simply disable strafing right/left and call it good. NOTE: You may have to play around with that camera position a lot until you get what you want unless you already have good knowledge of how cameras work.

    edit: I'd also add blocking volumes to your levels to restrict any non-sidescrolling movement.
  • NothingHappens

    thanks for the answer.

    Here's what I've already done before asking the question :

    -Setting up the camera to follow the player from the side.
    -Adding Blocking Volumes to abort any "accidental" strafe.

    Here's my test-map : http://www.megaupload.com/?d=D6NP3WZ0

    What I haven't done (and/or don't know how to do) :
    -Prevent the camera to turn around the player when the player aim anywhere.
    -Prevent the player to aim anywhere.

    Yeah I heard about Shadow Complex, I didn't know that it was made with UDK.
    It's exactly what I'd like to do (not the game, just the camera/player thing, I think you understand what I mean).

    It should be better with an "Alien Swarm touch", I mean, with a sight/laser sight/"aim reticle".

    Do you know how to do ?

    Note : I have other questions about my "project" but not about the camera, I suppose that I have to create another thread ?
  • Sean VanGorder
    I am currently working on a side scroller in the UDK for an indie project. I got this working literally like an hour ago. However, I did it through creating my own script for it. It is more beneficial to set it up through script than kismet for a few reasons. Kismet is per level only, while script can be set up once and used for the whole project. Also, I think you have more precision and control while using script. You could use script to implement your own crosshair and targeting scheme as well.

    So far through script I have this

    -Movement constrained to a 2D axis
    -Character faces direction he is moving
    -Can only aim on a 2D axis
    -Custom keybinds (D moves right, A moves left)

    I'm new to UnrealScript, so I'm slowly but surely working on getting the weapon to work correctly.
  • NothingHappens
    Hm, script ?
    I'm absolutely not good about scripting, that's the problem =/

    Edit : Sean_EG > I don't know for you, but, personally, I prefer when the character faces the direction where he's aiming.
    Like that, you are able to shoot "behind" you when running backwards.
    With you "character faces the direction he's moving" the problem is that you can't shoot behind you when running for your life.
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 8
    Hey Epic just updated/created a page on camera's and look what I found :)

    http://udn.epicgames.com/Three/CameraTechnicalGuide.html#Example Side-Scrolling Camera

  • NothingHappens
    Haha, thanks haiddasalami, I love you ! ^^

    I'm watching this, now.

    Thank you again. =)

    Edit : Hmmm... Now I have to find what I have to do with these *.UC script lines... x)

    Edit² :
    Okay, I've found that I have to put it in C:\UDK\UDK-2010-07\Development\Src\UTGame\Classes.

    But when I'm launching UDK, it asks to rebuild scripts, I allow him to do it, and then I have an error about a "TempRot" missing.
    After a quick search on Google I found that : http://forums.epicgames.com/showthread.php?p=27539595#post27539595

    It's exactly the same problem, except that even when I add "local rotator tempRot;" at the top of the ProcessMove function, I still can't rebuild it and use it.

    The error changes for :
    "Error, 'Local' is not allowed here"
  • NothingHappens
    Okay, I've found about the "Error, 'Local' is not allowed here".

    But I still have a friggin' error and the same warning.

    I let you see by yourself.

    At the left there is the UDNPawn.uc, and at the right it is UDNPlayerController.uc.
    (And obviously, at the bottom, it is the console thing with the error and the warning)

    I hope somebody will be able to help me. =(

    (Oh, BTW, one of the scripts (the second one, I think) is suppose to change binds, but I don't see anything about binds in any one of them, any idea ? (Yeah, I'd like to use my own binds))

    Here's the screenshot :
  • Martizz1e
    Offline / Send Message
    Martizz1e polycounter lvl 8
    not mistake but im pretty sure the bindings are in "udk/engine/config/baseinput"

    thats where the scripts are for what each keypress does in game
  • Parkar
    Okay, I've found about the "Error, 'Local' is not allowed here".

    But I still have a friggin' error and the same warning.

    I let you see by yourself.

    At the left there is the UDNPawn.uc, and at the right it is UDNPlayerController.uc.
    (And obviously, at the bottom, it is the console thing with the error and the warning)

    I hope somebody will be able to help me. =(

    (Oh, BTW, one of the scripts (the second one, I think) is suppose to change binds, but I don't see anything about binds in any one of them, any idea ? (Yeah, I'd like to use my own binds))

    Here's the screenshot :

    I can't see any declaration for P so in other words P does not exist. Didn't bother trying to understand exactly what the code is doing but maybe you want the Pawns pitch in which case just replace all P with Pawn.
  • NothingHappens
    Hi guys, thanks for your help.
    With your answers and The Ball's tutorial I've progressed.

    Now the scripts works, I don't have anymore errors (I still have one friggin' warning that I'd like to delete but it's not as horrible as the errors), and I'm able to use it with the UDK.

    But, as usual, I still have problems (yeah, I'm always in this case).

    So, as I said, now the scripts works and I can use them, but...

    But the camera is aiming in the wrong direction, the character can walk forward and backward (that's cool, except that binds are inverted) and the camera follows the character on horizontal axis, the character can't jump and crouch (so I can't see if the camera is also following the character in the vertical axis), the camera is too low (it's like the camera tries to aim the foot of the character instead of his head).

    (After trying by making a stair on the way of the character and walking on it, yeah, the camera also follows the character on the vertical axis).

    I'll add a screenshot.

    So, if I resume :

    Martizz1e > Nope, one of both script files are changing the binds because I haven't touched anything else.
    But I still don't see what is changing what.

    Parkar > Yeah thanks, I didn't saw that there saw some "P." in the file, I've added "awn" after each one of them and now it works, thanks. ^^

    Now, the screenshot and some explanations :

    Both red circles are here to show that the wall we see in both windows is the same (same thing about the purple one).
    The light blue square is the supposed camera.
    The red arrow is here to show where the camera is aiming.
    The green one is here to show where the camera is SUPPOSED to aim.
    The yellow cross is here because I think that it's the only direction where the character is aiming, because when I shot, I don't see anything (as you can see on the screenshot, we don't see the character), we don't see the bullets, but we can hear them, and we also can hear that the bullets hurts to something.


    What I'd like to change :
    -Force the camera to aim 90° on the left (to aim in the good direction) and to be higher than it is now (now : Same height than the character's foots. I'd like it to be at the same height than the character's head, maybe a little higher).
    -Allowing the character to jump (and maybe crouch, I don't see if he's crouching, but I'm pretty sure that he isn't because I don't hear anything when I'm jumping/crouching).
    (Also, it should be cool if I could change the jump height of the character without changing the gravity, it's supposed to be a platform game and actually, when he's jumping with defaults settings, he's really not jumping high enough).

    Thanks again guys, I hope that it will be the last time that I annoy you. ^^'

    Edit : Oh, also, the radar is a little "buggy" since the scripts works.
    You see the little arrow in the radar ? It's rotating undefinitively and very quickly.
    (But I think I'll disable it, I don't need it)
  • JValencia
    NothingHappens, have you tried using the UT2D code? It might help you out more, as well as be more complete for what you want to achieve with your game.

    Here's a link:
  • NothingHappens
    Oh I "saw" this topic, when I saw the name I thinked about "real" 2D (like the first image of this topic) so I haven't read the topic...
    Shame on me...

    Thank you, thanks a lot, it's almost perfect.

    It would be perfect if :
    -The camera follow the character instead of the crossair (I don't like when the character is on the side of the screen, I prefer when he is in the center (and maybe a little lower, just a little)).
    -We can move the crossair as we want on the screen and not only on horizontal axis (the character is ALMOST free to aim anywhere (but the almost is not really a problem) on horizontal and vertical axis, but the crossair only follow on the horizontal one).
    -The character could jump higher (He's jumping something like 96 UU high, I'd like him to jump a little more, like 128 instead of 96 (if it's really 96)).

    Any idea ? (I'm trying to solve it by myself but if anybody could help '^^)

    Thanks you again everybody for your help, thank you²

    (Maybe I'll do something else than a pure Metroid Fusion cop... Remake. In this case I hope you'll enjoy the result)
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 9
    Grab a free IDE to edit your code, hard to read and you don't have line numbers. I use Notepadd++. Then Grab UncodeX. Watch the tuts on installing and setting that up.

    As of now, the crosshairs are tied to the camera, player movement and weapons, that's in everything that has to do with aiming or whatnot from what I've seen with my meddlings. What I found was the BEST way was to go a couple steps higher in the hierarchy of the UT code to make my stuff. Slowly stripping what I don't need and what I do need. It helps to plan by thinking "I want this, I don't want that" and pull from existing UT code. From there start moddifying it to what you want. I always code in sections and paste into the final doc.

    And NEVER touch the base UDK stuff. I always set up the proper project settings and have my own mod, even for dicking around with a few lines of code.

    Good luck, been a while since I dug into UT code. Try to post problem snippets.
  • NothingHappens
    Ah, I think I've found the source of the problem about the crossair.

    In the ControllerPlayer file there is a line that say :
    vAimingOffset.X = LookingOffset * Scale;
    If I copy it and paste it with a Z instead of the X, like that :
    vAimingOffset.X = LookingOffset * Scale;
                vAimingOffset.Z = LookingOffset * Scale;
    The crossair now moves... Diagonally ! Instead of horizontally.

    It's better than nothing, I just have to find how to allow the crossair to move everywhere (except Y axis)...

    Edit : Olol, if I use the Z value of when we are crouching :
    vAimingOffset.X = LookingOffset * Scale;
                vAimingOffset.Z += P.EyeHeight - P.default.EyeHeight + LookingOffset * Look.Z * scale;
    The cursor is moving like the infinite symbol (see picture below).
    The red infinite symbol is the path that the crossair follow.


    What if I use the same value for the X axis ? ^^

    Should I divide by zero to make it works ?

    Edit² : Ok so, if I use the same value for X, the crossair is following a path that looks like a circle (Like when we are crouch if we haven't modified the UT2D scripts), but the circle is at the right of the character, not around him.

    If I delete the X line (and the Z line I added) the cursor is fixed in the center of the character, it's better than having a crossair that moves horizontally, diagonally or following a circle path.

    So, I've seen everything EXCEPT what I would like to get, please, halp. =(

    (I still have the camera problem (that follows the crossair instead of the character) but I still haven't find the line that set it up)
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 8
    EDIT: Too long copying and pasting for work has left my mind to rot. Ignore me.
  • NothingHappens
    *ignore haiddasalami *
  • NothingHappens
    Nobody knows or want to help me ? =/
  • NothingHappens
    Please guys...
  • moose
    Offline / Send Message
    moose Polycount Sponsor
    NothingHappens, not sure if you are also posting on the UDK forums, but it may be a good place to get additional info for some more script oriented questions!

    Support, Tips, and Advice
  • NothingHappens
    I registered to this forum, activated my account then tried to create a thread where I could ask my question.

    I was always having a page that says that I do not have the permission to "do this"...
    I've tried for one week then forget this.
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 9
    Someone already did the whole side-scroller thing on UDK, and a few people even put the solution in their sigs it's asked so much. Take a look at the game Wuzzle. It's a bit complicated to do right, and is a worthy challenge. I would just hand over my files, but you are on the right track.

    Also, I would take a look at this:
    vAimingOffset.Z += P.EyeHeight - P.default.EyeHeight + LookingOffset * Look.Z * scale;
  • NothingHappens
    Hi Lamont,

    About the game "Wuzzle", you mean Whizzle, no ?

    For your quote, I've already tried it and tried many things with it.
    Simply adding it make just the crossair move diagonally instead of horizontally.
    And I don't remember the other things that I tried but I think I spoke about it previously.
    But thanks for it. ^^

    I know that many, many, many people ask for it but I've never seen any real answer.
    I say real because I found an answer where somebody said that he changed something in the script and we just have to copy/paste it to get the freely moving crossair.

    I've copied and pasted it, tried it, and he just deleted the vAimingOffset.X line (so the crossair is stuck "in" the character; it corrected the camera's problem (following the crossair instead of the character is awful), but not the crossair which wasn't able to move freely.)

    I'm still trying to fix both of the problems but I've tried everything what I thought, I don't have anymore ideas I'm like reading the script over nine thousand times by day to find it... =/
  • Lamont
    Offline / Send Message
    Lamont polycounter lvl 9
    Bundle up your project and code and make a dropbox for it, I'll go through it and see what we can figure out, you're almost there. Feel free to add me to MSN.

    I gotta go to work from 10am to 6pm Japan time, so don't get disgruntled if I don't respond between those times.
Sign In or Register to comment.