Author Topic: Omnimaga Map Maker (xLib-CIII)  (Read 15080 times)

0 Members and 1 Guest are viewing this topic.

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #45 on: March 10, 2010, 03:43:52 am »
Well, I have no idea how well this thing runs on xLIB right now. It's only tested in CIII but it only uses xLIB commands at the moment so I'd assume it runs fine on that too. The only difference I'm planning on is the CIII version will be able to make programs.
However, I may think of some others uses for the CIII only version but I'm also trying my best to make this take up as little space as possible so that it can handle large maps better. Personally, I wouldn't try anything above like 50x8 (which are the size of maps for Blockage) which is 400 tiles. Though, if you have nothing on the calc but the editor it should be able to handle even bigger maps no problem. (Although, I'm only assuming this for 84+SE since that's what I have.)

I'm going to have a look at the code some more though. I feel like I can speed it up some more but it may require some sub-programs or CIII commands.

Also, thanks Builderboy. Although I doubt it'll ever be helpful to you with the stuff you're coming out with, I know it'll help SOMEONE. (That is, if Axe doesn't kill CIII/xLIB completely. xP)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #46 on: March 10, 2010, 03:54:02 am »
mhmm program making that sounds cool. It would be cool to have a map maker that didnt required us to manually insert the data in programs all the time.

What I think is that the user could set up a range of programs, for example prgmMAP1 through 9. He would be able to dig maps from the code directly (the same way as most xLIB games) and when it's time to save, the map would be loaded back in the program. No need to exit and stuff

Also Axe will not kill xlib/celtic because it is not designed for games like RPGs. It has no subprograms support and the code size is much larger than the source, so you cannot make very large games in overall. The only occasion an Axe game will be smaller is if almost the entire code is sprite data. In Axe, a 8x8 sprite takes 18 bytes in source code format (1 byte for the starting "[" character, 16 bytes for the hex data and 1 byte for the linebreak). In compiled form, it only takes 8 bytes. Axe is meant more for arcade games, altough still freaking awesome considering you practically just take BASIC code and in some case, barely need to modify it to make it Axe compatible. In other words it's almost BASIC to ASM conversion.
« Last Edit: March 10, 2010, 03:58:18 am by DJ Omnimaga »

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #47 on: March 10, 2010, 04:01:21 am »
Hm... so you mean a program that just has the map typed out already?

Like, for example:
Code: [Select]
[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]
And that's it?
(Just making sure I'm on the right page.)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #48 on: March 10, 2010, 04:11:06 am »
For example, a typical game from me has map data like this from prgmMAP0 to prgmMAP9:

Code: [Select]
If M=1
[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]
If M=2
[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,5,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,0,1,1,0,1]]
If M=3
[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]

If the map ID has no assigned map, it would simply display an empty map when trying to open it in your program. When saving, it would save the map at the corresponding ID. If the ID alerady exists, it would replace the corresponding map. If the ID doesn't exist, it would simply add it in the respective area. Deleting a map completly would delete the data and its ID. Idk how hard it would be to code, though...

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #49 on: March 10, 2010, 04:19:37 am »
Hm, I get the "If M=1:[map data]:If M=2:[map data]" part of the programs but why is it separated between prgmMAP0-prgmMAP9?
Couldn't it all just be in one program if you do it like that?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #50 on: March 10, 2010, 04:23:52 am »
Because with hundreds of map it won't fit in RAM in one single prog

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #51 on: March 10, 2010, 04:44:23 am »
Hm... any idea how many maps should be in each program?
Also, I think I can easily get rid of the "If M=1" stuff because with CIII you can just read the lines and you'd have to be using CIII for the editor to work anyway. So instead of:
Code: [Select]
:If M=1
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]
:If M=2
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,5,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,0,1,1,0,1]]
:If M=3
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]

It will just be:
Code: [Select]
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,5,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,0,1,1,0,1]]
:[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]

It'll make the code easier to manage by far.
Also, the code is better this way since you'll never need to unarchive the map programs. (this is how I handled maps in Nyaar) All you need to do is "expr(det(5,"MAP",map#,1→[A]" to load the map.
« Last Edit: March 10, 2010, 04:48:33 am by {AP} »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #52 on: March 10, 2010, 05:20:22 am »
oh yeah right, i guess that could work too.

And the maps can be edited directly from archive? If so, I guess program size shouldn't be a problem anymore (unless you want more than 65536 bytes of data). :)


One major issue, though, with programs larger than 24 kilobytes: no more boolean logic in maps :(

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #53 on: March 10, 2010, 05:45:20 am »
Well, you can load one of the maps to [A], edit it, and save it back in the archived program no problem so size definitely wouldn't be an issue in total but you still can't make like 50x50 size maps without trouble.

Though, what do you mean boolean logic in maps?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #54 on: March 10, 2010, 02:30:39 pm »
For example:

[[1,1,1,1,1,1,1,1,1,1,1,1,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,9-Li(4)=0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,0,0,0,0,0,0,0,0,0,0,0,1]
[1,1,1,1,1,1,1,1,1,1,1,1,1]]

Where the 8 would design a closed treasure chest and 9 an opened one. Metroid II, Reuben Quest and Illusiat 13 uses this a lot (altough Illusiat doesn't use matrices for maps)

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #55 on: March 10, 2010, 03:46:28 pm »
Hm...
If I can think of a way to allow users to 'script' some tiles that's definitely a good idea.
Only issue would be that I can't think of a way that's both flexible and safe.

For example, I could have a prompt that asks for the tile default and the tile after you changed it, but they'd have to work with the variables/lists I choose. I'll keep thinking of a way to customize that too though.

Another thought is that I could have them type out the exact code they want so for example you choose a spot, hit a button to go to a screen that asks what you want that spot to contain and you could type in "9-Li(4)=0" and it'd appear in that spot in the matrix. The issue with that is that it's not as safe for typos and such. Could crash the program or glitch the map up completely.

Anyway, I'll think it over.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #56 on: March 10, 2010, 03:49:50 pm »
yeah, what I think is that boolean stuff needs to be edited manually in the matrix data inside the program. However, with the lack of If M=1, 2, etc, this could be extremly hard to find a matrix in the code, and in this case, the map data programs would need to be under 24 KB so they can be unarchived (remember we only have 24389 bytes of RAM, not 65535 :P)

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #57 on: March 10, 2010, 04:01:50 pm »
I'm thinking I may just make it have the second option and tell people that they seriously need to be carefully of what they type in.
I doubt any beginners will be trying to script tiles anyway and more experienced coders should know how to fix it. I'm thinking of a way of testing the code (probably with inString) that will fix some of the common things like missing the closing parenthesis and such. I'll definitely have to experiment though.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #58 on: March 10, 2010, 04:40:44 pm »
That sounds really cool!
I'm glad you're still working on this {AP}!
Good luck! ;D

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: Omnimaga Map Maker (xLib-CIII)
« Reply #59 on: March 10, 2010, 04:56:55 pm »
Thanks~
I'm not sure how much I'll get done on this project since I'm trying desperately to learn Axe.
It's hard because I SEE basic code but I can't think like a basic programmer anymore so a lot of things I used to do naturally are causing countless RAM clears. Fortunately, it's not doing anything but making it take longer to get used to Axe and being a little frustrating.

I dunno. If Axe gives me too many more issues, I'll just go back and do some heavy work on this program.
_____________________________________________________________________

EDIT: Well, big issue, I seem to have forgotten that CIII can't write to archived programs. It can read from them fine, but that doesn't help with my saving issue. It's going to be hard to fit a copy of the matrix, the string for the matrix, and the information in the unarchived prgmMAPDATA in the RAM without a huge risk of Err:Memory.

So, it seems like I'm going to have to keep the current set-up which just keeps the map in [A] for the user to manage themselves. Of course, I could also have it save to Str1, but that's not really any more useful. Also, I could have it write to the bottom/top line of whatever program they want, but it still has to be unarchived and I'm not sure how useful that'd be either.

I just don't know anymore. Anyone else have any ideas?
« Last Edit: March 10, 2010, 06:22:47 pm by {AP} »