Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Scavenger

#281
Quote from: abstauber on Thu 18/09/2014 20:43:07
Sorry to bump this...
Calin, is it possible to have 8-bit palette rotation done by the mighty powers of lua? That's really a thing I've been missing for ages. In 8-bit it's half broken (as you can't control the speed) and in 16,32 bit it not possible at all.

I'm not sure what you mean - CyclePalette just rotates the palette around one slot, if you make your own timer you can slow it down or speed it up. It doesn't have to be called every loop, just call it every X loops, where X is how slow you want it.
#282
I'm currently working on a simple platformer using Pixelformer as a base, and everything's working pretty well, with the exception of the collision detection. It's fine for big, meaty platforms, but when you fall at a shallow angle on a thin platform, the character falls straight through more often than not. This would be incredibly bad for a platformer (as having all big meaty platforms would make it less fun), so it needs to be fixed, but I have no idea what went wrong!

I enclose the project here: DOWNLOAD

The collision code:
Code: ags

void HandleCollisions()
{
  mPlayer.onGround = false;
  int x = FloatToInt(mPlayer.x, eRoundNearest);
  int y = FloatToInt(mPlayer.y, eRoundNearest);
  
   while((Mapper.Blocked(x + 2, y) || Mapper.Blocked(x - 2, y))) // Ground impact
   {
      //if (mPlayer.vely > terminalVel - 0.01 && MoveDir() == KeyDir() && IsKeyPressed(eKeyDownArrow)) mPlayer.inRoll = true;
      mPlayer.onGround = true;
      mPlayer.hasDblJumped = false;
      mPlayer.jumped = false;
      mPlayer.vely = 0.0;
      mPlayer.y = IntToFloat(y); 
      y --;
      
   }
   if (!mPlayer.ignoringdwcollisions)
   {
     while (mPlayer.vely >= 0.0 && ((Mapper.DownwardBlocked (x + 2, y) || Mapper.DownwardBlocked (x -2, y)) || Mapper.DownwardBlocked (x, y+1)))
     {
        mPlayer.onGround = true;
        mPlayer.hasDblJumped = false;
        mPlayer.jumped = false;
        mPlayer.vely = 0.0;
        mPlayer.y = IntToFloat(y); 
        y --;
     }
     Object *movingplatform = Object.GetAtScreenXY (x - GetViewportX (), y - GetViewportY ());
     while (movingplatform != null && mPlayer.vely >= 0.0 && (Mapper.IsObjectPlatform (movingplatform) || Mapper.IsObjectBlock (movingplatform) )) //Moving Platform Impact
     {
       
       mPlayer.onGround = true;
       mPlayer.hasDblJumped = false;
       mPlayer.jumped = false;
       mPlayer.vely = 0.0;
       mPlayer.y = IntToFloat(y); 
       mPlayer.movplat_x_offset = x - movingplatform.X;
       mPlayer.movplat_x_prev = movingplatform.X;
       mPlayer.onMovingPlatform = true;
       movingplatform = Object.GetAtScreenXY (x - GetViewportX (), y - GetViewportY ());
       y --;
     }
   }
   else
   {
     if (!Mapper.DownwardBlocked (x + 2, y) && !Mapper.DownwardBlocked (x -2, y) && !Mapper.DownwardBlocked (x, y+1)) 
     {
       mPlayer.ignoringdwcollisions = false;
     }
   }
     
     
   if (Mapper.Blocked(x, y - 24)) //Platform ceiling.
   {
     y ++;
     mPlayer.vely = 1.0;
     mPlayer.jumpCounter = 40;
     mPlayer.releasedJump = true;
   }
   
   Object *block = Object.GetAtScreenXY (x - GetViewportX (), y - GetViewportY () - 24);
   if (block != null &&  Mapper.IsObjectBlock (block)) //BLOCK object ceiling.
   {
     y ++;
     mPlayer.vely = 1.0;
     mPlayer.jumpCounter = 40;
     mPlayer.releasedJump = true;
     block = Object.GetAtScreenXY (x - GetViewportX (), y - GetViewportY ());
   }
  bool failedtomove = false;
   if (Mapper.Blocked(x + 5, y - 4) || Mapper.Blocked(x + 5, y - (20 / (mPlayer.ducking + 1))) || Mapper.Blocked(x + 5, y - 12)){
     
     if (!failedtomove) x --;
     else x++;
     if (x < -100) failedtomove = true;
     mPlayer.x = IntToFloat(x);
     mPlayer.velx = 0.0;
   }
   
   Object *block1 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -4);
   Object *block2 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -20);
   Object *block3 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -12);
   
   if ((block1 != null && Mapper.IsObjectBlock (block1)) && (block2 != null && Mapper.IsObjectBlock (block2)) && (block3 != null && Mapper.IsObjectBlock (block3)) ){
     x --;
     mPlayer.x = IntToFloat(x);
     mPlayer.velx = 0.0;
     block1 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -4);
     block2 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -20);
     block3 = Object.GetAtScreenXY (x - GetViewportX () + 5, y - GetViewportY () -12);
   }
   
   failedtomove = false;
   if ((Mapper.Blocked(x - 5, y - 4) || Mapper.Blocked(x - 5, y - (20 / (mPlayer.ducking + 1))) || Mapper.Blocked(x - 5, y - 12)))
   {
     if (!failedtomove) x ++;
     else x--;
     if (x > Room.Width + 100) failedtomove = true;
     mPlayer.x = IntToFloat(x);
     mPlayer.velx = 0.0;
     
   }
   block1 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -4);
   block2 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -20);
   block3 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -12);
   
   while ((block1 != null && Mapper.IsObjectBlock (block1)) && (block2 != null && Mapper.IsObjectBlock (block2)) && (block3 != null && Mapper.IsObjectBlock (block3)) ){
     x ++;
     mPlayer.x = IntToFloat(x);
     mPlayer.velx = 0.0;
     block1 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -4);
   block2 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -20);
   block3 = Object.GetAtScreenXY (x - GetViewportX () - 5, y - GetViewportY () -12);
   }
  mPlayer.state = eFalling;
  if (Mapper.Blocked(x - 6, y - 4) && Mapper.Blocked(x - 6, y - 22) && Mapper.IsAreaGrippable (x - 6, y - 22) && mPlayer.direction == eLeft){ mPlayer.state = eOnWall; mPlayer.hasDblJumped = false;}
if (Mapper.Blocked(x + 6, y - 4) && Mapper.Blocked(x + 6, y - 22) && Mapper.IsAreaGrippable (x + 6, y - 22) && mPlayer.direction == eRight){ mPlayer.state = eOnWall; mPlayer.hasDblJumped = false;
} 
}


The Mapper class literally just polls the room's regions for what counts as blocking, and looks for objects named PLATFORM or BLOCK. I've tried a couple of things, like moving the player's collision area, but to no avail. Can any of you spot anything that I'm missing?

Thank you in advance.
#283
There is no direct "Record this MIDI as if it were played from a PC Speaker" program, as that program is too specific to exist already. If time is the issue, make a batch file that plays each of the MIDI you want in turn, and record the entire thing in one lump, then go get a coffee or mute your computer speakers and go to sleep.

ModPlug Tracker, at least can load MIDI as track data.
#284
Either:

1) Play the MIDI file in DOSBOX using a PC-Speaker MIDI player (There is one on this page) and record the raw output from DOSBOX.
or
2) Turn the MIDI file into a MOD file and find a recording of the PC Speaker, and use that as the instrument.
#285
That looks like a renamed PNG rather than an actual ICO file.

Try this file: https://dl.dropboxusercontent.com/u/50882197/temp/user.ico

Does it do the same thing?
#286
I'm currently working on a computer interface for my game, and I need a usenet interface. I don't mind if it's not dynamic, and I know how to do the frontend, but it's the backend that is bugging me. What is the best way to do a small database that shows different arrays of values in a listbox and a label depending on what's selected? EG:

Code: ags

- comp.legacy.z80 // Root 1
-- Why is my computer beeping all the time? //Branch 1
--- Seriously, whenever I turn it on, its just a litany of PC speaker beeps. I cant take it, the computer doesn't even work. //Branch 1 Selected.
-- Running the Metaverse //Branch 2
--- Is there any way to enable 3D view in the z80 Metaverse build? //Branch 2 Selected
- alt.fan.ripsaw // Root 2
-- Ripsaw Rising Doesnt Make Any Sense //Branch 1
--- Im sure youve read my other posts on the subject, but something occurred to me when rewatching the execrable Dark Blade series. When Ripsaw first became a... //Branch 1 selected.


What I want to do is have a list of usenet addresses (the roots), and when you click on one, it populates the message list with the branches, and when you select a branch, it displays the message connected to the branch. I'm not sure how to store this, however - should it be hard coded into the game's script, or in a seperate text file? If it was in a text file, I expect I'd be able to have different folders for text resources (Using /English/usenet_01.txt , /German/usenet_01.txt etc and Game.TranslationFilename to choose the folder). And if it was in a text file, how do I store it so it can be parsed into the arrays? I may need several of these throughout the course of the game (on different computers).

I'm sure I'd be able to program it, I just don't know the best way to start. Does anyone have any suggestions?

EDIT:
It was just a case of making a struct.
#287
Have an animation I'm currently working on. I'm quite pleased with how it's coming out:

#288
It's easier to time stuff like this with variables, timers are better for one-off stuff like timed puzzles.

Code: ags

// function top Global asc

int walktimer;

function Walking()
{
    if(player.Moving)
      {
          walktimer=0;
      }  
    else if (walktimer > GetGameSpeed ())
      {
          Stopped_Moving += 1;
          LNotMoving.Text = String.Format("%d", Stopped_Moving);
          walktimer = 0;
      }
    else walktimer++;
}
#289
I'm not the best anatomist, but I noticed some things.


Remember: Breasts begin below the armpit, not at the shoulderblades (it's a common thing to draw them high up, don't worry), and if she's wearing like, a one piece bodysuit, the fabric will smooth over the area.
#290
Yeah, the project works fine for me, I can compile it and everything. I'll be using it in my game, definitely.

(I'm using AGS 3.2.1 by the way)
#291
You have no idea how useful I find this plugin. The Adlib-sound was just what I needed for my game.

Thanks, Wyz!
#292
Looked it up, you can reencode TTFs really easily with FontForge. Tried it out with a couple of system fonts. Do this:

1) Download FontForge.
2) Load the TTF you want to reencode in it.
3) Encoding-->Load Encoding...-->The file in this archive (make sure you extract it).
4) Encoding-->Reencode (the top option)-->Windows1251.
4) Save the TTF as X_1251.ttf, where X is the font name.

It's not well tested, but FontForge doesn't work well with the computer I'm using.
#293
You've got to have a TTF font mapped to Code Page 1251. There's an example TTF font here. You'll need someone versed in a TTF editor, and it'll be a little tedious, but it's possible.
#294
Solution:

1) Save the file as UTF-8 with Notepad. Using this one I've found gives the most faithful conversion.
2) Open Charco
3) Use UTF-8 Input and WindowsCyrillic output.

AGS doesn't read unicode as it can only read 8-bit encoded strings and Unicode is 16bit+.
#295
Quote from: Snarky on Thu 12/06/2014 18:33:29
Last time I tried, I couldn't for the life of me get one of Scavenger's games to run and look right. (I seem to remember there's some kind of registry hack you have to apply to make 256-color mode work properly with AGS, but I gave up before that point.) 8-bit is just a compatibility nightmare these days: it's not properly supported out of the box on most PCs, and is hard to troubleshoot. If you make a game in 8-bit mode, you're doing it for yourself, not for players.

I looked up the registry hack, I'll be sure to put it in the manual of my next game.

I use 8-bit for my own reasons, partly aesthetic, and partly technical. I wouldn't recommend someone do their first game in 8-bit, but suits the game I'm making.
#296
Unfortunately, AGS' scripting language is compiled rather than interpreted, so this would be impossible.

You can probably do something similar with the Lua plugin, though. The Lua script is interpreted.
#297
You can't put more than one function name into the interaction textbox - use Other Click on Hotspot instead:

Code: AGS

function hHotspot1_Otherclick () //Instead of this, the name the interaction editor gives you.
{
if (mouse.Mode == eModePush)
{
    //Put Push interaction here.
}
else if (mouse.Mode == eModeOpen)
{
    //Do open thing.
}
else if (mouse.Mode == eModeClose)
{
    //Do close thing.
}
else if (mouse.Mode == eModePull)
{
    //Do pull thing.
}


}
#298
Quote from: Calin Leafshade on Fri 06/06/2014 19:30:38
Not open source anymore?

That is some bullshit.

Oh, it's still open source, they're just selling the compiled binary for the Windows and Mac versions. They have a link to their Github on the page.

Very sneaky, considering not all pixel artists are programmers :<
#299
The program's looking way awesome, much better than the last time I used it! It's animation feature might even push me to use it instead of photoshop.

Now if I could only figure out how to compile it...
#300
It's happening to everyone, it seems.
SMF spam blocked by CleanTalk