Projectiles

stevenshepherd

New member
So based on my understanding of the most recent tutorial, we are currently (or forever?) limited to 2 kinds of projectiles between the player and the enemies, correct?
 

TurtleRescueNES

Active member
Technically, I think you could always hijack another game object and call it projectile 3. You could then modify some of Joe's scripts to call that object instead of the existing projectiles.
 

TurtleRescueNES

Active member
I must have been really tired when I responded, or else I would have remembered that this is indeed possible because I already did it. It was part of Joe's challenges to us.

https://youtu.be/ZTEy4lHsDTI

If you count the different projectiles, you'll see that the hero turtle in my video has two weapons: seashells and a green energy weapon. The enemy raccoon has a rotten fruit projectile. Each of the three are different game objects, and each are called by a different script.
 

DChilders84

New member
On the topic of projectiles, I'm experiencing some strange things with trying to have two different kind. Here's a summary:
SrhxLKQ.png


So I am going through the most recent tutorial video.
The blue monster is shooting the correct projectile.
The orange monster is the "stone" type from the tutorial.
I modified the ShootAtPlayer script to allow for a different projectile in slot 09.
The monster seems to be shooting multiple sprites on top of eachother and it is causing the game slow down significantly.
It is also using the wrong palette, seemingly the player palette, when I've assigned the same palette that the monster itself is using.
I attempted to change the palette, thinking that there were too many palettes attempting to load, but this did not fix the issue.
Everything about the projectiles, both for shooting forward and at the player, are exactly as followed from the tutorial.
In the tutorial, I did not see a screen that included both the moving/shooting forward monster and the stone/shooting at player monster.
Another thing to note is that when the player dies on this screen, instead of the death animation taking place where it should, the player is teleported to the upper left corner, the animation plays, and the game DOES NOT reset, as it should.

Any thoughts?
 

dale_coop

Moderator
Staff member
I noticed too, that projectiles uses the player’s sub-palettes. It was a big deal for me, I think this will mischance in a next version.

For your player transported to the left top of the screen when hens supposed to die. I experienced that too.
I re did every steps of the tutorial video, then I disbar have the problem anymore. So I thought, I just made a mistake somewhere :p
 

RadJunk

Administrator
Staff member
Sub-palettes: keep in mind, there are only ever four sprite sub-palettes. We natively reserve two for game objects (player, projectiles, etc) and two for ‘monsters’.

When you are setting a monster’s ‘color’ in the monster editor, you’re not actually assigning colors at all. You’re telling the engine “this tile uses first mon subpal (3) or this tile uses second mon subpak (4).” The SCREEN determines what colors are loaded in subpal 3/4 slots. If you set those screen values to the same two sub palettes you used when creating the monster, it will show up the same in the game. If you set them different in the screen, the monsters will use whatever colors you have loaded in the screen. So again, all you’re doing when making your monsters is saying what screen subpal the monster tiles will use...the subpal you’re looking at is just for reference.

Similarly, the game objects ALL use the two subpals in the player object (game object 0). Whatever you set there will be what gets loaded into subpal 1 and 2...and what you’re doing is defining whether game objects’ tiles use subpal 1 or subpal 2.

You can only have those 4 groups of 3+ transparent colors. So there’s no way to have an individual color set for each game object.

Out method is generally that player uses sub pal 1 and other game objects use sub pal 2. So set up your game objects all using those sub pals, and then you’ll have an accurate look at what it will look like. Just know for game objects, all of them will respect what is loaded into the two subpal slots in the player (first) game object.
 

DChilders84

New member
Ahh, I see. So the game objects won't be able to use the same sub palette as the monster. I will test changing this later today and see if it makes a difference regarding the slow down and will edit this post accordingly to update.

[UPDATE]

I think the issue might have been that I didn't have the Stone Bug (orange in the picture) designated as a monster, but I did that purposefully because I wanted it to use a different colored projectile. I changed him to a monster in the details section and then everything worked as expected and he used the same projectile as the Blue Bug that is visible in the original picture and, as expected, used the same type of projectile.

While this is exactly the outcome I was aiming for, it did fix the slowdown issue I was experiencing. I'll wait for further iterations of the tool to see if I can get the outcome I'm intending. The reason for this is that I want to make a space shooter and will require multiple types of projectile types for both the player and the enemy which will definitely need to use different palettes. Will wait for further iteration of the tool before digging too deep in to that though, as I know we are meant to be getting different modules that may handle this style of game better (think Gun Nac).
 
Top Bottom