Pics/video/demo or it never happened.
Good plan. But in terms of Trevor landing awkwardly it shouldn't be that big a deal. I've seen him land awkwardly in CVIII from such a high distance fall. It's as though for a brief moment, his legs enter the block he falls on, but then recovers as if nothing was wrong. Is that the problem you are having?
-X
with(all) draw_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, 0)
draw_text(x,y,obj_Trev.bbox_left)
draw_text(x+80,y,obj_Trev.bbox_right)
If they really wanted to mimic the NES, they should've made it a NES ROM instead of a PC game.
What's a good free site for hosting small files?It depends on what you're really looking for, but Mediafire (http://www.mediafire.com/) is perfect for uplaoding and sharing stuff IMO.
Why aren't you running the GMK in Game Maker and then testing it through there?
I'll test the runtime, but that would imply a GM error, not my error.
EDIT: The executable worked just fine for me. You aren't trying to simply rename the file from .gmk to .exe are you?
I did notice one error just now in my program: if hit and bumped back toward a ledge, Trevor ends up in the ledge. Implies a sprite error. I'll have to check my bounding boxes.
I might make the CV3 font into a true-type font at some point in the future, but I'm working on music tonight (yay) so that would have to wait.
Found a little bit of a bug. Was standing all the way to the right of the test room next to the big wall and hitting the jump button did zilch. I'm guessing it's detecting the block on the upper right of Trevor's head. Also, I threw a knife at a candle that was half way off the screen and the knife disappeared before it made contact with the candle. Maybe give the weapons some leeway before you kill them for being off screen. Here's another thing... Putting a plat form near the top and Tossing an axe when Trevor is off screen makes him go into an animation fit that I think is probably caused by the sub-weapon being immediately destroyed.
By the way, could you explain to ma how the stage init goes about creating the block objects?
var s;
var r;
for(i=0;i<=room_height/8;i+=1)
{
for(j=0;j<=room_width/8;j+=1)
{
if tile_layer_find(999998,j*8,i*8)
{
if!collision_line((j-1)*8,i*8,j*8,i*8,prt_ground,0,1)
{
brick=instance_create(j*8,i*8,prt_ground);
s=0;
r=0;
with(brick)
{
while(tile_layer_find(999998,x+s*8,y))
{
image_xscale=s+1;
s+=1;
}
while(tile_layer_find(999998,x,y+r*8))
{
image_yscale=r+1;
r+=1;
}
}
}
}
}
}
##
##
##
##
########
########
This arrangement is a valid NES block arrangement in all CV games
##
##
##
##
########
########
This is not a valid arrangement. Period.BTW, just something for your consideration. After you've finished making this a perfect clone of CV3 how about programming in all the sub-weapons & whip forms from CV2 as well? I'm sure those wanting to do a CV2 based game would greatly appreciate that stuff already being integrated.
Well, here's an update. My fiance -- yes, you read that right -- says I'm not allowed to program while we're apart until February (she's in nursing school down here in Cali until then). I swore to her that I wouldn't let my programming interfere... too much. So I may or may not be able to get a lot done with it. If the programming makes me too quiet or forgetful, I'm in deep shit.
Guys. Maybe she meant she didn't want him doing it too much. It's a possibility.
Anyone think about that?
It occurred to me, however anyone weather or not are a loved one, telling someone else what they can and cannot do that goes against their personal choices is in direct violation of the declaration of human rights. This is how I personally feel about it. Others may feel different or not really care.
What if she worded it incorrectly? Or what if TheouAegis worded it incorrectly (which I'm unsure about).
However, I doubt she meant any harm from it, and would apologize if she knew if this is how people would react to her saying that. That's just my guess, since I know jack shit about her.
She let me work on it a little last night, but I fell asleep so didn't get a whole lot done. But yeah, she told me I could work on it a bit as long as I don't ignore her. We argued over it, so she relented a teensy bit.
She let me work on it a little last night, but I fell asleep so didn't get a whole lot done. But yeah, she told me I could work on it a bit as long as I don't ignore her. We argued over it, so she relented a teensy bit.Dude I am an 31, married for 3 years, in the military and also going to Game Design School full time. I will be finish in 5 quarters. My wife works and she knew I was passionate about video games when we met. When I am not working, 99% of the time I am doing my homework in front of a computer. I am either doing some digital art, or modeling, or learning a scripting language. When the brief opportunity comes up and I can relax or have a break, naturally I want to work on my game (here on the thread) or network and do that type of thing. Even if there is no time (when does really anyone have enough time) I make time for her and we do things together. The point I am trying to make we have never once "argued" over me doing my gaming thing because she knows that I am passionate about it and I am working hard to make a better life for us. That also means staying current with whatever new game design programs are out there. If she can't support you dude find someone else that does. No offense, but maybe she just isn't feelin you anymore and just using your programming thing as an excuse to piggie back on and leave. And just so you know my wife has two degree's and is a mortician. She did work at SOE for a year, but she is just a casual game player. It's not really her thing, like with me.
Well this is for me more than any of you and that's what I want!
It's actually very fast to make TSAs, in my opinion. Once I got used to the arrangement of my TSA sheet, I could recreate Wallachia Village quickly with little problem. Would take much longer in my opinion to build one tile at a time rather than pre-arranging the tiles and just building rooms 4 tiles at a time.
But whatever. Pray my girlfriend gets a job so I can spend more time on the program. She told me I could work on my program and now she's bitching that I don't pay attention to her when I'm programming. >_> Girl needs a job to fill her time.
Anyway, I just wanted to post here because I think I forgot to mention in my last progress report that in order to accomodate those who will not use TSAs, I scripted stage_init() to search the room on a tile-by-tile basis at layer 1000000 (the default tile layer) and check it against the tilesheet.
//Checks in the tile sheet if the tile is specified as a "solid" tile
//Expand this conditional for each "solid" tile in the tile sheet
tile_id = tile_layer_find(1000000,xx*16,yy*16);
if tile_id > -1 && !collision_line((xx)*16,yy*16,xx*16,yy*16,prt_ground,0,0)
{
if (tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0)
{
brick=instance_create(xx*16,yy*16,prt_ground);
span=0;
with(brick)
{
tile_id=tile_layer_find(1000000,x+span*16,y);
while (tile_id>-1)
{
//Checks if adjacent tiles are "solid" tiles according to the tile sheet
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
{
image_xscale=span+1;
span+=1;
tile_id=tile_layer_find(1000000,x+span*16,y);
}
else tile_id=-1;
}
span=0;
tile_id=tile_layer_find(1000000,x,y+span*16);
while (tile_id>-1)
{
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
{
image_yscale=span+1;
span+=1;
tile_id=tile_layer_find(1000000,x,y+span*16);
}
else tile_id=-1;
}
}
}
}
for(yy=0;yy<=room_height/16;yy+=1)
{
for(xx=0;xx<=room_width/16;xx+=1)
{
tile_id = tile_layer_find(1000000,xx*16,yy*16);
if tile_id && !collision_line(xx*16,yy*16,xx*16,yy*16+1,prt_ground,0,0)
{
//Checks in the tile sheet if the tile is specified as a "solid" tile
//Expand this conditional for each "solid" tile in the tile sheet
if (tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0)
{
brick=instance_create(xx*16,yy*16,prt_ground);
span=0;
stretch=0;
with(brick)
//Checks if adjacent tiles are "solid" tiles according to the tile sheet
{
tile_id=tile_layer_find(1000000,x+span*16,y);
while (tile_id && !collision_line(x+span*16,y,x+span*16,y+1,prt_ground,0,1))
{
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
{
image_xscale=span+1;
stretch=span;
span+=1;
global.haha=span;
tile_id=tile_layer_find(1000000,x+span*16,y);
}
else tile_id=-1;
}
span=0;
tile_id=tile_layer_find(1000000,x,y+span*16);
tile_id2=tile_layer_find(1000000,x+stretch*16,y+span*16);
while(tile_id && tile_id2)
{
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
{
if tile_get_left(tile_id2)=0 && tile_get_top(tile_id2)=0
{
image_yscale=span+1;
span+=1;
global.hehe=span;
tile_id=tile_layer_find(1000000,x,y+span*16);
tile_id2=tile_layer_find(1000000,x+stretch*16,y+span*16);
}
else tile_id2=-1;
}
else tile_id=-1;
}
}
}
}
}
}
}
//Shifts TSA tiles up every screen in vertical scrolling stages
//Use a new tile layer between 999981-999990 for every 256 pixels of height
if room_height>256
{
h=floor(room_height/256)-1;
room_base-=16*h+27;
with (all)
{
if y>256
{
y-=16*floor(y/256);
}
}
repeat(h)
{
tile_layer_shift(1000000-h,0,-16*h);
tile_layer_shift(999990-h,0,-16*h);
h-=1;
}
for(i=1;i<10;i+=1)
{
tile_layer_depth(999990-i,999990);
tile_layer_delete(999990-i);
}
}
//Places prt_ground objects over each tile in layer 999990
for(yy=0;yy<=room_height/16;yy+=1)
{
for(xx=0;xx<=room_width/16;xx+=1)
{
tile_id = tile_layer_find(999990,xx*16,yy*16);
if tile_id
{
if!collision_line(xx*16,yy*16,xx*16+1,yy*16+1,prt_ground,0,0)
{
brick=instance_create(xx*16,yy*16,prt_ground);
span=0;
stretch=0;
with(brick)
{
tile_id=tile_layer_find(999990,x+span*16,y);
while (tile_id && !collision_line(x+span*16,y,x+span*16,y+1,prt_ground,0,1))
{
image_xscale=span+1;
stretch=span;
span+=1;
tile_id=tile_layer_find(999990,x+span*16,y);
}
span=0;
tile_id=tile_layer_find(999990,x,y+span*16);
tile_id2=tile_layer_find(999990,x+stretch*16,y+span*16);
while(tile_id && tile_id2)
{
image_yscale=span+1;
span+=1;
tile_id=tile_layer_find(999990,x,y+span*16);
tile_id2=tile_layer_find(999990,x+stretch*16,y+span*16);
}
//This section checks for gaps in ceilings with TSA tiling.
//Ideally, your stages should rarely need to actually use this script.
span-=1;
hole[0]=0;
for (i=1;i<stretch;i+=1)
{
hole[i]=0;
tile_id=tile_layer_find(999990,x+i*16,y+span*16);
if !tile_id
{
hole[i]=1;
hole[0]=1;
}
}
if hole[0]=1
{
while hole[0]=1
{
image_yscale-=1;
span-=1;
hole[999]=0;
for (i=1;i<stretch;i+=1)
{
tile_id=tile_layer_find(999990,x+i*16,y+span*16);
if !tile_id
{
if hole[i]=1
hole[999]=1;
}
}
if hole[999]=0
hole[0]=0;
}
}
}
}
}
}
}
tile_layer_delete(999990);
for(yy=0;yy<=room_height/16;yy+=1)
{
for(xx=0;xx<=room_width/16;xx+=1)
{
tile_id = tile_layer_find(1000000,xx*16,yy*16);
if tile_id && !collision_line(xx*16,yy*16,xx*16,yy*16+1,prt_ground,0,0)
{
//Checks in the tile sheet if the tile is specified as a "solid" tile
//Expand this conditional for each "solid" tile in the tile sheet
if (tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0)
//||tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16
{
brick=instance_create(xx*16,yy*16,prt_ground);
span=0;
stretch=0;
with(brick)
//Checks if adjacent tiles are "solid" tiles according to the tile sheet
{
tile_id=tile_layer_find(1000000,x+span*16,y);
while (tile_id && !collision_line(x+span*16,y,x+span*16,y+1,prt_ground,0,1))
{
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
//||tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16
{
image_xscale=span+1;
stretch=span;
span+=1;
tile_id=tile_layer_find(1000000,x+span*16,y);
}
else tile_id=-1;
}
span=0;
tile_id=tile_layer_find(1000000,x,y+span*16);
tile_id2=tile_layer_find(1000000,x+stretch*16,y+span*16);
while(tile_id && tile_id2)
{
if tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0
//||tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16
{
if tile_get_left(tile_id2)=0 && tile_get_top(tile_id2)=0
//||tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16
{
image_yscale=span+1;
span+=1;
tile_id=tile_layer_find(1000000,x,y+span*16);
tile_id2=tile_layer_find(1000000,x+stretch*16,y+span*16);
}
else tile_id2=-1;
}
else tile_id=-1;
}
//This script checks for gaps in ceilings with single-layer tiling.
//Ideally, your stages should rarely need to actually use this script.
span-=1;
hole[0]=0;
for (i=1;i<stretch;i+=1)
{
hole[i]=0;
tile_id=tile_layer_find(1000000,x+i*16,y+span*16);
if !tile_id ||
(
!(tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0)
// &&!(tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16)
)
{
hole[i]=1;
hole[0]=1;
}
}
if hole[0]=1
{
while hole[0]=1
{
image_yscale-=1;
span-=1;
hole[999]=0;
for (i=1;i<stretch;i+=1)
{
tile_id=tile_layer_find(1000000,x+i*16,y+span*16);
if !tile_id ||
(
!(tile_get_left(tile_id)=0 && tile_get_top(tile_id)=0)
// &&!(tile_get_left(tile_id)=0 && tile_get_top(tile_id)=16)
)
{
if hole[i]=1
hole[999]=1;
}
}
if hole[999]=0
hole[0]=0;
}
}
}
}
}
}
}
So, there's been some issue, it would seem, about simulating stairs and other features in NES style Castlevania games in GameMaker and other frontends. You always see games where the heroes are able to jump onto and off of stairs, but pretty much never games where once you're on the stair you're stuck there. People complain that these kinds of Castlevania games are annoying and suck, but face it folks: they're realistic. If you try to jump on stairs like Castlevania's heroes have been able to do these days, you'd have to be a freaking gymnast to be able to handle the footwork and balance involved. And if you misjudge your leaps, you'll fall backward and become a paraplegic or fall forward and shatter your shins.
Current Version: 0.31 Alpha
Download it here (http://www.mediafire.com/?u4ki5kuc3ub4ju8)
Hey, can you guys check this and tell me if the sprites and background tiles get darker/blurred whenever they move. I know the status bar won't change (and I have some idea why), but I need to know if this is a bug in GM, a bug in my game, or a bug in my monitor.
http://www.mediafire.com/download.php?mumq95thmysl0mv (http://www.mediafire.com/download.php?mumq95thmysl0mv)
Stand-alone executable so anyone can test, not just GM users.
On that note, why would Corpse and Venus Weeds be green? They have no use for chlorophyll.
The leaf blade is divided into two regions: a flat, heart-shaped photosynthesis-capable petiole, and a pair of terminal lobes hinged at the midrib, forming the trap which is the true leaf.
/*
This script encodes the password. It must be called at the start of the Game Over's
password screen. This script is NOT used in the password entry screen.
Use: pw_encrypt()
Simple enough, huh? The following game variables are used:
ally (the current ally, use -1 or $FF for no ally)
stage (keep in mind some stages actually take up two values)
quest (as in whether the player is on the 2nd Quest hard mode)
The decryption script uses an additional optional variable:
path (no idea, but it is only set for two stages for Grant)
The player name is carried over from the name entry via the global array name[v].
Numerous bitwise operations based on 6502 Assembly are used here. They are located
in the "bitwise" script group. You shouldn't mess with these, just learn how to
use them. You can figure it out by looking through this messy code.
In order to alter this script for your own program, you must change pw_decrypt()
and cryptos() as well, since pw_decrypt checks what this script creates and
cryptos() contains the constants used to modify the variables.
The comment at the top is merely for keeping track of which cells correspond to
which Zero Page byte in the original assembly code. You can ignore them.
Grids are used for the variables and the displayed password because they can be
easily destroyed; this won't prevent hacking, but will make it slightly harder.
Same goes for the password itself, which is stored in a list. Also, grids offer
slightly more flexibility, even if they are more tedious to deal with and take
up more RAM when created, but this is freed up after one step.
This was coded almost straight from the original assembly code, with a few
minor shifts of variables. If it seems convoluted and repetetive, that is
because it is, but in some cases this is necessary. There are certain
functions used in the original code that are not available in GM, so the
bitwise scripts were created to simulate some features, namely the carry bit,
stored in the variable cbit. Understanding how cbit is used is important to
understanding how this script works.
*/
//A=0, X=1, Y=2, 00=3, 01=4, 04=5, 05=6, 88=7, 02=8, 03=9, 89=10, 08/0f=11/18
temp=ds_grid_create(12,1);
ds_grid_clear(temp,0);
pwt=ds_list_create();
ds_list_add(pwt,0);
pw=ds_grid_create(4,4);
var v01a;
v01a=irandom(255);
ally &= $FF;
//This subscript encrypts the player name and sums up the letters. Carry flag cleared.
for(ds_grid_set(temp,1,0,0);ds_grid_get(temp,1,0)<
8;ds_grid_add(temp,1,0,1))
{
ds_grid_set(temp,0,0,name[ds_grid_get(temp,1,0)]
);
adc(0,cryptos(0,ds_grid_get(temp,1,0)));
cbit=0;
adc(0,ds_grid_get(temp,0,0));
sta(3);
}
cbit=1;
amp(0,$7);
sta(3);
ds_grid_set(temp,0,0,stage);
//Change $11 to the highest resumable stage value
cmp(0,$11)
if cbit ds_grid_set(temp,0,0,$11);
stage=ds_grid_get(temp,0,0);
lsr(a); // These
ds_grid_set(temp,0,0,stage); // lines
lsr(0); // simply
rol(3); // shuffle
ds_grid_set(temp,0,0,v01a); // cbit
lsr(0); // around
repeat(3) rol(3); // just for this line
ds_grid_set(temp,0,0,ally);
//This checks if Accumulator is positive. Anything greater than $80 is negative.
if ds_grid_get(temp,0,0)>=$80 or ds_grid_get(temp,0,0)<0 ds_grid_set(temp,0,0,0);
ora(0,0,3);
asl(0);
ora(0,quest);
sta(7);
ds_grid_set(temp,0,0,v01a);
lsr(0);
ds_grid_set(temp,5,0,$50+$50*cbit);
tma(7,8);
amp(8,$F0);
tma(7);
repeat(4) asl(0);
sta(9);
cbit=0;
adc(0,0,8);
sta(4);
tma(5);
eor(0,0,8);
sta(3);
tma(5);
eor(0,0,9);
cbit=0;
adc(0,0,3)
repeat(4) lsr(0);
ora(0,0,4);
cbit=0;
adc(0,stage);
sta(10);
tma(7,3);
for(ds_grid_set(temp,1,0,0);ds_grid_get(temp,1,0)<
8;ds_grid_add(temp,1,0,1))
{
lsr(3);
rol(11+ds_grid_get(temp,1,0));
lsr(4);
rol(11+ds_grid_get(temp,1,0));
}
cbit=1;
ds_grid_set(temp,2,0,stage);
lsr(2);
for(ds_grid_set(temp,1,0,2);ds_grid_get(temp,1,0)>
=0;ds_grid_add(temp,1,0,-1))
{
ds_grid_set(temp,3,0,cryptos(1,ds_grid_get(temp,2,0)));
amp(3,$C);
repeat(2) lsr(3);
ds_grid_set(temp,0,0,cryptos(1,ds_grid_get(temp,2,0)));
amp(0,$30);
ora(0,0,3);
if cmp(0,cryptos(2,ds_grid_get(temp,1,0)))==0 break;
}
tma(1);
repeat(3) asl(0);
adc(0,0,1);
sta(2);
for(ds_grid_set(temp,1,0,0);ds_grid_get(temp,1,0)<
9;ds_grid_add(temp,1,0,1))
{
ds_grid_set(temp,4,0,cryptos(3,ds_grid_get(temp,2,0)+1));
amp(4,$30);
ds_grid_set(temp,0,0,cryptos(3,ds_grid_get(temp,2,0)+1))
amp(0,$3);
repeat(2) asl(0);
ora(0,0,4);
ora(0,0,11+ds_grid_get(temp,1,0));
ds_list_add(pwt,ds_grid_get(temp,0,0));
ds_grid_add(temp,2,0,1);
}
cbit=1;
ds_grid_set(temp,2,0,stage);
lsr(2);
ds_list_replace(pwt,0,cryptos(1,ds_grid_get(temp,2,
0)));
ds_grid_destroy(temp);//Use: draw_clipped()
//Emulate's NES limitations by clipping sprites (8x8) from metasprites on the left screen edge
if clip_sprites
{
//NOTE: Sprite origins must be centered.
var _lbox,_left,_wide,_xspr;
//Find left edge of sprite in room
_lbox=x-abs(sprite_xoffset);
//Check if left edge is outside view
if _lbox<view_xview
{
//Calculate partial sprite pixels outside leftmost view
_left = min(ceil((view_xview-_lbox)/(8*abs(image_xscale)))*8*abs(image_xscale),abs(sprite_width));
//Calculate remaining visible pixels for full sprite
_wide = (sprite_width-_left*sign(image_xscale))/abs(image_xscale);
//Calculate the x-coordinate for the partial sprite
_xspr = _lbox+_left;
//Account for negative scaling
_left = min(_left,sprite_width+_left)/image_xscale;
//Draw the clipped sprite
draw_sprite_part_ext(sprite_index,-1,_left,0,_wide,sprite_get_height(sprite_index),_xspr,y-sprite_get_yoffset(sprite_index),image_xscale,image_yscale,c_white,1)
}
else
//Hide the sprite if no partials are fully visible on the right
if _lbox+8*abs(image_xscale)<view_xview+view_wview
{
//Draw sprite as normal
draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,0,c_white,1);
}
if head
{
//Reverse Bone Pillar's head
var head_xscale;
head_xscale = image_xscale;
if object_index=obj_BonePillar
head_xscale*=-1;
//Find left edge of sprite in room
_lbox = x-sprite_get_xoffset(head)*abs(head_xscale);
//Check if left edge is outside view
if _lbox<view_xview
{
//Calculate partial sprite pixels outside leftmost view
_left = min(ceil((view_xview-_lbox)/(8*abs(head_xscale)))*8*abs(head_xscale),abs(sprite_get_width(head)*head_xscale));
//Calculate remaining visible pixels for full sprite
_wide = (sprite_get_width(head)*head_xscale-_left*sign(head_xscale))/abs(head_xscale);
//Calculate the x-coordinate for the partial sprite
_xspr = _lbox+_left;
//Account for negative scaling
_left = min(_left,sprite_get_width(head)*head_xscale+_left)/head_xscale;
//Draw the clipped sprite
draw_sprite_part_ext(head,-1,_left,0,_wide,sprite_get_height(head),_xspr,y-sprite_yoffset-sprite_get_yoffset(head),head_xscale,image_yscale,c_white,1)
}
else
if _lbox+8*abs(head_xscale)<view_xview+view_wview
{
//Draw sprite as normal
draw_sprite_ext(head,-1,x,y-sprite_yoffset,head_xscale,image_yscale,0,c_white,1);
}
}
}
else
{
//Draw sprites as normal
draw_sprite_ext(sprite_index,-1,x,y,image_xscale,image_yscale,0,c_white,1);
if head
if head=spr_BonePillar
draw_sprite_ext(head,-1,x,y-sprite_yoffset,-image_xscale,image_yscale,0,c_white,1);
else
draw_sprite_ext(head,-1,x,y-sprite_yoffset,image_xscale,image_yscale,0,c_white,1);
}
//Calling Script
if argument0.bbox_left>=sprite_get_bbox("bbox_right")-4 || argument0.bbox_right<=sprite_get_bbox("bbox_left")+4
exit;
with argument0
if obj_Belmont.x!=ceil(mean(sprite_get_bbox("bbox_left"),sprite_get_bbox("bbox_right")))
if obj_Belmont.jump == 1
{
visible = 1;
image_speed=1/12;
image_xscale=sign(obj_Belmont.x-ceil(mean(sprite_get_bbox("bbox_left"),sprite_get_bbox("bbox_right"))));
with obj_Belmont belmont_land();
}//Step Event in Trap Door object
var tile_L,tile_R;
tile_R=tile_layer_find(1000000,x,y);
tile_L=tile_layer_find(1000000,x-16,y);
if tile_L==tile_R
tile_L=-1;
if (image_index==2/12 || image_index==5+2/12)
{
tile_add(tile_get_background(tile_R),void_left,void_top,16,8,x,y,999998);
tile_add(tile_get_background(tile_R),void_left,void_top,16,8,x-16,y,999998);
if sprite_index == spr_trapspike
{
tile_add(tile_get_background(tile_R),void_left,void_top,16,8,x,y+8,999998);
tile_add(tile_get_background(tile_R),void_left,void_top,16,8,x-16,y+8,999998);
}
}
if image_index==1 || image_index==6
{
image_speed=1/11;
if obj_Belmont.y==y && obj_Belmont.timeline_running=false
obj_Belmont.y+=1;
}
if image_index==4 || image_index==9
image_speed=1/12;
if (image_index==5 || image_index==0) && image_speed!=0
{
tile_delete(tile_layer_find(999998,x,y));
tile_delete(tile_layer_find(999998,x-16,y));
if sprite_index = spr_trapspike
{
tile_delete(tile_layer_find(999998,x,y+8));
tile_delete(tile_layer_find(999998,x-16,y+8));
if image_index==0
{
tile_delete(tile_layer_find(999999,x,y+16));
if tile_L
tile_delete(tile_layer_find(999999,x-16,y+16));
}
else
if image_index==5
{
tile_R=tile_add(tile_get_background(tile_R),tile_get_left(tile_R),tile_get_top(tile_R)+(y & 16)*dual_layer,tile_get_width(tile_R),16,tile_get_x(tile_R),tile_get_y(tile_R)+16+(y & 16),999999);
tile_set_scale(tile_R,1,-1);
if tile_L
{
tile_L=tile_add(tile_get_background(tile_L),tile_get_left(tile_L),tile_get_top(tile_L)+(y & 16)*dual_layer,tile_get_width(tile_L),16,tile_get_x(tile_L),tile_get_y(tile_L)+16+(y & 16),999999);
tile_set_scale(tile_L,1,-1);
}
}
}
visible = 0;
image_speed = 0;
image_xscale= 1;
image_index = round(image_index);
}//End Step in Trap Door object
//Handles collision of Belmont with spikes
if !obj_Belmont.hit
{
if sprite_index==spr_trapspike && image_speed==0
{
if image_index==5
{
with obj_Belmont
if sprite_get_bbox("bbox_left")<other.bbox_right && sprite_get_bbox("bbox_right")>other.bbox_left
{
if vspd>=0
{
if y==other.y
{
enemy=other.id;
belmont_touch();
}
}
}
}
else
{
with obj_Belmont
if sprite_get_bbox("bbox_left")<other.bbox_right && sprite_get_bbox("bbox_right")>other.bbox_left
{
if vspd<=0
{
if sprite_get_bbox("bbox_top")<other.bbox_bottom && sprite_get_bbox("bbox_bottom")>other.bbox_bottom
{
enemy=other.id;
belmont_touch();
}
}
}
}
}
} A+=B;
carry=A>255;
X+=hspeed+carry;
C+=D;
carry=C>255;
Y+=vspeed+carry;
B-=(y-ystart);
carry=B<0 || B>255;
vspeed-=1-carry;
switch step_counter
{
case 0:
case 1:
case 2:
case 3: vspeed=-5; break;
case 4:
case 5:
case 6:
case 7: vspeed=-3; break;
}Each case has a corresponding address in the ROM (in case you ever wondered why a Switch statement is slightly faster than a bunch of IF statements, that's why). There's something like 26 bytes dedicated just to storing Trevor's actual vertical speed in the ROM.
/*
This script simply modifies the higher three palette entries of a 4-color GIF.
The script looks for the specified file in the Temp directory and rewrites it.
argument0: GIF file (string, sans extension)
argument1: Color 1 (real)
argument2: Color 2 (real)
argument3: Color3 (real)
*/
var i,chr,col,pal;
chr = file_bin_open(temp_directory+'\'+argument0+".gif",1);
for(i=$10;i<$19;i+=3)
{
col = (i-$10) mod 3;
switch (i-$10)div 3
{
case 0:
pal = argument1;
break;
case 1:
pal = argument2;
break;
case 3:
pal = argument3;
break;
}
file_bin_seek(chr,i);
switch col
{
case 0:
file_bin_write_byte(chr,color_get_red(pal));
break;
case 1:
file_bin_write_byte(chr,color_get_green(pal));
break;
case 2:
file_bin_write_byte(chr,color_get_blue(pal));
break;
}
}
file_bin_close(chr);var i,chr,col,pal;
chr = file_bin_open(temp_directory+"\"+argument0+".png",1);
if chr show_message("File Open!");
for(i=$61;i<$6D;i+=3)
{
col = (i-$61) mod 3;
switch (i-$61)div 3
{
case 0:
pal = argument1;
break;
case 1:
pal = argument2;
break;
case 3:
pal = argument3;
break;
case 4:
pal = argument4;
break;
}
file_bin_seek(chr,i);
switch col
{
case 0:
file_bin_write_byte(chr,color_get_red(pal));
break;
case 1:
file_bin_write_byte(chr,color_get_green(pal));
break;
case 2:
file_bin_write_byte(chr,color_get_blue(pal));
break;
}
}
file_bin_close(chr);
<DELETED>
I'm curious what Esco's post was too.
The original project up to v0.3 is pretty much scrapped. It's a workbench. I use it every so often for some things, but the current version is just a rewrite of the actual NES code, some things scrapped. For example, I was including Sypha, Grant and Alucard at first, but have since decided to only focus on Trevor's Code for the time being to simplify things a little. When I'm not working or watching Ultraman episodes, I'm usually looking over NES code. So in a sense, the project is on indefinite hiatus. However, every so often I do release "new code". I don't use the tiles method anymore, opting for collision maps now, but I still stand by most of what I have come up with over the months (or has it been a year since I scrapped it)? The password and name entry screens I have no intention of changing, except maybe someday trying to simplify the code, although I doubt that will ever happen. The Medusa Head/Bat/Winged Demon code I posted here took me a long ass time to come up with.
My problem was I kept using a literal movement script (discussed in the latter pages of this thread), but when I finally consolidated the three variables (vert_1,vert_2,vert_3) into a single variable, the entire sine wave code Konami used made perfect sense and I was able to come up with that formula. Most code I still suck at interpreting. I'm sure if I showed Esco the White Dragon script, he might be able to make sense of it, but I only barely understood it the last time I looked at it and in my rewrite of my code (it's like my fourth rewrite that i'm on right now), I haven't gone back to tackle the White Dragon yet. Right now I've put enemies on hold to try to break down the mechanics of the Step Event (so to speak) and that's taking me a long time to get through. There are lots of little things going on behind the scenes that affect the mechanics of the game that I haven't worked out just yet. And I'm sure they have some code that they ripped off other games that have no use either, so some of the code might be dummy code. Some variables might pertain to Grant or Alucard, but since I'm not coding them I'd have no idea.
But I've already adopted quite a few coding styles based on CV3, so I don't care anymore if people are waiting for a release -- I'm taking my time just learning from Konami. It's also fun seeing code and thinking, "WHy the hell did they do that? It'd take up less cart space and possibly even less CPU if they just did this instead." Or "Wow, Konami made a typo here!" It's kinda like the episode/volume of Hikaru No Go where Hikaru points out a flaw in Sai's match against Toyo-meijin and Sai was like, "Oh snap, Hikaru's progressed so far already!" I'm not a fast learner, though. If I was, I'd know what the fuck I'm looking at half the time.
....
Wait were you the guy that had that ROM hack that everyone was like, "Sick tiles mate!"? If I ever got my code taken care of, I was gonna recruit that guy for custom tiles. My current pet project is to implement attribute tables, but I think that's actually too simple so I put it on hold. I know it's ticking Inccubus off cuz he doesn't want to use tile assemblies or palette-swapped backgrounds (although I have serious doubts that a palette swapped background is all that worthwhile in Game Maker). But the palette swap demo that didn't have enough comments for Esco is already being incorporated into my project. Hence another reason I had to do a rewrite. Also, once I figured out what the subroutine for playing sounds was in CV3, I had to go back and locate all the sound_play subroutines so I rewrote the code while I was at it. I've isolated a couple more variables since then too. I wish I could get the ROM offset notes from the guy that made reVamp, in case there's something "obvious" I missed.