![]() |
|
|
|
#136 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
i think the first and second methods for the powerbar would work, you won't know until you try
also...you won't imagine how small my ship code is in the main event, or atleast, it looks small. Code:
scrTakekeys() scrTakeskins() scrSkinsprite() scrTimerset() time-=1
global.optdir+=4
if time<1 {if global.mode=1{ if kup && !kdown{
if image_index<8 && image_index>3 image_index+=1;}
else if image_index>4 image_index-=1; if kdown && !kup{
if image_index>0 && image_index<5 image_index-=1;}
else if image_index<4 image_index+=1;}
time=3} if kdown y+=1+global.speedup
if kup && y>view_yview+17 y-=1+global.speedup
if kleft x-=1+global.speedup
if kright x+=1+global.speedup
y=min((view_yview+view_hview)-16,max(view_yview+16,y))
x=min((view_xview+view_wview)-24,max(view_xview+16,x))
if global.scrollspeed>=1 && global.scroll=1
x+=global.scrollspeed
scrOptionqueue()
if global.scrollspeed>=1
x+=global.scrollspeed if kshoot{
if !(global.laser>0 && global.lastpow=1) && !((global.double>0 && global.lastpow=0) && global.weaponchoice=1)
scrBeam() scrDouble() scrLaser() scrMissile()}
if weapontime[0]<1 canshoot[0]=1
if weapontime[1]<1 canshoot[1]=1
if instance_number(oLaser)=0 lasershot=0
if instance_number(oLaser)>16+(global.laser*4) lasershot=1
if !kshoot lasershot=1 if invincible=1
visible=!visible else visible=1
//note, does not support inf lasers because i was too lazy to do that
if instance_number(oLaser)=0
global.lasercount[0]=0
if instance_number(oLaser2)=0
global.lasercount[1]=0
if instance_number(oLaser3)=0
global.lasercount[2]=0
if instance_number(oLaser4)=0
global.lasercount[3]=0
if instance_number(oLaser5)=0
global.lasercount[4]=0
reload=max(reload-1,0)
if invincible=0 && place_meeting(x,y,oSolid)
scrShipdie() move_snap(1,1)
__________________
well... im out of ideas for a signature. Last edited by AlexR22; 27th January 2010 at 15:10. |
|
|
|
|
|
#137 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Hmm, I may have to duplicate parts in the scripts as not all weapons under the same division (ie. Double or Laser) don't use the same limit of shots. Vic Viper's double level 1 and 2 limit its shots to 1 per place, but Lord British's has a limit of 2. I'll just have it check for ship type appropriately.
Another problem: I have different colors per player and for each weapon (1st player is blue, 2nd is red, etc.). I'm not entirely sure about what I should do. I'm thinking of condensing each color of the sprite into one and using the same method I used for drawing lives. Unlike the live sprite, however, these usually have more than one frame. This would mean indicating the limit between how many frames it uses and also whether it loops or not.
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: Last edited by Gamedominator06; 1st February 2010 at 15:44. |
|
|
|
|
|
#138 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
you can place each middle of every animation in the sprite with a variable, and place the image index accordingly to the middle image of the animation... if you know what i mean... this thing is impossible to describe
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#139 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Is it... sort of like what I mentioned before or is it slightly modified? No, no... that's not the same as what you're talking about. I think I know what you mean. Is it like how I have global.powerdone[p] (forloop p per player) equating to each?
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: |
|
|
|
|
|
#140 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
no... i think thats not what i mean...
i mean, middle[0]=4 //4th frame is the middle of the first animation in the entire sprite middle[1]=13//13 frame is the middle of the red ship animation middle[2]=blablabla and then use the variables for the animations... Code:
if player=blue{
mid=middle[0]
if keyboard_check(vk_up){
if image_index<mid+4
image_index+=1 else if image_index>mid
image_index-=1}
//and so on
}
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#141 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Ah, I had an idea in my sleep. There's one frame per color in that order and repeats until completing the animation. What I would do is have it start on the respective color for the player and have an image speed of 4. I'll try both of these methods though.
Ok, I got what you're saying now. So, in the rail gun animation I'll line them up per color in full animation (as in the 2 images for each color) and then do what you said for this. For sprites that don't loop, this is what I use: Code:
d.image_index = min(image_index=xx*d.mygroup) d.image_index = max(image_index=xx*d.mygroup+1) (xx = all images in a single animation) Also, I wasn't specifically asking about the ship sprite, but that is something I could and should do. Currently, I'm condensing all of my player-related sprites (anything that gets a unique color) and then applying the appropriate system for images. If I could actually test my game right now, I could do some trial and error on how to make it loop and how to make others not. Finished up most of the sprite condensing and I'm back to working on weapons again. The way my Double/Laser system works is different than yours and tries to follow what Gradius Gaiden did. Instead of resetting the laser level back to 0, it only subtracts a level if it's maxed. The weaponchoice variable tells whether you're using the Rail Gun, Double, or Laser. Since the weapon scripts for missile, double, and laser (especially laser) are going to get very large, I decided that I'm going to split them into the respective ships. All in all, I have a ton I can be doing. I just need more time in the day to do it all. Just duplicating some scripts and changing them per ship. Categorizing them helps me a bit more when I find a problem with one of the weapons. Editting a lot of code, deleting unnecessary pieces, or condensing code, etc. I understand how d.creator=id works and I can apply that to Options just as well for multiple players. I also never understood the difference between optid and mygroup, but now I get it. I'm curious on how I'm going to fix Freeze Options. If I could make it where they're still covering the ds_queue paths while not actually using them while frozen, that would work perfectly (in theory, but very logical). The issue I was having was resetting the queue every time you unfroze them. If I can simply disable the usage of the path, then they should be able to flow normally from frozen to normal. I'm sure I'll find a solution when I get there. For now, there's too much I need and want to do. Question: there's a fundamental difference on how Vic Viper's Missiles work and Lord British's Missiles work. VV's drop at a constant speed while LB's are influenced by gravity (up to a limited speed). What would I do to the missile script so that the place_free only applies when LB's Missiles contact the solid objects?
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: Last edited by GameStone; 27th April 2010 at 05:00. Reason: Double Post |
|
|
|
|
|
#142 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
which code are you using?
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#143 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
scrMissilemove and the scrMissile weapon code.
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: |
|
|
|
|
|
#144 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
you mean this?
Code:
//CREATE;
h=1
grav=0.1
//STEP;
stepstostep=round(abs(h))//pixels to move
while stepstostep{
if place_free(x+sign(h),y){
x+=sign(h);
stepstostep=max(0,stepstostep-1)//decrease pixels to be taken
if !place_free(x,y+2) && place_free(x,y+1)
{y+=1;stepstostep=max(0,stepstostep-1)}//slowdown=decrease more pixels to be taken
}else{
if place_free(x+sign(h),y-1){
y-=1; // add speed (with slope)
x+=sign(h);
stepstostep=max(0,stepstostep-2)//slowdown=decrease more pixels to be taken
}else{
h = 0;
break;
instance_destroy()
}}
if !place_free(x+h,y-2) instance_destroy()
if place_free(x,y+1) gravity=grav else
gravity=0 if vspeed>2 vspeed=2}
//COLLISION TO GROUND;
if (vspeed > 0 && not place_free(x,y+vspeed)) move_contact(270); vspeed = 0;
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#145 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Yes, that's it.
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: |
|
|
|
|
|
#146 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
i don't know, it works with my 2 way missiles fine, and they got gravity.
did you put the colliding code in collision with ground?
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#147 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Mm, are we on the same page here? I know you use a variable to determine if it veers up or down. What I'm saying is that the Two-Way missile drops at a rate that is not fixed, only limited.
Unless what you mean is that I should be able to apply such and only have the effects come into play when it hits the ground... I'm a bit confused.
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: |
|
|
|
|
|
#148 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
im confused too, since it should work. my two way uses gravity and is limited, and it uses the same code for horizontal slope movement. when the missile hits the ground, the vspeed must be set to zero
__________________
well... im out of ideas for a signature. |
|
|
|
|
|
#149 |
|
Vic Viper Master
![]() Join Date: Feb 2008
Age: 18
Posts: 247
|
Hmm, I'll look over the missile scripts tomorrow and verify what they do. I must've missed something since I last tested them.
...Or I could simply change the grav value to a higher one ._.; somehow I missed that. Working on keeping most of the code format uniform. I'm making sure everything is fairly cleaned up and checked before I delete any useless objects (level 2 ones) and that's only if I got the values I needed from them. With the stuff I know now, I could probably do my menu a lot more justice. However, from where I'm at, I have a bit to go before even considering that. Not a great idea to pile too many things on my agenda. A question on min and max. I feel like the parts I've been using counteract each other. For example: Code:
image_index=min(xx*mygroup) image_index=max(xx*mygroup+(xx-1)) It's funny how not so long ago some of my weapons that created subweapons (Rolling Missile creating the split missiles or Spread Bomb level 2 creating the split bombs) had piles of code for every ship and option. Now there isn't a shred of that left besides one instance of it.
__________________
Currently creating Gradius Revolution, the next incredibly innovative and awesome Gradius Game Maker game :cool: Last edited by GameStone; 27th April 2010 at 05:01. Reason: Double Post |
|
|
|
|
|
#150 |
|
Bacterian Beater
![]() Join Date: Jul 2009
Age: 21
Posts: 431
|
Code:
image_index=min(xx*mygroup) image_index=max(xx*mygroup+(xx-1)) don't you mean Code:
image_index=max(xx*mygroup,image_index) image_index=min(xx*mygroup+(xx-1),image_index)
__________________
well... im out of ideas for a signature. |
|
|
|
![]() |
| Thread Tools | |
|
|