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

Renascence: The Last Jackrabbit

PT32 PT32's Avatar

JCF Member

Joined: Jul 2008

Posts: 251

PT32 is doing well so far

Jul 4, 2018, 09:44 AM
PT32 is offline
Reply With Quote
Lightbulb Renascence: The Last Jackrabbit

Welp, here I am.

It's been five years since I worked on anything worthwhile, besides a multiplayer level or two that I might get around to finishing someday. For a long time I considered myself done with levelmaking but this spring, the bug bit me again, so here I am.

I'm working on a new singleplayer pack. It's not World of Jazz Part 2 - those files were lost in a transfer between computers, and I'd have to start from scratch. This will be a brand new project built within the growing potential of AngelScript. The pack at present consists of roughly twenty levels and will have a centralized story with some light Lovecraftian elements (as I'm reading Lovecraft these days and find it interesting). Emphasis will be placed on multiple-route gameplay ala Deus Ex, where there is a start and end point and multiple ways to get there. There will also be some world lore which can be discovered by exploring the map and finding things. I'm building the pack gameplay-wise to be playable as Jazz, Spaz or Lori, though storywise I need one thing from AngelScript to make that a certainty. This project may be a standalone or it may be a first installment, depending on how I feel about levelmaking by the time I'm done.

Which brings me to the catch - the project will not be done anytime soon. I've just graduated college and am working on situating myself in the workplace, and I don't know yet how much time I'll be able to devote to the project. I also have other creative endeavors which I put the main part of my time into. For all I know this project might take a year or two, but it might also take five years.

But that's a good thing, because it will give time for things I want for the pack to be brought into existence. I'm not a programmer, and I suck at making tilesets. That's why I decided to post about this project at all - I was hoping that, if anyone was willing, folks could start working on things I'm looking for so that I'll be able to take this project to the places I want to take it. I also wanted this to be an advice thread so I can ask people questions - as of yet I'm not thoroughly acquainted with AngelScript and I'm still learning MLLE, but I'd like to make use of both in a full-fledged singleplayer campaign.

So, what do I need for Renascence: The Last Jackrabbit? Here's my list so far (subject to update):

ANGELSCRIPT:
  • Zero Gravity
  • Location tracking (i.e., an arrow persistently pointing back to the start pos)
  • More turtle enemies (i.e., some of the Jazz1 enemies like Je-Turtles from Turtemple, or brand-new types)
  • Rabbit enemies
  • Mutated monster enemies
  • Water-free zones (i.e., dry land below water level)
  • Layer 1 supersceding the water layer (becuz water annoying that way)
  • Placeable static events of Jazz, Devan, Spaz and Lori
  • Placeable static event of the player character
  • Rabbit civilian NPCs
  • The ability for hostile NPCs to shoot at each other (i.e., Rabbit and Turtle forces in combat)
  • Heat wave visual effects (may already exist, I'm not sure)
  • New weapon types (two I'd like to implement are the firework gun and energy blast from Press Garden, but I'll happily take suggestions for other new weapons, too)
  • Misc. UI display stuff (i.e., text appearing onscreen for an objective, then changing once objective is completed)
  • Elimination of damage knockback

TILESETS
(Both tilesets should have at least one black tile)
  • Ocean-themed tileset with sci-fi facility components
  • Greek-themed tileset with city, woodlands and rabbit statues/architecture


I'm also open to any other suggestions or ideas folks might have to help me make this project even better.

As a proof of concept, I've included some very early-production screencaps:







Thanks for your time.

Last edited by PT32; Jul 4, 2018 at 09:57 AM.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,603

Violet CLM has disabled reputation

Jul 4, 2018, 12:02 PM
Violet CLM is offline
Reply With Quote
Hi there! As you say, it's been a while--glad to see you jumping back in.

Quote:
Originally Posted by PT32 View Post
Zero Gravity
Code:
array<float> ZeroGravityVerticalPosition(jjLocalPlayerCount, -1);
void onFunction0(jjPLAYER@ play, bool enableZeroGravity) {
  ZeroGravityVerticalPosition[play.localPlayerID] = enableZeroGravity ? play.yPos : -1;
}
void onPlayer(jjPLAYER@ play) {
  if (ZeroGravityVerticalPosition[play.localPlayerID] != -1) {
    play.yPos = ZeroGravityVerticalPosition[play.localPlayerID];
    play.ySpeed = 0;
  }
}
Quote:
Location tracking (i.e., an arrow persistently pointing back to the start pos)
Look at Operation Cleanup for an example of arrow drawing.
Quote:
More turtle enemies (i.e., some of the Jazz1 enemies like Je-Turtles from Turtemple, or brand-new types)
Jazz 1 Enemies
Quote:
Rabbit enemies
Mutated monster enemies
These are too unspecific for there to be much I can say here. Consult the documentation for jjBEHAVIORINTERFACE I guess?
Quote:
Water-free zones (i.e., dry land below water level)
This can't be done at present, if you mean seeing the standard JJ2 water effect in one part of the screen and a waterless area below it on the same screen, unless you do some tricks with layer order (see below).
Quote:
Layer 1 supersceding the water layer (becuz water annoying that way)
This is the "WaterLayer" setting in the "JJ2+ Properties -> Level Properties" window in MLLE.
Quote:
Placeable static events of Jazz, Devan, Spaz and Lori
Placeable static event of the player character
Rabbit civilian NPCs
I'm interpreting these to all be pretty much the same thing, which looks something like this.
Code:
void onLevelLoad() {
  if (jjAnimSets[ANIM::DEVAN] == 0)
    jjAnimSets[ANIM::DEVAN].load();
  jjOBJ@ eventBeingUsedForNPCsInThisLevel = jjObjectPresets[OBJECT::APPLE]; //or whichever other event, up to you
  eventBeingUsedForNPCsInThisLevel.playerHandling = HANDLING::PARTICLE;
  eventBeingUsedForNPCsInThisLevel.behavior = NPC();
}
class NPC : jjBEHAVIORINTERFACE {
  array PossibleAnimationsForEachCharacter = {jjAnimSets[ANIM::JAZZ] + RABBIT::STAND, jjAnimSets[ANIM::SPAZ] + RABBIT::STAND, jjIsTSF ? jjAnimSets[ANIM::LORI] + RABBIT::STAND : 1, jjAnimSets[ANIM::DEVAN] + 1};
  void onBehave(jjOBJ@ obj) {
    switch (obj.state) {
    case STATE::START:
      obj.curAnim = PossibleAnimationsForEachCharacter[jjParameterGet(uint(obj.xPos) / 32, uint(obj.yPos) / 32, 0, 2)];
      obj.curFrame = jjAnimations[obj.curAnim];
      obj.putOnGround(true);
      obj.var[0] = jjParameterGet(uint(obj.xPos) / 32, uint(obj.yPos) / 32, 2, 5); //which player number to get fur colors from
      obj.state = STATE::IDLE;
      break;
    case STATE::DEACTIVATE:
      obj.deactivate();
      break;
    default: {
      const int nearestPlayerID = obj.findNearestPlayer(128 * 128);
      if (nearestPlayerID >= 0)
        obj.direction = jjPlayers[nearestPlayerID].xPos > obj.xPos ? 1 : -1;
      if (++obj.age == 7) {
        ++obj.frameID;
        obj.determineCurFrame();
        obj.age = 0;
      }
      break; }
    }
  }
  void onDraw(jjOBJ@ obj) {
    jjDrawSpriteFromCurFrame(obj.xPos, obj.yPos, obj.curFrame, obj.direction, SPRITE::PLAYER, obj.var[0]);
  }
}
For defining how your various NPCs should look, you'll want some lines like this in onLevelLoad, where the numbers match up to gradients in the palette:
Code:
jjPlayers[1].furSet(24,32,40,48);
Finally you'll want to edit either MLLEProfile - JJ2.ini or MLLEProfile - TSF.ini, depending, to include this line in the "Events" group:
Code:
141=NPC                              |+|Scenery   |NPC    |     |Character:{Jazz,Spaz,Lori,Devan}2|Fur Colors:5
Quote:
The ability for hostile NPCs to shoot at each other (i.e., Rabbit and Turtle forces in combat)
The difficulty here is you stating the desired behavior clearly enough for it to be translatable into code. "[S]hoot at" is pretty vague and encompasses an infinitely wide range of possible implementations.
Quote:
Heat wave visual effects (may already exist, I'm not sure)
While hovering over a mouse in the Tileset pane of MLLE, press Shift+5.
Quote:
New weapon types (two I'd like to implement are the firework gun and energy blast from Press Garden, but I'll happily take suggestions for other new weapons, too)
You can find most custom weapons under the top gun contest downloads tag.
Quote:
Misc. UI display stuff (i.e., text appearing onscreen for an objective, then changing once objective is completed)
Code:
string CurrentObjective = "Get to the choppa";
bool onDrawScore(jjPLAYER@, jjCANVAS@ canvas) {
  canvas.drawString(10, 50, CurrentObjective);
  return false;
}
and change the value of the CurrentObjective variable when appropriate.
Quote:
Elimination of damage knockback
Code:
array<float> PlayerLastHorizontalSpeed(jjLocalPlayerCount), PlayerLastVerticalSpeed(jjLocalPlayerCount);
array<bool> PlayerWasHurtLastGameTick(jjLocalPlayerCount, false);
void onPlayer(jjPLAYER@ play) {
  const bool playerIsHurt = play.curAnim == jjAnimSets[play.setID] + RABBIT::HURT;
  if (playerIsHurt && !PlayerWasHurtLastGameTick[play.localPlayerID]) {
    play.xSpeed = PlayerLastHorizontalSpeed[play.localPlayerID];
    play.ySpeed = PlayerLastVerticalSpeed[play.localPlayerID];
  } else {
    PlayerLastHorizontalSpeed[play.localPlayerID] = play.xSpeed;
    PlayerLastVerticalSpeed[play.localPlayerID] = play.ySpeed;
  }
  PlayerWasHurtLastGameTick[play.localPlayerID] = playerIsHurt;
}
That's a literal interpretation of the statement, but there's the separate issue that players can't control their rabbits for half a second after they've been hurt, which isn't something you can get rid of as easily. The only alternative I'm thinking of is to have all damage done to the player done by editing jjPLAYER::health from within the script, instead of traditional built-in collision damage from enemies/bullets/hurt events, but that might be a bit more than you want to take on.
Quote:
(Both tilesets should have at least one black tile)
Right-click on a tile in the Tileset pane in MLLE and click "Edit Image..." from the context menu.

If you don't find specific tilesets with all the different components you need, instead you can use the "JJ2+ Properties -> Tilesets -> Add New..." dropdown menu option in MLLE to use tiles from multiple tilesets in a single level.
__________________
PT32 PT32's Avatar

JCF Member

Joined: Jul 2008

Posts: 251

PT32 is doing well so far

Jul 4, 2018, 02:45 PM
PT32 is offline
Reply With Quote
Thanks! That'll give me some great stuff to get started on.
PT32 PT32's Avatar

JCF Member

Joined: Jul 2008

Posts: 251

PT32 is doing well so far

Jul 5, 2018, 10:03 PM
PT32 is offline
Reply With Quote
Is there a way with Angelscript to carry over coins between levels?
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,603

Violet CLM has disabled reputation

Jul 6, 2018, 09:23 AM
Violet CLM is offline
Reply With Quote
Sure... but again you have to be careful in how you define the question. How do you want coin saving to interact with dying, the continue screen, loading/saving, skipping levels, playing levels out of order, winning then starting again?
__________________
PT32 PT32's Avatar

JCF Member

Joined: Jul 2008

Posts: 251

PT32 is doing well so far

Jul 6, 2018, 01:37 PM
PT32 is offline
Reply With Quote
My goodness, I didn't realize money was so complicated. Guess I really should have.

I was thinking about having the player accumulate coins from level to level as they go, with opportunities at various points along the way to spend those accumulated coins. For example, Player collects coins in Levels 1-5, then has opportunity to spend them at a bonus warp in Level 6. Player can then begin collecting again, including the excess they had left over from Levels 1-6, to spend coins at a Level 12 Bonus, and so on.

Upon dying, Player would keep the coins they earned in previous levels/save points, but would have to collect "unsaved" coins again.

At the Continue Screen, Player would start over with 0 coins.

If Player saves or loads from a spot in the level, then they have however many coins they saved with. Guess I'm not sure what you're asking with this but maybe I'm just missing something.

If Player skips a level they simply don't get credit for the coins in the level they skipped. Same for if levels played out of order - Player's coin credit carries over from levels if they've played them on this playthrough of the pack. If they jump in on Level 9 or Level 4 or 13 or whatever, their counter starts from that level.

If Player wins and starts again, then they start with 0 coins, as if it's a new playthrough.

One idea I had was doing a Coin reset about halfway through the pack, where the counter resets to 0. This fits well with the story and might/might not help with boondoggles. But now I'm worried if that would just complicate matters more.

Last edited by PT32; Jul 6, 2018 at 01:39 PM. Reason: better explanation derps
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 06:50 AM.