Omnimaga

Calculator Community => Major Community Projects => CaDan SHMUP => Topic started by: Iambian on September 04, 2010, 01:36:27 am

Title: CaDanITE
Post by: Iambian on September 04, 2010, 01:36:27 am
Calculator Danmaku Integrated Test Environment.

An idea for a rather hefty level editor for whenever CaDan will support external levels. With this utility you should be able to:

A few problems need to be worked out with CaDan before I can write CaDanITE, but it's a serious thought I'm thinking of. I mean, it would be pretty awesome to build your own levels for CaDan right on your calc, then test out those levels from the editor if you have a compatible version of CaDan on-calc.

Still. Just a thought at this stage. With a few sheets of paper serving as notes.
Title: Re: CaDanITE
Post by: Geekboy1011 on September 04, 2010, 01:43:08 am
cant wait to see how this progresses but knowing some of the putfalls in cadans current set up you got your work cut out for your self ^_^ so gluck
cant wait
and if you need any help testing feel free to ask ^_^
Title: Re: CaDanITE
Post by: Hot_Dog on September 04, 2010, 01:44:59 am
Should be fun!  But don't pressure yourself :)  Have some cherry flavored coffee.
Title: Re: CaDanITE
Post by: meishe91 on September 04, 2010, 01:46:00 am
This sounds really cool :) Good luck!
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 04, 2010, 06:38:18 pm
I remember you brought this up on IRC one night. Indeed this would rule, providing it's not too hard to use. :D
Title: Re: CaDanITE
Post by: Geekboy1011 on September 05, 2010, 01:19:15 pm
well i think the whole goal is to make it easy to use because atm making levels and scripts is a real PITA its easier than java to me though so
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 05, 2010, 01:31:11 pm
Yeah I remember you discussed about it on IRC and it seemed rather hectic x.x
Title: Re: CaDanITE
Post by: Geekboy1011 on September 05, 2010, 02:44:57 pm
well its very heavy on the math as all the bullets movements are caculated via math using 1 or more of 4 registers thus its hard to manipulate them all and have multiple patters at once
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 07, 2010, 02:36:40 am
X.x

yeah my hope for the editor is that it will have some ways to generate some patterns using some equations or filling a form. But coding such thing may be kinda hard. Good luck Iambian!
Title: Re: CaDanITE
Post by: Geekboy1011 on September 07, 2010, 10:17:51 pm
i think that may be the plan or at least have pre-entered patterns that you can slightly modify speed(i think) angle rotation ect.

atm to make a bullet move around in circle motion like in this pattern

(http://geekboy.57o9.org/yay.gif)

is
Boss0EvE0:
 cd.shoot(r1)
 cd.add(r1,60)
 cd.shoot(r1)
 cd.add(r1,60)
 cd.shoot(r1)
 cd.pause
 cd.goto(Boss0EvE0)

and atm i don't even remember how that works X.x
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 07, 2010, 10:19:46 pm
OUch that seems kinda confusing x.x

Looks pretty awesome, though.
Title: Re: CaDanITE
Post by: Geekboy1011 on September 07, 2010, 10:23:09 pm
yeah funny thing is its not even what i wanted to happen its just how it came out X.x

and its looks confusing but it gets easy once you learn the scriptin engine :/

the hard part is that you only have r1-r4 to work with

thats it X.x

here is a script iambian made

(http://geekboy.57o9.org/6.gif)

this one is in proper format though it calls teh end of the boss and every thing not just the script bullet pattern it self

Edit: actually i think this one has all the levels of the boss in it i mean liek easy medium hard lunatic i forget X.x

Code: [Select]
Boss0EvE:
 cd.startup(300,30)
 cd.call(0,Boss0Flyin)
 cd.ld(r3,32)
 cd.jid(Boss0EvE1)
Boss0EvE0:
 cd.track(r2)
 cd.add(r2,24)
 cd.ld(r1,(256-(24+28))/2)
Boss0EvE0L0:
 cd.shoot(r2)
 cd.add(r2,2)
 cd.djnz(r1,Boss0EvE0L0)
 cd.ld(r1,10)
 cd.track(r2)
 cd.add(r2,50)
Boss0EvE0L1:
 cd.shoot(r2)
 cd.add(r2,24)
 cd.shoot(r2)
 cd.add(r2,-28)
 cd.pause
 cd.pause
 cd.djnz(r1,Boss0EvE0L1)
 cd.ld(r1,10)
Boss0EvE0L2:
 cd.shoot(r2)
 cd.add(r2,28)
 cd.shoot(r2)
 cd.add(r2,-24)
 cd.pause
 cd.pause
 cd.ld(r3,32)
 cd.djnz(r1,Boss0EvE0L2)
Boss0EvE0L3:
 cd.shoot(r1)
 cd.add(r1,60)
 cd.shoot(r1)
 cd.add(r1,60)
 cd.shoot(r1)
 cd.pause
 cd.add(r3,-1)
 cd.djnz(r3,Boss0EvE0L3)
 cd.goto(Boss0EvE0)
Boss0EvE1:
 cd.call(0,NormalExplosion)
 cd.callspell(Boss0EvESp1)
 
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 07, 2010, 10:28:08 pm
I see. Well at least it's smaller than I thought, though. I was certain it would be like 100-200 lines of code or something per level, since it's in ASM x.x
Title: Re: CaDanITE
Post by: Geekboy1011 on September 07, 2010, 10:30:12 pm
no thats the nice thing all the bullet scripts are written in a scripting system iambian wrote for it i mean i can make patterns in pure asm if i so choose but its not really worth it ^_^

the system isn't that hard actually its just gets tricky with the small amount of variables :/
Title: Re: CaDanITE
Post by: Iambian on September 08, 2010, 04:44:32 pm
Some code has been laid down but it still needs some work. Don't expect this thing to be a fancy-pantsy editor. It wont' be graphically impressive, but I intend on having it just do its job. When I get something that *can* be edited down, I'll start working on something to allow CaDan to accept these levels.
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 08, 2010, 05:14:47 pm
/me hopes it's not all command-prompt-based, though D:
Title: Re: CaDanITE
Post by: willrandship on September 08, 2010, 05:59:41 pm
I love those types of games!!!!

Nice to see there will be an editor. Some people (artsy types) :P could make some really awesome levels for it!
Title: Re: CaDanITE
Post by: Iambian on September 09, 2010, 09:56:27 pm
It won't be a command-prompt. The project is going to be more menu-based than anything else. At the moment, I'm trying to get cross-page calling down. What I have is essentially a variation on the bcall routine. Just ... trying to get it to work.
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 09, 2010, 10:28:04 pm
Ah ok good :D . I hope you can get it to work soon.
Title: Re: CaDanITE
Post by: ztrumpet on September 13, 2010, 04:44:05 pm
Wow, cool!  Good luck Iambian.

* ZTrumpet hands Iambian some cherries. :)
Title: Re: CaDanITE
Post by: Iambian on September 16, 2010, 04:08:25 pm
Slowly progressing. Initial menu now works. Working on an integrated help thing so you can press F1 (Y=) to get details on any menu item your cursor is hovering over. That should be fun.
Title: Re: CaDanITE
Post by: JustCause on September 16, 2010, 04:10:49 pm
Excellent. Danmaku editor FTW. If you release this, we may just make your levels for you.
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 16, 2010, 04:30:16 pm
Slowly progressing. Initial menu now works. Working on an integrated help thing so you can press F1 (Y=) to get details on any menu item your cursor is hovering over. That should be fun.
Very nice :D

Just make sure that the help isn't too large, though. It would be bad if like 8 KB of the game was just help x.x
Title: Re: CaDanITE
Post by: Iambian on September 16, 2010, 09:37:23 pm
Slowly progressing. Initial menu now works. Working on an integrated help thing so you can press F1 (Y=) to get details on any menu item your cursor is hovering over. That should be fun.
Very nice :D

Just make sure that the help isn't too large, though. It would be bad if like 8 KB of the game was just help x.x
Oh no. This level editor isn't going to be part of CaDan. It's going in its own app, which means I can use as much space as I want for it. I plan for the thing to be 2 pages, but that's for all the text that I'm going to be throwing in. Two pages is probably overdoing it but I wanted something more than just a level editor. I wanted to practice a better way of doing things that might later be incorporated into E:SoR or some other project.
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 17, 2010, 01:30:43 am
Ah ok cool :D. I think it's best to keep editors separate, else people who don't need it ends up wasting 16 additional KB for it x.x
Title: Re: CaDanITE
Post by: Iambian on September 20, 2010, 07:32:22 pm
Help system now works for the most part. You can hit F1 (Y=) to get help topics on just about anything and everything. As I add in more routines, you'd be seeing more stuff come up. After this mess, I'm going to throw together file operations and I'll somehow have to define a data structure for these projects. Ugh.
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 20, 2010, 08:03:56 pm
Good luck!
Title: Re: CaDanITE
Post by: ztrumpet on September 20, 2010, 08:44:17 pm
Sounds cool.  * ZTrumpet throws Iambian some cherries to help the coding process. ^-^  Good luck! ;D
Title: Re: CaDanITE
Post by: Iambian on September 22, 2010, 12:37:37 pm
Thought of how I am going to store all this data in a sane manner in this CaDanITE project. So I figured I'd go with sort of a miniature file system. The details are below in this code box thinger. I just wanna know if it looks like I'm missing anything, or if you can suggest a better or easier way to do it. Coz right now, I'm not entirely liking the fact that I have to have pretty much a file system for a CaDanITE project file, but it's the best thing I can come up with at the moment.
Code: [Select]
CaDanITE project file structure
Objects not part of the initial table structure gets a preallocated 8 byte name.

;----START OF FILE HEADER
.db $BB,$6D     ;denotes a compiled ASM program
.db $C9         ;If you attempt to run this as an ASM program it exits.
.db "CaDanITE:" ;9 characters that identify this as a CaDanITE level
.db 24chars     ;24 character description header for the project
;----START OF THE DATA FILE TABLE
.org $0000      ;addresses are with respect to this for relocatability
.db NN          ;number of 256-height screens
.dw ScreenDat1  ;address of screen data (specified far below)
.dw ...         ;Every 256 height screen has a boss assigned to it and their
.dw ScreenDatN  ;data pointers will be defined with the screen data
;---
.db NN          ;number of scripts
.dw ScriptDat1  ;address of script data (also defined far below)
.dw ...
.dw ScriptDatN
;---
.db NN          ;number of enemies that can be done
.dw EnemyDat1   ;address of enemy data (defined really far below)
.dw ...
.dw EnemyDatN
;---
.db NN          ;number of path data streams
.dw PathDat1    ;address of path data (uhm...)
.dw ...
.dw PathDatN
;---

;Filetype details:
;ScreenDATA    = 01 ;21 bytes total data size. Contains pointers to other files
;ScreenBITMAP  = 02 ;521 bytes total data size.
;BossAddress   = 03 ;16+1+N(2) bytes where N is # of spellcards. Points to other files
;SplCrdDATA    = 04 ;42 bytes total data size.
;BossGRAPHIC   = 05 ;129 bytes total data size
;BossCharSPR   = 06 ;9 bytes total data size
;BossTEXT      = 07 ;1+2+NN bytes where NN is data stream byte size
;ScriptDATA    = 08 ;1+2+NN bytes where NN is data stream byte size. Pts 2 othr files
;EnemyDATA     = 09 ;8 bytes total data size
;PathDATA      = 0A ;9+1+N bytes, where N is number of step pairs in movement path.

;-----BEGINNING OF CADANITE PROJECT FILE SYSTEM
;ScreenDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this data
.dw BossAdr     ;address of boss details ($0000=not set yet)
.dw ScreenBtm   ;address of 64x64 area indicating bottom screen
.dw ScreenBtmLp ;address of 64x64 area indicating bottom loop
.dw ScreenTopLp ;address of 64x64 area indicating bottom loop
.dw ScreenTop   ;address of 64x64 area indicating bottom screen (boss)
.db ScrollDelay ;A value between 1-9. A higher value means slower scroll.
.db LevelLoop   ;A value between 1-128. A higher value means the stage loops more.

;ScreenBITMAP
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this 512 byte chunk of data
.db 512 bytes   ;screen data

;BossAddress
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this entity
.db BossScript  ;Address to the boss script. lumped together with scripts
.dw BossGraphic ;Address to 32x32 boss graphic
.dw BossCharSpr ;Address to 8x8 boss sprite
.dw BossText    ;Address to boss dialog text
.db NN          ;number of spellcards in the game
.dw SplCrdAdr1  ;Address to the spellcard graphic
.dw ...
.dw SplCrdAdrN

;SplCrdDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;8 bytes for spellcard graphic name
.db 1 byte      ;indicates normal bracket or special bracket for spells
.db 4*8 bytes   ;32 bytes for spellcard text underlay (overlay will be autobuilt)

;BossGraphic
.db 1 byte      ;FILETYPE
.db 128 bytes   ;graphic. Tied to name of boss

;BossCharSpr
.db 1 byte      ;FILETYPE
.db 8 bytes     ;graphic. Tied to name of boss

;BossText
.db 1 byte      ;FILETYPE
.dw StreamSize  ;size of text file unknown. Tied to name of boss.
.db "textdata"  ;formatted for whatever. Uh. Details unknown. Won't get to it soon :P

;ScriptDATA
.db 1 byte      ;FILETYPE (boss and stage scripts gets a different filetype)
.dw StreamSize  ;size of the script file
.db N bytes     ;Script contents

;EnemyDATA
.db 1 byte      ;FILETYPE
.db 1 byte      ;enemy type flags
.db 2 bytes     ;Starting (x,y) position
.db 1 byte      ;Initial HP
.db 1 byte      ;Script ID
.dw cyclecount  ;Initialize this enemy at this cycle count (0-65535)

;PathDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;Name of this path
.db StreamSize  ;number of bytes that this path can take. Up to 128 (256 steps)
.db N bytes     ;bytes in the path stream
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 22, 2010, 12:58:06 pm
Mhmm that's a bit long x.x, Idk if I'Lll be able to figure out myself if stuff is missing, especially since there's a lot of z80 in there x.x
Title: Re: CaDanITE
Post by: Geekboy1011 on September 22, 2010, 11:08:36 pm
hmm i dont see any thing missing but again i only gave it a quick glance so yeah
the only other idea was i guess trading from the top down or something idk we were talking about it on irc
Title: Re: CaDanITE
Post by: Iambian on September 23, 2010, 06:31:27 pm
Minor update on the details. To ease a few worries, project files are going to be kept in appvars. Their names will be automatically generated by the app, but when you view them in CaDanITE, you'll only see the description (up to 24 characters long) that you gave the project files. You should be able to delete project files from there, if it comes down to it. You may not want to, but just for completeness sake, might as well.

Even though all project will be kept in FlashROM, I'll demand of its users to have at least 24KB of RAM free. You know. Just to make sure you can continue editing files while they are in RAM. Files in FlashROM aren't actually edited until you save your project, so you can decide to do things like discard any changes you make. What you are actually editing is a temporary copy.

Since this project file is going to act as a miniature file system, I was thinking as to whether or not to allow to remain in the project after it's deleted so you can use them again if you change your mind. If I go that route, I'll include ways to clean out unused items.

What do you guys think?
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 23, 2010, 06:41:52 pm
I'm glad we can keep our files archived before editing ^^. I assume the archived copies are kept during editing, right? It might be a good idea so if a RAM clear was to occur, we do not lose everything while editing (like Mario, for example)

I do not understand what you mean by the following, though ???

Quote
Since this project file is going to act as a miniature file system, I was thinking as to whether or not to allow to remain in the project after it's deleted so you can use them again if you change your mind. If I go that route, I'll include ways to clean out unused items.
Title: Re: CaDanITE
Post by: Geekboy1011 on September 23, 2010, 08:44:10 pm
same with me iambian can u clarify that statement thank you ^_^
Title: Re: CaDanITE
Post by: Iambian on September 23, 2010, 10:38:05 pm
What I meant by that can be compared with an extreme example: Microsoft Office (Word) documents. Even though you may "delete" stuff from the file after you have written and saved stuff, that stuff is never actually deleted. It just sits there in the file having been flagged as deleted. It remains in the file forever.

While that's a rather poor and rather disgusting example, what I'm suggesting is keeping things that you didn't want right then and there so that if you want them again, or even want to reference them later in another project file, it'll still be there. You'll be given the option of permanently removing them from the project at some point, but this *does* give you a sort of undo feature.
Title: Re: CaDanITE
Post by: Geekboy1011 on September 23, 2010, 11:06:06 pm
if possible i would make it a option in teh editor like a choice in a option menu cause i see my self having a use for it where as some people may need that extra few bytes in ram/arc and it wont be worth it for 
Title: Re: CaDanITE
Post by: DJ Omnimaga on September 23, 2010, 11:16:37 pm
Oh nice, kinda like a trash bin? It might be good to allow the user to disable this, though. Some people tend to forget to clean their stuff and might end up inadvertently filling their memory after several edits. X.x
Title: Re: CaDanITE
Post by: Geekboy1011 on September 23, 2010, 11:19:20 pm
yeah thats what i was thinking and that exact thing happens to me all the time with windows trash bin

>mfw hdd full
>mfw trashcan 8gb of data in it
...you get the idea lol

but yeah i would definitely do that idea ^_^
Title: Re: CaDanITE
Post by: Eeems on October 22, 2010, 10:39:19 pm
How's this coming along? I was wanting to play around with it :P
Title: Re: CaDanITE
Post by: DJ Omnimaga on October 22, 2010, 10:40:35 pm
I think he is working on E:SoR atm :P

You don't want E:SoR? D:
Title: Re: CaDanITE
Post by: Eeems on October 22, 2010, 10:45:35 pm
Hmm, well I want both :P
Title: Re: CaDanITE
Post by: DJ Omnimaga on October 22, 2010, 10:52:37 pm
I know, I was just kidding because for the last two E:SoR updates, someone immediately brought up a CadanITE progress request ;D
Title: Re: CaDanITE
Post by: Geekboy1011 on October 14, 2011, 04:04:34 pm
NECROPOST!

X.x

yeah my hope for the editor is that it will have some ways to generate some patterns using some equations or filling a form. But coding such thing may be kinda hard. Good luck Iambian!

we were actually thinking about this on IRC a bit ago allowing you to imput polar equations and get a movement table built for it. we could probably rig up a command to allow bullets to use it as well but i think we had the intention for character mobility and such