CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: JWinslow23 on June 21, 2016, 07:28:08 AM

Title: External level pack help?
Post by: JWinslow23 on June 21, 2016, 07:28:08 AM
Hey there. I'm remaking a game I once made, and there's one thing I want to be able to add: external level packs. I might be able to make a level-pack maker just fine, assuming I know how the appvar thingy works in Axe, but what do I have to do to make that level pack associated with the program? As in, when I start the game, I want to be able to see a list of the game packs on my calculator for that game and nothing else, how do I do that?
Title: Re: External level pack help?
Post by: Snektron on June 21, 2016, 03:59:14 PM
I would store some kind of header/identification byte. Then you can loop through all appvars and check if they have the header/id byte. I think thats how Axe does it (since you need the .NAME header)
Title: Re: External level pack help?
Post by: JWinslow23 on June 21, 2016, 06:42:58 PM
I was thinking of that, but how do I loop through all appvars? The only way I'm thinking is to generate all possible names and search those, but I'm thinking there might be a better way I don't know how to do yet.
Title: Re: External level pack help?
Post by: Snektron on June 21, 2016, 06:57:58 PM
On omnimaga theres a post on how to traverse the VAT table, you can use that to search for the var pretty easily.
Title: Re: External level pack help?
Post by: c4ooo on June 22, 2016, 01:21:06 AM
You can use the memkit axiom to parse the vat easily, you should probably poke runer112 on omnimaga with any questions about it.
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 22, 2016, 02:09:46 AM
Is it true that programs and appvars starting with the letter A are faster to access than ones starting with latter letters?
Title: Re: External level pack help?
Post by: JWinslow23 on June 22, 2016, 05:12:03 AM
Thank you all, I checked out the aforementioned post on Omnimaga and it helped a lot. Now I can traverse the VAT any way I please 8) .

One clarification I need before I actually start using my knowledge to make this game: to change the size of an appvar (either making it bigger or making it smaller), what do you have to do? I don't wanna have to copy the data somewhere in SafeRAM, delete the appvar, and copy it back to a new empty appvar like I'm thinking.

Oh, and @DJ Omnimaga , it seems like the programs are organized in the VAT the same way they're organized in the memory menu.
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 22, 2016, 05:37:46 AM
I sadly never messed around enough with appvars to help. Usually, when I did, they never changed in size. Can't you just delete the appvar then recreate it, or do you need to preserve its content?
Title: Re: External level pack help?
Post by: JWinslow23 on June 22, 2016, 05:53:40 AM
Quote from: DJ Omnimaga on June 22, 2016, 05:37:46 AM
I sadly never messed around enough with appvars to help. Usually, when I did, they never changed in size. Can't you just delete the appvar then recreate it, or do you need to preserve its content?
I need to preserve its content. I simply want to add bytes at the end or take bytes from the end, and have it done without screwing everything up. Redeclaring the size using GetCalc doesn't seem to work.
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 22, 2016, 06:46:17 AM
Ah ok. /me pokes @Hayleia in case he might remember (I forgot who else still did Axe  here). Maybe Runer might be able to help on Cemetech/Omni if he's still around.
Title: Re: External level pack help?
Post by: TheMachine02 on June 22, 2016, 08:13:31 AM
Well in that case the memkit axiom can come usefull since there is a command to increase/decrase the size of an appv, which should be in the zip file of axe.
Title: Re: External level pack help?
Post by: JWinslow23 on June 22, 2016, 08:30:18 AM
@TheMachine02 I might have to look into that. However, I am on vacation right now and I'm using a limited-resources resort laptop (it only has Internet Explorer, and strict website blocking :P ). I had to construct my routines and code entirely from scratch in my time here. Thank you for telling me, I never noticed.

Also, I think I can do entirely without something like that. I've just thought of something. I gotta code this.

/me gets to work on his project...which, by the way, is a remake/sequel of sorts to a lesser-appreciated game I made a long while ago on Cemetech...
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 22, 2016, 03:28:53 PM
Oh, I didn't know the Memkit axiom could do that. I stopped Axe long before Axioms became a thing. Also @JWinslow23 I hope you're not stuck with IE6 for the entire summer O.O

As for least appreciated game, I am curious about what it is, since I recall appreciating most of your games :P
Title: Re: External level pack help?
Post by: JWinslow23 on June 22, 2016, 07:06:08 PM
Surprising as it is, it's not even the most recent version of Internet Explorer. Unprofessional, if you ask me, my hotel needs to get with the times! :P Don't worry, I'm home now, with my sweet, sweet Chrome.

Oh, and I've done a lot of the programming for the game already, but the level editor and loader are user-unfriendly as hell, so it'll be a while before I release something I can call "playable" by any standard.

Kind of you to say you appreciate all of my games, thank you. :) Until I release this one, see if you can peruse through my "recent" projects to find it (one of my latest Axe games besides TITOL and DBII)...
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 23, 2016, 01:05:08 AM
I guess maybe your hotel staff is not really fond of technology and thus, have never bothered making sure their stuff is up to date or working. I'll have to check your past/recent projects to see if I can find it. Also does DBII mean Dragon Ball II? :P
Title: Re: External level pack help?
Post by: JWinslow23 on June 23, 2016, 02:29:49 AM
Desert Bus II. Remember, the one with way-over-the-top graphics?
Title: Re: External level pack help?
Post by: Dream of Omnimaga on June 23, 2016, 04:45:04 PM
Oh right, that game lol.