Author Topic: special function overlap  (Read 6927 times)

dutch_619

  • Regular
  • **
  • Posts: 90
    • View Profile
    • Email
special function overlap
« on: 2007-02-15, 05:26:14 PM »
 I have tried to use a series of special functions that were on the same tile, and it seems that the only function that works is the last one I specify. Once I actually use the map via a shortcut it becomes corrupted and is unusable/recoverable after this point. The function is not designated 'remove upon use' so it should still be in place.

As this method is apparently unworkable I was going to try a different way. I was planning on reducing the layers tileset to 16 by 16 and leave the sprite tileset at 64 by 64. This will give me 4 special functions to use without any of them overlapping or taking the same tile. My question is, will this work?

I tried the DarkElf game and I really liked the load screen. I think the same thing could be done without scripting and using an inert sprite. One function to teleport down, one for up and one to select that option. This would require three functions per tile it seems. Or, perhaps the method described above would work.  Any thoughts?

I plan on trying it regardless, but input would be appreciated.

eric22222

  • Fanatic
  • ***
  • Posts: 177
    • View Profile
    • Eric Online
    • Email
Re: special function overlap
« Reply #1 on: 2007-02-15, 05:58:44 PM »
I don't think I've ever had trouble with putting two special functions on top of one another. There may be something else causing the problem...

The workaround you mentioned would work, assuming that's the problem. And actually, you could get 4 functions in a space of two by two tiles.

I've tried making a menu without script. Yeah, it can be done, but it gets pretty hairy. You just need to make sure you're keeping up with all those functions. One suggestion: instead of using three special functions per tile, make just one for selecting per tile, and then two tall ones for the "move up" and "move down" functions. Make sure they overlap on the right tiles, that is, make sure you can't go up when you're at the top option.

Hope that helps.

dutch_619

  • Regular
  • **
  • Posts: 90
    • View Profile
    • Email
Re: special function overlap
« Reply #2 on: 2007-02-15, 06:31:07 PM »
I was hoping to bypass these problems by making the sprite 'inert' and forcing it to reside in only one of a set of specific places. In order for the sprite to go up at the top level of choices I was going to teleport it to the bottom selection.

As for hairy.... oh yeah, that it does! Good naming conventions help, and is this ever a way to hammer their necessity in.

I'm avoiding VB scripting for this because truthfully....I really dislike it. I'm good at C, and live on Linux systems, er, actually Solaris (close enough). I think I'm too used to Perl and Bash style scripts to really get a feel for VB. I'm doing a bit of changing in the game core to avoid scripting as best I can.

I feel this may be more of a problem than anything else. I can see some unhappy people when after loading mine, no on else's games will run.


bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: special function overlap
« Reply #3 on: 2007-02-16, 08:55:09 AM »
So many things to say and so little brain-memory to hold them before I write them:
1) Special functions can be activated when the sprite is either overlapping them or touching them from the side, so you can have up to 5 non-overlapping special function activate-able from a single tile if the sprite is the size of the tile.
2) You should be able to use the "Activate a series of special functions" special function to activate special multiple functions in sequence (one of them instead of putting them all on the same tile to activate them)
3) Putting overlapping functions on the same tile should work.  I just tried 3 overlapping message functions activated on initial touch, and they work fine.  Something else must be the problem in your case.
4) If you want help figuring out why your case isn't working, maybe you can post your project or a sample of it somewhere and tell me how to get it.  I should be able to tell you why it isn't working as expected.
5) Did you look at the Game Academy Demo project in the project listing?  It demonstrates a menu by using special functions to move the menu pointer.

dutch_619

  • Regular
  • **
  • Posts: 90
    • View Profile
    • Email
Re: special function overlap
« Reply #4 on: 2007-02-16, 07:43:24 PM »
I reinstalled SGDK and the problems seem to have vanished. I think I may have been using a tainted compile instead of the clean one to run with.

I like the implementation used in the Game Academy Demo, which is what led to making a menu this way.

Now I just need to sit down with the scripting reference and get to work.

I would actually like to replace the horrid example of a game I wrote long ago with this one. I did end up finishing it, but I never did get a completed copy to you. I have lost it somewhere in the upgrade path, then went on to messing around with the DirectX API and various 3d objects. T

This is a rework of the same game with a bit more functionality and maybe an extra level or two. I'll sit down and set up my Sun webserver to give you an ftp link one of these days.