Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » JCS & Scripting

Jazz1Enemies.asc

Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 27, 2017, 08:26 PM
Violet CLM is offline
Reply With Quote
Jazz1Enemies.asc

Download link

This is an in-progress angelscript library, for use in single player levels, which will allow you to place any enemy from JJ1 in your levels as a fully functional enemy with just a single line of code. For instance, the following script replaces the JJ2 Diamondus enemies with the JJ1 Diamondus enemies, but you could replace any other event instead, e.g. replacing green springs with Marbelara dragons or whatever suits the need of your level design.
Code:
#include "Jazz1Enemies v05.asc"

void onLevelLoad() {
	Jazz1::MakeEnemy(OBJECT::NORMTURTLE, Jazz1::Enemies::Diamondus_TurtleGoon);
	Jazz1::MakeEnemy(OBJECT::BUMBEE, Jazz1::Enemies::Diamondus_BumblingBee);
}
JJ1 enemies are generally a lot simpler than JJ2 ones, of course, but there are a lot of them, and adding a few non-standard enemies (with little to no scripting skills required of you) is a good way to make your SP level stand out from the crowd.

These are not intended to be pixel-perfect recreations of the original enemy code (unlike in PlusOJ). Generally behaviors have been rewritten to move more smoothly, e.g. an enemy that previously moved four pixels every other tick will now move two pixels every tick. This is generally a good thing but I felt obliged to mention it.

This library is still in development, though, and currently includes only the enemies from JJ1's first six episodes and HH94. The enemies introduced by JJ1 CD (episodes A-C) and HH95 are not yet implemented.
__________________

Last edited by Violet CLM; Jun 11, 2019 at 07:21 PM.
proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Jan 28, 2017, 05:01 AM
proud2beamerican is offline
Reply With Quote
This is really awesome!

Tubelec blaster doesn't look right though. Originally it has the yellow lights flashing (those 3 little pixels). Also could you remind me how to rotate those hazards? So the blaster can be placed on walls and ceilings, not just on the floor.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 28, 2017, 08:45 AM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by proud2beamerican View Post
Originally it has the yellow lights flashing (those 3 little pixels).
Ah, I forgot about that detail, thanks. It's easy to miss palette swap animations like that because they're not explicitly marked in the JJ1 sprites, and then they have to be recreated manually in the .j2a.
Quote:
Also could you remind me how to rotate those hazards? So the blaster can be placed on walls and ceilings, not just on the floor.
The instructions spell out how to put them on the ceiling. There is no precedent for them being on the walls, however.
__________________
proud2beamerican

JCF Member

Joined: Sep 2015

Posts: 75

proud2beamerican is doing well so far

Jan 28, 2017, 10:52 AM
proud2beamerican is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
Ah, I forgot about that detail, thanks. It's easy to miss palette swap animations like that because they're not explicitly marked in the JJ1 sprites, and then they have to be recreated manually in the .j2a.
I actually did that long time ago for my tileset:


Not sure if the palette is 100% right though.

Quote:
Originally Posted by Violet CLM View Post
The instructions spell out how to put them on the ceiling. There is no precedent for them being on the walls, however.
Right, I see that. But still putting them on the walls seems extremely important to me. Do you think that would be possible in the next update?
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 28, 2017, 10:04 PM
Violet CLM is offline
Reply With Quote
Hmmm. I'm trying not to go too far afield from the JJ1 originals besides making movement less jerky, but the tubelectric blasters are so unique as it is that I don't think putting them on walls would be letting myself in to make many other such changes. That's reasonable.
__________________
Jelly Jam Jelly Jam's Avatar

JCF Member

Joined: Oct 2014

Posts: 767

Jelly Jam is doing well so far

Jan 29, 2017, 01:33 PM
Jelly Jam is offline
Reply With Quote
I tried out the basic code you put on this thread. This is cool! Please keep this up! I like many of the JJ1 enemies.

Also, is there a list of the JJ1 enemies' names of some sort?
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 29, 2017, 01:59 PM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by Jelly Jam View Post
Also, is there a list of the JJ1 enemies' names of some sort?
HELPME.EXE comes with JJ1 and gives names and descriptions of all the enemies from episodes 1-6. If anything similarly official exists for the other episodes I don't know about it.
__________________
Jelly Jam Jelly Jam's Avatar

JCF Member

Joined: Oct 2014

Posts: 767

Jelly Jam is doing well so far

Jan 29, 2017, 02:21 PM
Jelly Jam is offline
Reply With Quote
Aw, cuz IIRC those airboard turtles with guns are from episode A
Thanks anyway
Robo4900 Robo4900's Avatar

JCF Member

Joined: Sep 2011

Posts: 1,045

Robo4900 has disabled reputation

Jan 30, 2017, 05:23 AM
Robo4900 is offline
Reply With Quote
I think there's a manual for the CD version which lists some info about enemies from episodes A-C, but I don't think all copies of it had that manual.
__________________
Jelly Jam Jelly Jam's Avatar

JCF Member

Joined: Oct 2014

Posts: 767

Jelly Jam is doing well so far

Jan 30, 2017, 07:10 AM
Jelly Jam is offline
Reply With Quote
Ah, well I actually meant names such as Diamondus_TurtleGoon, so i can load the enemies. I don't even know how to load the JJ1 sparks.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 30, 2017, 09:41 AM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by Violet CLM View Post
instructions (found at the top of the .asc document)
Instructions include optional methods for slightly changing how the enemies behave, and also (if you scroll down just a bit) the full list of included enemy names.
__________________
Jelly Jam Jelly Jam's Avatar

JCF Member

Joined: Oct 2014

Posts: 767

Jelly Jam is doing well so far

Jan 30, 2017, 09:56 AM
Jelly Jam is offline
Reply With Quote
Oh, looks like I missed it. Thanks again.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Feb 18, 2017, 01:30 PM
Violet CLM is offline
Reply With Quote
Download link

Updated to version 0.2. Changes:

  • Renamed Tubelectric_Blaster to Tubelectric_BlasterVertical and added Tubelectric_BlasterHorizontal.

  • Added all enemies from Episode 2 (Letni, Technoir, and Orbitus).

  • Added a bool parameter (defaults false) to the Jazz1::MakeEnemy function to draw that enemy using my TrueColor library. That way you can have enemies use (roughly) their original JJ1 colors instead of edited ones to fit into JJ2's standard sprite palette. You have to package the .bmp file/s with your script then, but there are detailed reminders for this in the new "Packaging Instructions" section of the giant instructions comment.
__________________

Last edited by Violet CLM; Dec 10, 2017 at 10:15 PM.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Dec 10, 2017, 10:17 PM
Violet CLM is offline
Reply With Quote
Download link

Updated to version 0.3. Changes:

  • Added all enemies from Nippius and Holidaius.

  • Updated the included TrueColor.asc to the latest release.

  • Added a version number to the filenames, in case of future behavior changes.

__________________
PT32 PT32's Avatar

JCF Member

Joined: Jul 2008

Posts: 270

PT32 is an asset to this forum

Dec 12, 2017, 06:58 AM
PT32 is offline
Reply With Quote
Just wanted to say this sounds like a really awesome project
__________________
Don't say "cannot," say "why not?"

IN DEVELOPMENT:
Renascence: The Last Jackrabbit
AvalancheMaster AvalancheMaster's Avatar

JCF Member

Joined: Sep 2013

Posts: 89

AvalancheMaster is doing well so far

Jan 6, 2018, 05:20 AM
AvalancheMaster is offline
Reply With Quote
Thank you so much, the effort that goes into this really pays off!

Several questions/suggestions:

* Do you plan to implement the sounds as well? As it stands, at least some of the enemies are completely silent.

* Do you plan to implement boss battles?

* Would you consider including an option for enemy sprites that are more similar to JJ2's style, (if an artist is willing to contribute some minimal effort to the project, that is) mainly fixing some horrible shading (no major edits), or you want to keep this as close to JJ1 as possible?
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jan 6, 2018, 09:30 AM
Violet CLM is offline
Reply With Quote
Quote:
Originally Posted by AvalancheMaster View Post
* Do you plan to implement the sounds as well? As it stands, at least some of the enemies are completely silent.
I have little to no technical knowledge about sound or sound files. I don't know how to extract samples from JJ1, and I don't know how to translate JJ1's sound settings into JJ2's sound settings. Someone else would have to do all the heavy lifting on this one. In the meantime, there are SetDeathSound, SetBulletFireSound, and SetBulletExplosionSound options already in the library, though you have to provide your own samples for those or use JJ2's native ones.
Quote:
* Do you plan to implement boss battles?
Not particularly. JJ1 boss behaviors are just complicated enough that they'd take some work to plausibly recreate, yet not complicated enough that they'd be interesting experiences in JJ2. And I think it's more useful to have a source of additional enemies.
Quote:
* Would you consider including an option for enemy sprites that are more similar to JJ2's style, (if an artist is willing to contribute some minimal effort to the project, that is) mainly fixing some horrible shading (no major edits), or you want to keep this as close to JJ1 as possible?
The idea as stated doesn't excite me, and sounds like mission creep, but I guess I might change my mind if someone actually tried this.
__________________
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Feb 8, 2018, 10:31 PM
Violet CLM is offline
Reply With Quote
The latest version has been uploaded to J2O. Changes:
  • The latest versions of TrueColor and Resize are fully integrated, so the color quality is better than it was before and you can resize any enemy to any size while setting it up, still as a single API call.
  • Fixed glitch of SetWalkingEnemyCliffReaction method not working for any enemy at all.
  • Added SetEnemySpeedsAreScalable, SetBulletSpeedsAreScalable, and GetFirstFrame methods.
  • Probably fixed some edge case issue with trying to use the same enemy (with different eventIDs) twice, once with useTrueColor enabled and once without.
(No new enemies have been added, though, so we're still on v03 for the .j2a file.)
__________________
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,662

Violet CLM has disabled reputation

Jun 11, 2019, 07:16 PM
Violet CLM is offline
Reply With Quote
The latest version has been uploaded to J2O. Changes:
  • Added all enemies from episodes 3-6, making there be fifty-seven enemies in all (plus two minor horizontal variants as discussed above).
  • Updated TrueColor and Resize again, meaning the images are now all .png files instead of .bmp, and resizing can involve antialiased edges.
  • Added SetPointsFormula method.
  • Small bug fixes to flying snake enemies (e.g. Orbitus_SilverSnake) and to certain resized enemies using the SetEnemySpeedsAreScalable method.
  • Fix to TrueColor version of Holidaius_HandHorizontal


Fun fact that doesn't affect you in any way: almost all the enemies use shared behavior classes with no more specification than a few numbers and their animation structures. Only the following enemies require actual method overrides:
  • Letni_BugCeiling (unique walking-on-ceiling behavior)
  • Scraparap_GunnerDrone (unique death animation)
  • Scraparap_LaunchCart (you can stand on it without being hurt)
  • Turtemple_JeTurtle (unique floating-on-water behavior)
  • Dreempipes_TerrapinSwimmer (sleeps above water)
  • Pezrox_ClammyVertical (unique moving-up-and-down behavior)
  • Crysilis_GoldenBounceSpike (animation implemented in code instead of .j2a)
  • Battleships_Generator (doesn't hurt and is drawn to the foreground)
__________________

Last edited by Violet CLM; Jun 15, 2019 at 08:01 AM.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 07:56 AM.