Castlevania Dungeon Forums
The Castlevania Dungeon Forums => Fan Stuff => Topic started by: KaZudra on August 03, 2011, 07:17:57 PM
-
I need to know everything on what I need to Make this game, Foreground Objects, Background Objects, Day/Night Panorama with Sun/Moon all that good stuff.
Game maker has gotten to the fustration point when it comes to mapping, and I Need to get at least 1 room done before I can really kick the game off
-
Brother, might you wanna ask this in the Fan Stuff thread? A lot of game makers are over there. What type of game is this? A Castlevania fangame or something different? :o
-
its the Cv2 fangame, apparently Game maker isnt user friendly, All I really need is all the relevant basics and I could get the game mostly done.
-
You want me to move the thread over to Fan Stuff? Doesn't look like it belongs here...
-
Sure.
Also, I managed to make the room, but its very bare and everything is an object.
-
There you go, topic has been moved.
*bows back out of unfamiliar territory, Fan Stuff.*
-
BACKGROUND: First off, don't use objects for background stuff in a room; use tiles. If possible make the background for the stage in a paint program, and then use 1 huge pic as a tile for the whole room; this will help you a bit performance wise (1 huge tile is better than multiple small ones).
OBJECTS: Next you would want to make an 8x8 object (to use with the script below), a 16x8 object (for stuff like a platform that is half a block tall), and a 16x16 one (for any solid tiles the script below misses).
TILES: Next you will need a tile to indicate solidity; I recommend a red 16x16 square. First make your stage on WHATEVER layer; if you want a foreground set a layer to be BELOW the value of the room's layer. Now on layer 100099 (can be changed in the script below) put a TILE in every spot where you want to indicate solidity in the room. Then use this script in EVERY ROOM'S creation code:
//initializes blue solid tiles that act like a collision map for the stage itself
var x_value;
var y_value;
for(count=0; count<=room_height/8; count+=1)
{
for(count2=0; count2<=room_width/8; count2+=1)
{
if tile_layer_find(100099,count2*8,count*8)
{
if !collision_line((count2-1)*8, count*8, count2*8, count*8, solid_tile_8x8, 0, 1)
{
brick=instance_create(count2*8, count*8, solid_tile_8x8);
x_value=0;
y_value=0;
with(brick)
{
while(tile_layer_find(100099,x+x_value*8,y))
{
image_xscale=x_value+1;
x_value+=1;
}
while(tile_layer_find(100099,x,y+y_value*8))
{
image_yscale=y_value+1;
y_value+=1;
}
}
}
}
}
}
This will create the solid objects for your tiles based on where you put ANY tile in layer 100099. Note, that if you get a BLUE SCREEN FULL OF TILES (you will know it when it happens and no I don't get why it happens but it is easily fixed), just remove a red tile from a corner and it will fix it (hence why I also said to create a 16x16 tile for any that are messed).
The good news is that with this script it will not make ONE object for each tile... but instead a LONG one for every set of tiles arranged horizontally or vertically touching side by side. It will help you a LOT performance wise, and also speed things up greatly. So if you have 50 tiles stacked up, it will make one LONG object instead of 50.
Keep tiles to 16x16, 8x16, 16x8, and at extreme smallest, 8x8. Only use the values 16x8.
More to come some other time; probably on slopes.
-
thanks, that solves tiling and thx to you I can Keep my photoshop layers.
Next one, Backgrounds the move along with the player, OoE abuses this but I plan on using it much more wisely
-
thanks, that solves tiling and thx to you I can Keep my photoshop layers.
Next one, Backgrounds the move along with the player, OoE abuses this but I plan on using it much more wisely
It sounds like you are referring to parallax. See here (scroll down to object based parallax): http://forums.tigsource.com/index.php?topic=3142.0 (http://forums.tigsource.com/index.php?topic=3142.0)
Quick side tip: for the player don't use the built in hspeed & vspeed (it can be used for items and enemies though in most cases); instead make your own. And if you use decimals for speed (I.E. 1.25) make sure that the player ONLY moves a whole number, and set up a var to increment the extra sub pixels per step or you will have issues with getting stuck in solids.
When the sub pixel variable is >= 1, the player moves an extra pixel, and subtracts 1 from the sub pixel var. This is used in DS vanias, SOTN, and most other platforming games.
Also make sure to make a separate "hitbox" object for collision with tiles, and then also the player object with animations, and for collision with items and enemies only.
-
thx man, with this I should get the Berkeley Mansion in no time.
One Last Question, this is a farfeched one too, whould you know how to make a Sky to transition from day to night? I only plan on making an East Sky and a West Sky, I think I can make a Globalized Panorama that scrolls according to the time set, but The Moon will Vary in Size and Constelation.
Still this is one of the kay elements in the game....
-
thx man, with this I should get the Berkeley Mansion in no time.
One Last Question, this is a farfeched one too, whould you know how to make a Sky to transition from day to night? I only plan on making an East Sky and a West Sky, I think I can make a Globalized Panorama that scrolls according to the time set, but The Moon will Vary in Size and Constelation.
Still this is one of the kay elements in the game....
That depends.... you can use a timer that changes the image_index and then have a variety of sky pics for each time of day. Or you can freeze the game, and in a quick transition have it become night. It's one of those things that you will have to experiment with or search the GM forums for different ones since it really depends on how you want to do it and what you want it to look like.
-
That depends.... you can use a timer that changes the image_index and then have a variety of sky pics for each time of day. Or you can freeze the game, and in a quick transition have it become night. It's one of those things that you will have to experiment with or search the GM forums for different ones since it really depends on how you want to do it and what you want it to look like.
the real ambition is mimicking a Zelda 64 sky with castlevania 64 Day/Night Cards. but I imagine there is some hard coding into that one.
I'll search around to see what I can Find.
-
Quoting my game code as your own, eh Esco? :P Yes, yes. I know it's your modification and not my original code. I'm just teasing.
For the day/night thing, I was thinking it would be cool to make it like an old clock, where the sun and moon are on a large background that just spins around. So the sun rises, sun sets, moon rises, moon sets. I thought that would be cute, and if done right, might look cool.
-
Quoting my game code as your own, eh Esco? :P Yes, yes. I know it's your modification and not my original code. I'm just teasing.
For the day/night thing, I was thinking it would be cool to make it like an old clock, where the sun and moon are on a large background that just spins around. So the sun rises, sun sets, moon rises, moon sets. I thought that would be cute, and if done right, might look cool.
Like a Giant Doughnut shaped Sky that Reels Clockwise with the sun and moon that kinda act like hands?
I kinda like the sound of that but if its not what your thinking I'm gonna need a Graphic example
-
have you seen my CV2 remake vids? It has a full day/night cycle that happens constantly. Its always changing in small increments so its very natural looking. I dont have a sun but it has a moon. It even has a clock in the top right corner that rotates smoothly with the time of day
-
have you seen my CV2 remake vids? It has a full day/night cycle that happens constantly. Its always changing in small increments so its very natural looking. I dont have a sun but it has a moon. It even has a clock in the top right corner that rotates smoothly with the time of day
yeah, I seen it and I Like it alot, the one thing I want to establish in the game is an internal Clock which the Day/night cycle and NPC's Timed actions can amount to.
I also love that Clock.
-
Quoting my game code as your own, eh Esco? :P Yes, yes. I know it's your modification and not my original code. I'm just teasing.
Are you referring to the script that generates objects for solid tiles, because that is not my work. Did you come up with it because I would like to give you credit for it, and I also have questions on a few things?
-
can game maker use Photoshop like image blending (light soft light and overlay)?
and Can I use animated backgrounds? or do those have to be objects?
-
Are you referring to the script that generates objects for solid tiles, because that is not my work. Did you come up with it because I would like to give you credit for it, and I also have questions on a few things?
If that's the code I showed you, then yes it was modified from Theou's CV3 engine.
-
can game maker use Photoshop like image blending (light soft light and overlay)?
and Can I use animated backgrounds? or do those have to be objects?
You can use image blending. You have to mess with it to see how they actually work.
There are two more function that are not only useful for drawing textures. Normally primitives are blended with the background using the alpha value. You can actually indicate how this must happen. Besides the normal mode it is possible to indicate that the new color must be added to the existing color or subtracted from the existing color. This can be used to create e.g. spot lights or shadows. Also it is possible to sort of take the maximum of the new and existing color. This can avoid certain saturation effects that you can get with adding. Note that both subtracting and maximum do not take the alpha value fully into account. (DirectX does not allow this.) So you better make sure the outside area is black. There are two functions. The first one only gives you the four options described above. The second function gives you a lot more possibilities. You should experiment a bit with the settings. If used effectively they can be used to create e.g. interesting explosion or halo effects.
draw_set_blend_mode(mode) Indicates what blend mode to use. The following values are possible: bm_normal, bm_add, bm_subtract, and bm_max. Don't forget to reset the mode to normal after use because otherwise also other sprites and even the backgrounds are drawn with the new blend mode.
draw_set_blend_mode_ext(src,dest) Indicates what blend mode to use for both the source and destination color. The new color is some factor times the source and another factor times the destination. These factors are set with this function. To understand this, the source and destination both have a red, green, blue, and alpha component. So the source is (Rs, Gs, Bs, As) and the destination is (Rd, Gd, Bd, Ad). All are considered to lie between 0 and 1. The blend factors you can choose for source and destination are:
bm_zero: Blend factor is (0, 0, 0, 0).
bm_one: Blend factor is (1, 1, 1, 1).
bm_src_color: Blend factor is (Rs, Gs, Bs, As).
bm_inv_src_color: Blend factor is (1–Rs, 1–Gs, 1–Bs, 1–As).
bm_src_alpha: Blend factor is (As, As, As, As).
bm_inv_src_alpha: Blend factor is (1–As, 1–As, 1–As, 1–As).
bm_dest_alpha: Blend factor is (Ad, Ad, Ad, Ad).
bm_inv_dest_alpha: Blend factor is (1–Ad, 1–Ad, 1–Ad, 1–Ad).
bm_dest_color: Blend factor is (Rd, Gd, Bd, Ad).
bm_inv_dest_color: Blend factor is (1–Rd, 1–Gd, 1–Bd, 1–Ad).
bm_src_alpha_sat: Blend factor is (f, f, f, 1); f = min(As, 1–Ad).
For example, the normal blending mode sets the source blending to bm_src_alpha and the destination blending to bm_inv_src_alpha. Don't forget to reset the mode to normal after use because otherwise also other sprites and even the backgrounds are drawn with the new blend mode.