Jump to content
IGNORED

Loading one piece of code from another


InfernalKeith

Recommended Posts

Figuring on my next project being done in sections, which could load in as needed.

 

Let's say, for argument's sake, that all I'm doing is a simple 500 RUN DSK1."NEXTBIT" to go from one to the next.

 

I seem to recall that characters redefined in program 1 will stay redefined in program 2, but that variables won't. True?

 

Also, if you had one relative file on the disk with all the needed variables, and you wrote to it before RUNning a new segment (then loaded all the data back in when the new segment took over), are there any complications (besides a huge slowdown)?

Link to comment
Share on other sites

I seem to recall that characters redefined in program 1 will stay redefined in program 2, but that variables won't. True?

 

True. The only way to transfer values that way is to place them into the low memory using CALL LOAD.

 

Also, if you had one relative file on the disk with all the needed variables, and you wrote to it before RUNning a new segment (then loaded all the data back in when the new segment took over), are there any complications (besides a huge slowdown)?

 

No, that would work fine. Any reason it can't be a sequential file of data? Relative is useful for indexed data, but if it's just a stream of values, a sequential save/load is probably the simplest approach.

 

Adamantyr

Link to comment
Share on other sites

I concur with Adamantyr. The first versions of Lemonade Stand did this---I had to run 3 separate programs---title screen, then pre-game/pos-game/ then the main gameplay screen. This was my first game and I had no idea what the hell I was doing at first. That's when Classic99 came into my life and saved my soul. :). How cool was it to transfer Lemonade Stand to the PC and be able to use TI99Dir and the copy and paste feature?!? It was a revolution for me, and then I was able to start making progress... I know what you're trying to do here Keith, and it's a good step. The NEXT step is to save your data into low memory-- then CALL LOAD/CALL LINK. It will speed your game up exponentially, I promise you. You want to talk fast? It'll be lightning speed switching between levels!!!

Link to comment
Share on other sites

Okay--- just played Herding Cats. :). I'll have to play it more, but I got the general idea. LOVE it... What a cool

original concept!!! I think, however, that you could really improve speed with some assembly support, if you're into that idea. :). I gotta say, it's very difficult... :) Getting the concept down is very important before you can make any progress while playing the game... Indirect control--- :). I have a feeling that I will HATE black cats by the time I master these levels. :)

Link to comment
Share on other sites

Okay--- just played Herding Cats. :). I'll have to play it more, but I got the general idea. LOVE it... What a cool

original concept!!! I think, however, that you could really improve speed with some assembly support, if you're into that idea. :). I gotta say, it's very difficult... :) Getting the concept down is very important before you can make any progress while playing the game... Indirect control--- :). I have a feeling that I will HATE black cats by the time I master these levels. :)

 

 

I'm actually not too worried about the current game. I know it could be much faster, but I noticed even running it in CPU Overdrive mode in Classic99, that the speed of the cats becomes almost too fast for gameplay. If you were deploying the tools in real time, instead of pausing the action, it would definitely work better as a faster game. I will concede that a few of the tools, like 'cut screen in 2' and especially the Catdozer, are unacceptably slow at the moment.

 

I'm thinking more of Downward at the moment -- I'm thinking it would be a much richer game if I could load in modules for the various places the character visits (inns, bazaars, temples, farms, etc) instead of having to cram it all into one main program. Now that many people are using CF drives or their emulator, the problem of disk load time may not be as bad. The big trick will be to make sure I'm more organized so that the same standard batch of variables gets transferred between modules, and you don't wind up leaving the bazaar with zero gold because I forgot to save and load it from the master variable file.

 

I dunno. Once I dive back into the game, I'll try out a rudimentary version of what I'm talking about and see how it works.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...