Castlevania Style Platformer

This forum is currently in read-only mode.
0 favourites
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • Hello all, I'm new,

    So I'm working on a platform engine in the style of the DS Castlevanias. I want to be able to go from single screen rooms where the character exits the edge of the screen, and appears in a larger scrolling room, but I don't want to have to change layouts, any suggestions? I have no graphics at all, just coloured blocks, so when I say in the style of Castlevania, I simply mean the gameplay, not the look or story at all lol.

    I'd love to post some caps to show what I'm doing, but I'm not sure how to get them online, like I said, I'm new lol.

  • Why don't you want to change layouts?

    Anyway, you could do this with events easily enough if you don't want to change layouts, just change the settings for layer scrolling, and an event to move the player to the new area elsewhere in the layout. As for the flip screen style, could use invisible trigger sprites at the edges of the screen, so when the player passes over them, it triggers an event to move the display across X number of pixels or something along those lines.

  • That's a good idea, the main reason I don't really want to change layouts is simply because I can't seem to get any of my events to carry over to the different layouts, I guess I'm just not doing it right, and I don't want to have to copy/paste every single game event into every layout I use, so I guess my question should've been, how do I get room layouts to use events from my main engine layout

  • That's a good idea, the main reason I don't really want to change layouts is simply because I can't seem to get any of my events to carry over to the different layouts, I guess I'm just not doing it right, and I don't want to have to copy/paste every single game event into every layout I use, so I guess my question should've been, how do I get room layouts to use events from my main engine layout

    You can include an event list from another layout, that way anything in that event list will be available in any including it, and you only need to edit the single list to effect the others.

  • Here's a simple method of creating camera zones that only uses two events:

    http://dl.dropbox.com/u/529356/cameraZones.cap

    (v0.99.72)

    The zoneBorder objects (which are the red tiled backgrounds) have five pieces of information stored in each one as private variables. There is xMin, xMax, yMin, yMax, and "myZone."

    The global variable "zone" indicates which camera zone the player is in. It starts off in zone 1 as the default. The system looks up the zoneBorder with the myZone variable that matches global('zone') and uses the min and max info to restrict the scrolling. Notice that even though there is empty black space in the layout, you don't see any at runtime.

    When the player touches a zoneBorder it changes the global('zone') variable. They're set a space apart so that a player can't touch one and then turn around without un-touching the old zoneBorder, which could cause the camera to get lost. Notice also that the "inside" areas have identical information in the zoneBorder objects at either end. The two rooms in the middle each have two zoneBorders because there are two entrance/exit points that lead to the same space.

    Anyway, here's how the scrolling works:

    System: Scroll to X: 
    clamp(player.x, zoneBorder.Value('xMin'), zoneBorder.Value('xMax'))[/code:13k9cl0z]
    
    "Clamp" just means we're restricting a number between two points.  We want to follow the player, but not above or below certain limits.  it works like this:
    
    clamp(target value, minimum value, maximum value)
    
    If the target value is smaller than the minimum, then clamp will return the minimum.  If the target value is larger than the maximum, then clamp will return the maximum.  If the target is between the two, then everything is normal.
    
    So, clamp says to follow the player, but if the player goes over or under the limit, then stop following.  You can do this for both the X and Y axis, making single-room areas (like zone 1 and 3), one-way scrolling areas (like zone 2's horizontal-only scrolling) or two-way scrolling areas (like zone 4).
    
    For more information on clamp() and other expressions, check out the wiki.
    
    The numbers for the x and y values in the zoneBorder variables were just put there with a little math.  You have to do a little figuring in order to set them up.  For instance, if you have a screen that is 320x240 pixels (like in the example) then you will want to stop the camera half the distance away from the edge of the room, which is 160 pixels in the x axis and 120 in the y.  This makes it so when you are half a screen away (that is, "centered" on the end of the room) then the camera will stop.  Once you've figured out the numbers for the current zone, just type them in to the border object's values and you're done.
    
    Also... I made the camera events on a second event sheet to show how to use external events.  Notice under the Project tab there is a "cameraSheet" event sheet.  You can open the sheet by double-clicking the icon.  
    
    This sheet can be used on any layout.  I've included it in the Layout 1 Events by right-clicking in the event editor and selecting "Include event sheet."
    
    Also note that you could control lots of other things with the global('zone') variable.  You could make enemies active only when the player is in the same zone by checking if an enemy's "myZone" variable matches up, and set any enemies in other zones dormant.  This could cut down on processing or simply keep them from chasing you into places where they shouldn't.  You could activate ambient sounds or new music based on what zone you are in, or trigger other environmental things.  Or start up a boss intro when you walk into a boss room, etc.
    
    Anyway, if you have any questions, feel free to ask.
  • Wow, thanks a bunch, that seems like some pretty comprehensive help lol. Thanks guys. Though I seem to get a runtime error when I try to open your cap deadeye, I'm not sure what to do about that, I'm using the most current version of Construct so I imagine it's the "unstable" one I keep hearing about, would that be the problem?

  • Wow, thanks a bunch, that seems like some pretty comprehensive help lol. Thanks guys. Though I seem to get a runtime error when I try to open your cap deadeye, I'm not sure what to do about that, I'm using the most current version of Construct so I imagine it's the "unstable" one I keep hearing about, would that be the problem?

    Yep, that'll be it, don't worry, the "unstable" 72 is fine to use.

  • You can always check out the Construct Discussion forum for the latest release. It's stickied at the top. They don't get put onto the front page until the community has had a chance to test them out. As such, they are marked "unstable," and sometimes they are, but there aren't any really glaring issues with 0.99.72, and it is a better version than 0.99.62.

    If you're going to be a beta tester (and by using beta software, that's that's sort of implied

  • To note: Changing layouts is really what you'd want to do, as it goes just the way that Castlevania's rooms behave: every enemy is reset.

    -Make your player and player related objects global so you can reposition it.

    -make an external event sheet for generic stuff that happens in every room

    -include this external event sheet in every room

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How do I post my .cap files so you guys can see where I suck lol

  • How do I post my .cap files so you guys can see where I suck lol

    You can attach them to your post in the upload section, or use dropbox to host them, and link back here.

  • To note: Changing layouts is really what you'd want to do, as it goes just the way that Castlevania's rooms behave: every enemy is reset.

    You could, yes, but it's a trade-off. Making and tweaking levels and level design in general would be a pain. With larger chunks of several rooms strung together you're sort of meeting it half-way. And it's not too terribly difficult to "turn off" an enemy if it's not currently on the screen.

    How do I post my .cap files so you guys can see where I suck lol

    The board-preferred method is to use Dropbox:

    https://www.dropbox.com/

    It sets up a folder on your hard drive that you can drop files into, then right-click your file and select "Copy link." It automatically uploads whatever you put into the folder to the web (it also syncs your folders if you have it set up on different computers), and the links it gives you are direct links with no download pages or ads. And it's free.

  • Making and tweaking levels and level design in general would be a pain.

    How so? in Castlevania there are no "levels", just rooms. Only special items do not replenish, items that you have to track anyway.

    Every room (which go from small hallways to multilevel halls) gets its own layout and is done separately. The only thing that could be a hassle would be connecting them, and even now I'm thinking of a trick for that

  • > Making and tweaking levels and level design in general would be a pain.

    >

    How so? in Castlevania there are no "levels", just rooms. Only special items do not replenish, items that you have to track anyway.

    Every room (which go from small hallways to multilevel halls) gets its own layout and is done separately. The only thing that could be a hassle would be connecting them, and even now I'm thinking of a trick for that

    I think what he's saying is the thought of having to follow where all those different locations are if their all split up across many many layouts could be a bit annoying after you get beyond a certain number, and grouping them up inside fewer layouts might work out better (I didn't think of that at first when I suggested different layouts).

    Saying that though, if his game is smaller, then layouts would be the better choice.

  • You guys are awesome, has anyone mentioned that lately? So here's my attempt at dropboxing my current caps...

    http://dl.dropbox.com/u/4075855/Brent%27s%20Platform%20Engine.cap

    http://dl.dropbox.com/u/4075855/Brent%27s%20Platform%20Engine%20Room%20Test.cap

    The first one is 1600x900, so for anyone with smaller res, you should maybe check that, and it was simply my attempt at trying to get my character moving and interacting with the world, Arrows, S for jump, D for strike, Space for run, and Esc to exit. Don't know how to make them customizable yet...

    The second is 1024x768, it's the same engine with some small changes, mostly just sprite size and jumping speed, it's just meant as a way for me to figure out how to have a single event sheet running the game behind multiple layouts.

    [quote:p2p1uc1h]I think what he's saying is the thought of having to follow where all those different locations are if their all split up across many many layouts could be a bit annoying after you get beyond a certain number, and grouping them up inside fewer layouts might work out better (I didn't think of that at first when I suggested different layouts)

    Now that I think about it, I imagine the way that Castlevania games do it would translate into having single layouts for the bigger sections of the map where all the room are related, but having a few different sections, thus multiple layouts...if that makes sense lol. They have sections with load rooms in between for things like palette changes and monster loading I believe. Would it be resonable to do it that way? The only reason I'm so focused on their platform engine is that it seems to feel pretty much perfect when I play (granted I'm biased as I have a large majority of the games in the series), so I figure, if it ain't broke, make your own version

    [quote:p2p1uc1h]Saying that though, if his game is smaller, then layouts would be the better choice.

    Kinda hoping to make some large outdoor regions, as well as a couple indoor mazes to start with. After that, I'd like to start populating it with bad guys of varying degrees. I'm just trying not to let my imagination get further along than my learning speed lol, which does tend to happen.

Jump to:
Active Users
There are 2 visitors browsing this topic (0 users and 2 guests)