Omnimaga

Calculator Community => Major Community Projects => CaDan SHMUP => Topic started by: Iambian on September 10, 2008, 07:26:23 pm

Title: Yet another shooter
Post by: Iambian on September 10, 2008, 07:26:23 pm
This post is just to announce that I'm working on a danmaku SHMUP. The sort of gameplay that the game will have will be modeled after Touhou Project 7 : Perfect Cherry Blossom.

I do expect to put up a screen shot as soon as I can get something that demonstrates the engine instead of the already-working grayscale. Before I can demonstrate, though... I've got to finish that part of the engine.

So, no screen shot. Yet.

But while I'm posting, I want to ask for a name for the application and a name for the project. At first, I've tried BH83, and then ClcSHMUP, but none of those really satisfy me. Maybe it's just me...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 10, 2008, 08:50:56 pm
"danmaku" sounds so much like Damakaru on IRC O.o (randomist/insanity nickname the last time I saw him), I hope you finish this project though, this sounded rather promising. I can't wait for screenies when possible.

As for name, I might try to get some ideas in the next days, altough I can't promise anything x.x
Title: Re: Yet another shooter
Post by: Tribal on September 11, 2008, 06:07:50 pm
What about 'BulletHell'?
Title: Re: Yet another shooter
Post by: kalan_vod on September 12, 2008, 04:04:50 am
Sounds great, I would love to see something more on this as the plans/features :P
Title: Re: Yet another shooter
Post by: Iambian on September 15, 2008, 11:54:26 am
The engine in its most stripped down form is nearly done, but I still need to test the main parts for its goodness. I've already tested the maintenance routines used to keep track of the tables, but as I've said before.

Also, I'm considering dropping grayscale support since too much time is needed for the engine. I may end up adding that back in later as I can come up with a better idea of what my timings will be and what additional methods I can come up with to do what I want to do.

Expect a screenshot of simply the movement engine functioning pretty soon. Maybe with a little extra just to make the thing look reminiscent of an actual game.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 15, 2008, 02:01:07 pm
I would drop grayscale support if I was you since it might be hard to make it look good on all calcs at once and slow the game down. No grayscale would speed up things signifiantly
Title: Re: Yet another shooter
Post by: kalan_vod on September 15, 2008, 06:47:23 pm
Well I will enjoy it either way, and seeing how things are working out for tr1p1ea and his 8 levels of GS running at 4 levels of GS...I am really excited to see what this looks like!
Title: Re: Yet another shooter
Post by: TIfanx1999 on September 16, 2008, 05:35:16 pm
If you can keep the GS without sacrificing speed all the better. Im sure it'd still be fine without tho.
Title: Re: Yet another shooter
Post by: Iambian on September 16, 2008, 11:09:56 pm
At the moment, the bullet rendering and movement engine is now working fantastic for 2x2 sized bullets and linear paths, respectively.

Right now, I could simply add in your character, collision detection, and then call it an asteroid dodging game in about fifteen minutes or less, but I know I plan on having a better game than that, so... I'll need more time to actually code in that part.

Grayscale (of some sort) has not been sacrificed as of yet, so there still might be hope. Then again, I haven't done any backgrounds so that might still take some time.

Still... any suggestions of any names? I just thought up of "Touhou7i", considering that this game will be be based off of the 7th project and the "i" would indicate it starting in the imaginary direction (lol).

EDIT: Just did some screenshots.

This screen shot shows off some nice, even movements and teh large number in the scoreboard : http://img239.imageshack.us/my.php?image=ptiani1ps9.gif

This screen shot shows off the engine when it's totally maxed out. The scoreboard has been changed to reflect the remaining bullets on the screen, divided by 2 : http://img185.imageshack.us/my.php?image=ptiani2nh0.gif
Title: Re: Yet another shooter
Post by: Iambian on September 22, 2008, 05:38:57 pm
I've gotten character display and movement has now been coded in and it successfully works inline with the scoreboard, so the player can only really move at each refresh cycle (your dx and dy will be used to calculate movement steps for each refresh cycle). Coding some sort of collision detection shouldn't be too difficult, since the code will be much similar to the routine used to handle rendering bullets (the hitbox will be 2 by 2 pixels at the approximate center of the sprite). I should also be able to code it inline the scoreboard routine so that it, too, will have virtually no impact on the speed of the program.

With writing stuff inline with the scoreboarding routine, I'm exploring what other aspects of the game can be crammed within the wasted clockcycles used to update the scoreboard, such as rendering enemy sprites, player bullets, and such. Keep in mind that the spot that displays the score already uses its wasted clockcycles to calculate each digit to the score.

Now, for those that are unaware, clockcycles are "wasted" because the LCD requires some amount of time of delay before it'll accept more data or instructions. This equates to roughly 60 clockcycles if the processor runs exactly at 6Mhz since the documentation for the LCD states that a 10 µs delay is required between data writes, but most of my sources agree that it's safe to pick a delay around 65 to 66 clockcycles. If you wanted to be lazy, you'd just make the processor do meaningless work just to wait out that delay and continue to update the screen.

Between just writing the data (assume 42 clockcycles because an out instruction takes up 11 and the worst way to feed that data would take up 13), writing an entire column (64 bytes) would produce a waste of around 2688 clockcycles. There are four of these columns, so in updating the scoreboard, you'd burn off 10752 clockcycles doing absolutely nothing.

In order to keep the timings in my program tight enough to actually work, I intend (and have been partially successful) in utilizing most of those wasted clockcycles in performing something of some use. If you remember from the top of this post, you'll already know what I've done with it so far.

Doing it this way *does* require a bit of memory for all that code, but the speed benefit is way worth it, especially because I'm writing a FlashAPP for this game.

----------
In summary...

Not a whole lot got done except moving a character sprite and drawing it across the screen.

Grayscale is getting iffy unless I allocate a third buffer for the contents of the screen inbetween updating.

TI-83+SE/84+ support is *NOT* planned until I can get interrupt timings down for that.

I'm trying to get the biggest bang for my buck when it comes to spare time between screen writes.

A request for backgrounds (64 pixels wide) flies out to whoever wants to do it.

Cherry flavoring has been added.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 22, 2008, 10:55:38 pm
Awesome to see more progress. For grayscale it might be better to get rid of it I guess and if you ever get luck with a SE/84 version then make a SE only version with grayscale support. Grayscale can slow things down a whole lot. Most of the time by at least 50%
Title: Re: Yet another shooter
Post by: Iambian on September 23, 2008, 07:34:43 pm
I made one slight improvement in the game, but that improvement forces me to keep the grayscale. What I did was that when the player "focuses", it switches the player sprite to the gray buffer so that the hitbox, whenever I get that coded in, will be easier to see against the player sprite. I did it this way because in the original game, focusing causes the player's hitbox to become visible. Now, it's just a matter of coding in the actual collision and then we'll see how things progress.

This complicates things now that I have to redraw the gray buffer each time now, but I sure hope I can get it worked out.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 23, 2008, 11:16:12 pm
oooh I see, quite nice actually. Hope you can keep the game fast enough
Title: Re: Yet another shooter
Post by: Iambian on September 24, 2008, 05:43:31 pm
I have collision detection and all those goodies associated with the hitbox programmed in, and I must say. It looks pretty!

When I put in the code that handles what you do if you get hit (like decrease your life, cause you to explode, whatever), I'll go ahead and post another screenshot of the game so far...

... and maybe a copy of the game in that state. More details about that when it becomes available.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 24, 2008, 06:04:03 pm
w00t awesome, please do! I would like to try out what you got so far
Title: Re: Yet another shooter
Post by: Ding_Programs on September 24, 2008, 07:16:01 pm
me too, I would love to try it as well!
Title: Re: Yet another shooter
Post by: Iambian on October 01, 2008, 02:56:02 pm
I don't have a screenshot yet, but this is what is playable at the very moment. Since it doesn't have a valid signature, you're going to have to run it through PindurTI (which I know will accept the app regardless of what its signature is).

You can't really shoot anything yet and the bullets come from nowhere. The only thing you can do now is dodge. To aide in this, you can hold the MODE button (ESC on PindurTI) to "focus" your character, which makes the hitbox visible.

Try it and see how high of a score you can get. And don't worry about topping off the scoreboard; that might take days to weeks to do.
Title: Re: Yet another shooter
Post by: Ding_Programs on October 01, 2008, 04:07:05 pm
downloaded!
Title: Re: Yet another shooter
Post by: Tribal on October 01, 2008, 04:40:46 pm
Meh, not at home  >:(
And I'm having computer problems  >:( >:(
So I guess I'll have to download it another time  :-\
Title: Re: Yet another shooter
Post by: Ding_Programs on October 01, 2008, 04:57:23 pm
DOWNLOAD IT NOW!!! It's good
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 01, 2008, 06:51:30 pm
cool! Gonna try this asap!
Title: Re: Yet another shooter
Post by: Ding_Programs on October 01, 2008, 09:40:46 pm
this is amazing!
Title: Re: Yet another shooter
Post by: Iambian on October 06, 2008, 11:03:01 pm
The following is another screenshot of the game. This time, it demonstrates the circular bullet movement routine and ... I'm out of time. Just see for yourself.

http://img505.imageshack.us/my.php?image=ptiani1un5.gif
Title: Re: Yet another shooter
Post by: TIfanx1999 on October 06, 2008, 11:30:12 pm
That looks nice!
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 07, 2008, 02:05:12 am
wow that circular thing is amazing, still all run fast even with that many goodies moving around
Title: Re: Yet another shooter
Post by: Ding_Programs on October 07, 2008, 06:23:29 am
ooh impressive! Reputation level=30
Title: Re: Yet another shooter
Post by: kalan_vod on October 09, 2008, 08:47:24 pm
Just beautiful, and I cant wait to see more! I love how smooth it runs!!
Title: Re: Yet another shooter
Post by: Speler on October 11, 2008, 02:17:43 pm
Looking good!
Title: Re: Yet another shooter
Post by: Madskillz on October 12, 2008, 10:23:10 pm
Looks great, I am really looking forward to seeing this.

By the way did you use one of my tiles from cubez? ;D
Title: Re: Yet another shooter
Post by: Iambian on October 16, 2008, 01:21:38 am
So... here's the current status of the entire project:

I've gotten "enemy bullets" to rain down in a hell of ... whatever. That's what this type of game is supposed to be. You can actually play as far as dodge the crap that's being flung at you, but you still can't shoot back at anything, let alone being able to shoot! That's what's being planned. So far, up to 8 enemies are planned to appear at the same time but if given the time to do so, I might expand it to 16. As far as dodging goes, the engine's capable of flinging 128 of those deathballs at you simultaneously. No worries, since you can hold the MODE key down to "focus" your player to make it easier for you to dodge all that crap. Player spell cards / bombs aren't fully implemented, but you should be able to see the beginnings of such. Thing about the bombs is that so far, they're only usable when the "Border of Life and Death" is running (time between you get hit and the time you die). A quick edit can change this to an "anytime" type of deal.

Didn't feel like reading that mess? This screenshot says a bit of it (though the scoring system is still being used as a debugger) : http://img184.imageshack.us/my.php?image=img3ba4.gif

This .gif is best viewed in Firefox.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 16, 2008, 01:37:40 am
oh wow i love that animation. Nice job so far. Glad you posted a screenie in 2x size format too ^^
Title: Re: Yet another shooter
Post by: tr1p1ea on October 16, 2008, 08:59:46 am
Awesome work, screenie works fine in Opera too :).
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 16, 2008, 10:05:00 am
Yeah true, Opera 9.5 or above can view screenshots fine. In older versions the max framerate was 10 fps.

I wonder if IE now display long animated gifs without slowing down near the end like in IE6?
Title: Re: Yet another shooter
Post by: Madskillz on October 16, 2008, 02:16:59 pm
looks good, man there is a lot of stuff going on. Cant wait to see more!
Title: Re: Yet another shooter
Post by: fourchanb on October 18, 2008, 07:11:58 am
Woah, I never knew you were working on this. It looks really nice, you are a lot further than me what bullet patterns are concerned, but there's no enemies?

For the record, I announced the project on June 22nd on UTI ;). Does that make me the first to get this idea?
Title: Re: Yet another shooter
Post by: Iambian on October 20, 2008, 12:35:51 pm
The enemy and the being able to shoot thing is being planned out, but I've run into problems regarding the time I've restricted myself to. I'll be able to work them out, but not without some effort, so it'll take time.

And, yeah. You *are* first to get the idea. I started my project Wednesday, August 20, 2008 at 11:49 AM, according to the timestamp on the main project file. I didn't announce the project to the "public" until the first post on this thread. The project was actually announced on IRC.

If you want an outline of how my project basically works so far, PM me and I'll fork over the details.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 20, 2008, 02:13:40 pm
At least with two similar projects there are chances that both will be even better than intended to be, altough they are alerady looking pretty good.

I hope they both get finished :)
Title: Re: Yet another shooter
Post by: Iambian on October 27, 2008, 07:27:03 pm
No real update yet. The code that renders and moves player bullets seem to be working and I intend on letting the player shoot pretty soon, although it'll be at nothing at the moment. That'll be the next thing to be coded, but I still have to write a clipping sprite routine that works on a 64*64 pixel buffer as opposed to the more traditional 96*64 pixel buffer. It *should* be easier, but let's see how well things pan out.

After that, I'll be coding in a scripting system so that stages and enemies (including bosses) can be "coded" in. The system'll be flexible enough to allow loading of external levels (though I may not do that yet) and the ability to challenge individual spellcards in the practice mode. Timing won't be as much of an issue since I totally neglected a completely free slot in my interrupt timing scheme.

Luck or not, the project can be completed as the scheme stands. The foundation is solid enough...

... though don't expect the game to work on anything higher than a TI-83 Plus when this is completed, since the game requires interrupt timings found only on that calculator. A work-around for a higher calc would probably be to use a crystal timer to simulate timings similar to that found on a TI-83 Plus.

EDIT: I'll also be adding in a LOL-type internets story at the suggestion of Drak (#lobby) and a "Nullity" game mode which is reserved for only the masochistic professional (or professional masochist, whichever floats your boat. 1 life, no bombs. Potential Youtube vids, anyone?)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 28, 2008, 04:31:24 am
Cool, so Rick Astley is the final boss? err... I mean I can't wait for the final version :)

As for 83+ only I think it will be fine since TI still sell 83+s, being a lot cheaper and still popular
Title: Re: Yet another shooter
Post by: Madskillz on October 28, 2008, 08:10:27 pm
well I'm out my 83+ doesn't work anymore...still keep up the progress I can always play it on an emu.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 28, 2008, 10:35:49 pm
:'( sorry to hear madskillz, I hope you won't be giving up on your projects though since you don't have a real calc to test your stuff right away x.x
Title: Re: Yet another shooter
Post by: Iambian on November 01, 2008, 12:09:07 am
Code is in place to initialize enemies, so now there's the task of rendering them and colliding them with the bullets. After those tests are done, then it'll be time to write the script system and then test that out. Sometime in between these steps (and definitely after), I'll post a screen shot demonstrating the code. Perhaps maybe I'll attach a binary to the post showing it all.

Then I'll start on an actual title screen...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 01, 2008, 03:13:20 am
by binary I assume you mean a demo?
Title: Re: Yet another shooter
Post by: bfr on November 01, 2008, 08:37:03 pm
Quote
EDIT: I'll also be adding in a LOL-type internets story at the suggestion of Drak (#lobby) and a "Nullity" game mode which is reserved for only the masochistic professional (or professional masochist, whichever floats your boat. 1 life, no bombs. Potential Youtube vids, anyone?)

Quote
The system'll be flexible enough to allow loading of external levels (though I may not do that yet) and the ability to challenge individual spellcards in the practice mode.

That's going to be pretty cool  8)

Title: Re: Yet another shooter
Post by: Iambian on November 07, 2008, 10:54:47 am
First of all, it was a pain to find a image hosting service that didn't seem to suck as bad as imageshack. That's something I'd like to let you all know.

So, back on topic... the shooter now renders enemies, and lets you shoot them down with extreme prejudice (zero delay autofire still enabled). The enemies now behave according to their own little script (but those in the demo gets all the same script). I have not tested out the firing capabilities of the player yet, but I expect to do a few days after the weekend's over.

So... screenshots, eh? http://tinypic.com/view.php?pic=33nw4kj&s=4

If you're curious about the script I used for the enemy, just know that I had to make this whole language up. Any improvements to it can certainly be made, including condensing certain commands that normally go very well together. But... try to figure it out :)
Code: [Select]
Lv00En00:
 cd.const(r0,-1)
Lv00En00L0:
 cd.neg(r0)
 cd.const(r2,5)
Lv00En00L1:
 cd.const(r1,4)
 cd.pause(r1)
 cd.addy(r0)
 cd.djnz(r2,Lv00En00L1)
 cd.const(r2,5)
Lv00En00L2:
 cd.const(r1,4)
 cd.pause(r1)
 cd.addx(r0)
 cd.djnz(r2,Lv00En00L2)
 cd.neg(r0)
 cd.const(r2,5)
Lv00En00L3:
 cd.const(r1,4)
 cd.pause(r1)
 cd.addy(r0)
 cd.djnz(r2,Lv00En00L3)
 cd.const(r2,5)
Lv00En00L4:
 cd.const(r1,4)
 cd.pause(r1)
 cd.addx(r0)
 cd.djnz(r2,Lv00En00L4)
 
 cd.goto(Lv00En00L0)
Heh. Try to understand that :P
Title: Re: Yet another shooter
Post by: TIfanx1999 on November 07, 2008, 11:17:52 am
Photobucket is pretty decent as far as image and video hosting go, I've been using it for awhile now. Its pretty cool that that thing runs so fast with all the bullets on the screen.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 07, 2008, 06:40:26 pm
this is just getting better and better. it will be worth ticalc news for sure
Title: Re: Yet another shooter
Post by: Iambian on November 13, 2008, 12:21:49 am
I've got the enemies shooting around working, and I also got the strip of code that allows enemies to aim in your vicinity working. The result? Something that could end up being pretty freaking difficult if I were cruel enough to add in the circular bullet pattern so the aiming would require you to weave through it.

Why didn't I? Well... I wanted something easy enough to demonstrate what I wanted while not having to replay the thing a zillion tries to make it look 1337.

Next up: Boss and stage scripts.

Screen shot : http://i37.tinypic.com/2rxjjhx.gif

EDIT: Attached the binary to the post. Except it's more difficult since I was cruel enough to do what I said I wasn't. lol.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 13, 2008, 12:25:06 am
Getting better and better, keep up the good job Iambian.

Btw this image host doesn't work well in opera it seems, because the screenshot stops playing after 10 seconds and I have to save it on my PC to watch it until the end
Title: Re: Yet another shooter
Post by: tr1p1ea on November 13, 2008, 06:06:21 am
Super impressive Iambian! This is progressing very rapidly :).
Title: Re: Yet another shooter
Post by: TIfanx1999 on November 14, 2008, 11:58:17 pm
I have the same problem with the screenie, also running opera.
Title: Re: Yet another shooter
Post by: Iambian on November 20, 2008, 10:36:11 pm
The screenie explains it all.

http://i34.tinypic.com/2irvw53.jpg
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 20, 2008, 10:38:33 pm
at least this one won't stop in the middle like the other x.x, this is awesome iambian. I am amazed at how it still runs fast with that many bullets, considering Galaxian slowed down with like 20 ships at once
Title: Re: Yet another shooter
Post by: TIfanx1999 on November 20, 2008, 10:50:51 pm
Looks great, silky smooth too! Keep up the great work! =)
Title: Re: Yet another shooter
Post by: metagross111 on November 21, 2008, 01:23:20 am
im still a little confused about the gameplay, but it looks very nice. congrats.
Title: Re: Yet another shooter
Post by: Iambian on November 26, 2008, 01:08:53 am
See the screen shot: http://www.mediafire.com/imageview.php?quickkey=z1kxecklw4x&thumb=4

Download the game as it stands. (See attached file)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 26, 2008, 02:09:14 am
this is getting better and better. I'M glad to finally see a version released. I will try it whenever I get some time (along with Pokémon Stadium)
Title: Re: Yet another shooter
Post by: metagross111 on November 26, 2008, 10:40:42 am
yay! releases!
Title: Re: Yet another shooter
Post by: simplethinker on November 26, 2008, 12:37:37 pm
It looks great Iambian. ;D
Title: Re: Yet another shooter
Post by: metagross111 on November 26, 2008, 12:40:05 pm
its fast, and it looks all cool and arcadey.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 28, 2008, 12:54:28 am
btw I tried it and it was very smooth, but how do you survive more than 4 seconds? O.O
Title: Re: Yet another shooter
Post by: Iambian on November 28, 2008, 01:47:11 am
The secret is to move your ship so that your right two bullets are hitting but the leftmost one barely misses him. A hole in the tracking system allows you to do this, but only if you start the pattern on the left side of the rotating spiral.

... or just hold MODE down and press DEL to activate the bomb used to give you time to blow the enemy to smithereens.

The aforementioned hole is difficult to notice if you're not focusing (MODE key held).
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 28, 2008, 03:16:28 am
aah ok thanks I'll try that
Title: Re: Yet another shooter
Post by: fourchanb on December 01, 2008, 03:47:40 pm
Damn it, now I'm going to have to code my game again :O

Seriously, it looks great Iambian. Looks like it'd need just a bit more work on the sprites though ;)
Title: Re: Yet another shooter
Post by: metagross111 on December 01, 2008, 05:20:19 pm
eh, sprites are fine >_>
Title: Re: Yet another shooter
Post by: tr1p1ea on December 02, 2008, 02:41:23 am
Sensational Iambian!
Title: Re: Yet another shooter
Post by: Iambian on December 02, 2008, 03:06:33 pm
Well, that's it. I can actually foresee slamming face first into the 16KB memory limit for a 1 page application. I've just started working on the text system for the "story mode" in the game (where the story of the game is told in the dialogue between you and the boss of whatever level you're in) and I'm nearing 11KB.

Know that I have to have boss and enemy image and script data for about 6 to 8 stages, each boss having its own portrait sprite and image data for each of its spellcards that it can use. Then there's your own characters, which I plan on including 6 to 8, each with its own portrait and spellcard images, and their own code. Don't mention anything about backgrounds, which there will be 8+, one for each stage, and maybe one for each of the boss fights. THEN, there will be the actual dialogue between you and the boss, which will vary depending on what character you select for the "adventure."

Then, there's the issue of having an actual title screen, which this game completely lacks at this point. Cramming it all in the remaining 5K seems unrealistic, so... now I have to figure out how to distribute all this data across two or more pages and still have the routines that need to access it still readily available.

BUT... on the bright side, the beta demo version that will release prior to actually writing a coherent story for this will remain as a 1 page, 16K application. I just want to let you all know that this game *will* end up being a 32K or (if worst comes to worst) a 48K app when all is said and done.
Title: Re: Yet another shooter
Post by: metagross111 on December 02, 2008, 07:06:38 pm
well, its very impressive work so far. i know, i sound like a broken record.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 02, 2008, 11:30:10 pm
I don't mind if it reaches 48k personally. I don't care about space if the game is good :P
Title: Re: Yet another shooter
Post by: metagross111 on December 02, 2008, 11:47:06 pm
>_>

*owns a ti84+SE, does not care about space.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 02, 2008, 11:59:31 pm
well there are people  who owns one and actually does x.x. I don't really understand, though, because they have like 480K of archive (1.54 MB if they got the SE), they could fit 10 copies of Iambian's game or more when finished
Title: Re: Yet another shooter
Post by: Iambian on December 03, 2008, 06:44:14 pm
well there are people  who owns one and actually does x.x. I don't really understand, though, because they have like 480K of archive (1.54 MB if they got the SE), they could fit 10 copies of Iambian's game or more when finished

And they'll probably have about that many copies. The underlying system is flexible enough for me to release various "editions" of the game, each with its own bosses and story lines. I could conceivably pump out these games as part of a series. I've already got three story ideas...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 03, 2008, 07:54:45 pm
aah I see, I wonder if you will do a bundle of all the versions when all are finished if they are not in one game?
Title: Re: Yet another shooter
Post by: metagross111 on December 03, 2008, 09:52:24 pm
a series, interesting. though i would never store more than one at the same time
Title: Re: Yet another shooter
Post by: TIfanx1999 on December 05, 2008, 01:20:31 pm
And they'll probably have about that many copies. The underlying system is flexible enough for me to release various "editions" of the game, each with its own bosses and story lines. I could conceivably pump out these games as part of a series. I've already got three story ideas...
That's pretty sweet. It's nice that your engine is that flexible. Oh and about the space, I really wouldn't worry about it too much. With good games people don't mind commiting some space to them. :D
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 05, 2008, 03:58:51 pm
With good games people don't mind commiting some space to them. :D
Well I wouldn't say so, unless the trend has changed in the past year. Until 2005 people didn't mind about the space taken by games if they were good, but afteward it was a different story. You probably missed all the complaints and whining about how Reuben Quest 2 and Metroid II took way too much space on a 84+ x.x. THere were even people complaining about Desolate being too huge. I have no idea why people got so uptight about game file size in these years, considering many nearly worshipped authors of games like FFTOM and The Verdante Forest before

A few days ago I released my first game under 3 KB since 2002 and it can only hold 2 small dungeons and battles are limited to text except for 2 magic animations and it has 3 different attacks and barely any text. There are sacrifices to do if you want a game that is long (even in ASM) and has many features and personally I would rather prefer doing the later instead of downloading many small RPGs on ticalc.org that I can beat in 15 minutes or am unable to beat because the author made them ridiculously difficult to artificially increase the lenght.

I think today people are less crazy about file size though (altough maybe it's because my files are no longer on UTI/ticalc/calcg so they have less huge games to complain about), because they saw the shit on ticalc.org being uploaded every week or two. That's providing the games are well coded, though, because 50 KB of programs for a 4-room RPG (http://www.ticalc.org/archives/files/fileinfo/347/34784.html) isn't justified IMHO.
Title: Re: Yet another shooter
Post by: metagross111 on December 05, 2008, 05:31:58 pm
right. what he said. :)
Title: Re: Yet another shooter
Post by: fourchanb on December 05, 2008, 05:58:02 pm
Well, that's it. I can actually foresee slamming face first into the 16KB memory limit for a 1 page application. I've just started working on the text system for the "story mode" in the game (where the story of the game is told in the dialogue between you and the boss of whatever level you're in) and I'm nearing 11KB.

Know that I have to have boss and enemy image and script data for about 6 to 8 stages, each boss having its own portrait sprite and image data for each of its spellcards that it can use. Then there's your own characters, which I plan on including 6 to 8, each with its own portrait and spellcard images, and their own code. Don't mention anything about backgrounds, which there will be 8+, one for each stage, and maybe one for each of the boss fights. THEN, there will be the actual dialogue between you and the boss, which will vary depending on what character you select for the "adventure."

Then, there's the issue of having an actual title screen, which this game completely lacks at this point. Cramming it all in the remaining 5K seems unrealistic, so... now I have to figure out how to distribute all this data across two or more pages and still have the routines that need to access it still readily available.

BUT... on the bright side, the beta demo version that will release prior to actually writing a coherent story for this will remain as a 1 page, 16K application. I just want to let you all know that this game *will* end up being a 32K or (if worst comes to worst) a 48K app when all is said and done.
What kind of compression are you using? I'm getting pretty nice compression rates (~300 bytes for a fullscreen picture) for my pictures of loli's in this game. I'm using Vertical RLE. My game is 7.5K now, with the insane buffer and lots of loli's etc. Of course I'll be making a lot more code still, and it barely contains level data.
Title: Re: Yet another shooter
Post by: Iambian on December 06, 2008, 11:49:09 pm
At the moment, there is *no* compression being done on any of the images. With such stringent timing that I have to conform to, I can't even begin to think of how I'd be able to do it all real-time. I've basically chewed through all the saferam buffers I could use, and I don't want to force the user to require any free RAM just to use my huge application (save for some high score data). The engine itself probably weighs in at around 6KB so that isn't a fair thing to complain about shortage of data. Still, if what I have is a stage worth of data, things are going to be looking pretty bleak when I start adding in more information.

I'll get back when I have more accurate numbers to post up. Guaranteed, though, that this will be at least a 2 page application when done. Maybe compression, should I figure out how to squeeze more saferam out of the system, might keep the beast trimmed to a two page limit.

Though... now's not the time to start worrying too greatly. I'll just have to finish up with the rest of the engine and then add in a fully functional title screen
Title: Re: Yet another shooter
Post by: metagross111 on December 07, 2008, 08:52:39 am
all right. keep going IAMBIAN!!!
Title: Re: Yet another shooter
Post by: Iambian on December 11, 2008, 03:21:30 pm
Content not completed yet. Menu system working. Download and play the game to see. Difficulty menu links to the same old same old. I guess the title screen came before the fully functioning engine. Oh, well. That was the *easy* part anyway.
Controls: 2nd=shoot, MODE=pause, DEL=bomb, Y= ... to pause. Unavailable options will appear to do nothing. Haven't coded in a "back button" for the menus yet. Try not to pause-spam. I'll code in a mechanism in a few minutes that will penalize you for trying.

Request: A background to go on the title screen. Needs to go in the "gray buffer" behind the content.

Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 11, 2008, 04:45:41 pm
mhmm I think bullet collision detection is completly broken. When I shoot directly on the enemy sometimes he won't lose any HP and when I shoot away from him he loses HP. Also I think you should make the first level easier, because it took me several tries before being able to go through it without losing 2 lives. Some of the bullets are just impossible to avoid, or maybe it was because of the collision detection bug?
è
Otherwise, very nice job so far

I got a screenie there, but it's 13 MB huge
http://xlib.mtv-music-generator.com/cadan.gif
Title: Re: Yet another shooter
Post by: Iambian on December 11, 2008, 04:51:20 pm
The HP thing you noticed probably happened in the second "wave". When the timer runs out (you may not have noticed), the boss begins to lose life at a rapid rate.

I'll go ahead and upload an image of a good way to beat it whenever I get the time and place to do it. (My laptop's upload capability is busted somehow. It's Vista, I'm sure)

EDIT : http://www.mediafire.com/imageview.php?quickkey=1tt2aymak0m&thumb=5
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 12, 2008, 12:29:21 am
uhm how come you didnt died when touching these bullets at the beginning? I've been trying to avoid everything shot at me
Title: Re: Yet another shooter
Post by: Iambian on December 12, 2008, 10:13:34 am
Simply stated, my hitbox was never hit, even though it looked like major stuff was flying. It explains the effect I described much earlier on how to get around the first spell, albeit cheaply. Great stuff for people who plays SHMUPs way too much.

"Legend says there's a mountain called Hourai in the East, and there's a tree that grows danmaku there. Go forth, shmupers!"
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 12, 2008, 03:45:49 pm
ok, it must still require very accurate timing when moving around though x.x
Title: Re: Yet another shooter
Post by: metagross111 on December 12, 2008, 11:19:32 pm
mayhaps you could do some difficulty tweaking, maybe with the different modes.
Title: Re: Yet another shooter
Post by: Iambian on December 13, 2008, 10:21:24 pm
This screenshot is mostly cosmetic effects. You get an introduction phase to make the transition from menu to stage to boss much less jarring. You also get to see the difficulty setting when you pause the game, shown at the bottom-left corner. This is, of course, what I have for the demo level. I'll have something else for the official levels. Also, it looks WAY better on a real calculator. You'll just have to wait for the binary.

Linky: http://www.mediafire.com/imageview.php?quickkey=mztxej2hkyz&thumb=5

Todo: Write varying scripts for the stage/boss difficulty modes. Might not write all four, but maybe, just to see the memory impact of fully scripting a level.
Title: Re: Yet another shooter
Post by: simplethinker on December 13, 2008, 10:25:02 pm
It looks great ;D
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 13, 2008, 10:43:41 pm
I like that stage intro thing ^^
Title: Re: Yet another shooter
Post by: TIfanx1999 on December 13, 2008, 11:46:52 pm
Hey, that's some sexy lookin stuff! Rock on Iambian, rock on!
Title: Re: Yet another shooter
Post by: Iambian on December 16, 2008, 04:56:44 pm
A quick put-in before I start finalizing the demo. Space is closing in fast, with the application assembling to 14274 bytes. I intend on having at least two selectable players and some sort of difficulty setting. You won't get practice, results, nor settings, simply because I don't think I'll have the space for it. If I do get the space, I'll probably put in "results" insofar as much as a simple scoring between the characters and their respective difficulty level.

Wish me luck, as I close in the gap afforded by the 16K limit.
Title: Re: Yet another shooter
Post by: metagross111 on December 16, 2008, 05:32:32 pm
wish ya luck, iambian. btw, i decided to check out CelticII. any compatibility issues between that and xLib i may need to know?
Title: Re: Yet another shooter
Post by: simplethinker on December 16, 2008, 05:36:22 pm
Good luck Iambian!

wish ya luck, iambian. btw, i decided to check out CelticII. any compatibility issues between that and xLib i may need to know?
Do you mean CelticIII?  With xLIB and CelticII I haven't had any problems.  Plus, since with CelticII is a program and xLIB is an app I don't think there's much that would conflict.
Title: Re: Yet another shooter
Post by: kalan_vod on December 16, 2008, 06:20:13 pm
Good luck Iambian!

wish ya luck, iambian. btw, i decided to check out CelticII. any compatibility issues between that and xLib i may need to know?
Do you mean CelticIII?  With xLIB and CelticII I haven't had any problems.  Plus, since with CelticII is a program and xLIB is an app I don't think there's much that would conflict.

The type of program (app) has little to do with it, it is when a program/app uses the same hooks or memory locations that causes compatibility.
Title: Re: Yet another shooter
Post by: cjgone on December 16, 2008, 10:18:18 pm
Looks pretty cool imo.

Kinda confused why your ship is a puzzle frenzy block tho. :P
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 16, 2008, 11:00:57 pm
Yeah i always wondered that too x.x, same for the enemy ship . It is better than my two old ASCII shooters where enemies were Vs and my ship was a W tho XD, good old days
Title: Re: Yet another shooter
Post by: TIfanx1999 on December 16, 2008, 11:25:12 pm
Filler until he make the actual sprite i'd assume.
Title: Re: Yet another shooter
Post by: Iambian on December 17, 2008, 06:39:30 pm
...
Kinda confused why your ship is a puzzle frenzy block tho. :P
I actually sourced that one from one of my earlier games (port), "Fishy". The most recenter version included a cheat mode that made your sprite look like that, which I named "DevBlock", since I used it to test out a few things without ever having to worry about actually playing the game to encounter the problems.

Filler until he make the actual sprite i'd assume.
Actually... according to the first "storyline" I've planned out, that *is* an actual character.

New in the release presented here is the ability to choose between two characters. Really. Read the descriptions and you'll be enlightened as to how they should be played. The stats associated with them when you start the game will not actually be a reflection of how the characters will start the game when the full version is released, but it should give you somewhat of an idea. Further tweaks are needed, though.

A binary is attached to this post, which is the current state of the game. The demo version is about 90% complete at this stage.

The release after this one will finalize the demo version of the game with everything that I want in it in place. This will include varying difficulties for the Stage 0 stage, and a functioning "Results" menu so you can view your high scores, or more. The "or more" part will depend on how much space I have remaining after all is said and done.

EDIT: Edited the attachment to include a binary that I *know* is properly signed.
EDIT2: The MODE button on the calculator is the "go back" button on any of the menus. Try it out repetitively and tell me if you encounter any problems, if you want ...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 17, 2008, 07:09:30 pm
Great! I'll update my wabbitemu rom with this version and play when I get some time :)
Title: Re: Yet another shooter
Post by: metagross111 on December 18, 2008, 01:23:59 am
whoa! its awesome!
Title: Re: Yet another shooter
Post by: Iambian on December 22, 2008, 10:57:02 pm
Okay. Change of plans. I intend on using the little space I have left on a special final attack for the boss if you're fighting it on lunatic mode. By then, you'll have no bombs left, so you don't really stand a chance :P

When I run out of space, that's when I'll release it. Sorry I can't get everything worked in.

EDIT:
Screenshot : http://www.mediafire.com/imageview.php?quickkey=yzatyt12yqm&thumb=5

Nothing works. Just play it.
Title: Re: Yet another shooter
Post by: Iambian on December 25, 2008, 08:29:37 pm
Double post. See above post for edit.

While I may not make good on some of the promises (this isn't a final demo release, by the way. This is just a Christmas gift), I have been working on some optimization so I can feel comfortable adding in more stuff. So far, 200 bytes in the dev version (not seen) has been shaved off while revising the script system. More is expected.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 26, 2008, 01:03:37 am
Nice, I'll check this out too soon :)
Title: Re: Yet another shooter
Post by: Iambian on December 31, 2008, 09:26:55 pm
More optimizations has been made and I've added in another feature, which builds now to an even 15000 bytes total. More is to be expected, including an image for the title screen and image compression. Just as soon as I can figure out how the images are composed when they're decompressed using teh "Spiffy" decompressor found on ticalc, I'll start making heavier use of the routines.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on December 31, 2008, 11:42:19 pm
nice, what compressor are you using? (unless you mean it's called Spiffy, literally)
Title: Re: Yet another shooter
Post by: simplethinker on January 01, 2009, 12:05:08 am
It literally is Spiffy Compression (http://www.ticalc.org/archives/files/fileinfo/178/17865.html), and from his post on UTI I gather it's not working too well (well, the decompressing part doesn't work).
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 01, 2009, 01:24:32 am
aah ok, I hope he has luck with it x.x
Title: Re: Yet another shooter
Post by: JonimusPrime on January 05, 2009, 10:39:56 pm
Yeah me too this was looking really cool.
Title: Re: Yet another shooter
Post by: Iambian on January 06, 2009, 09:22:30 pm
Decompression has been fixed and development can continue forward as sorta planned. I know I'm gonna get some good mileage with the routine, as it lets me go ahead and compress even the more complex images. An additional image was added to the title screen, first as a demonstration of this, and ... well... just to see how the decompressing routine would meet my needs, and sure enough, it does. It's fast enough to do the job. Just a tweak and it's perfect.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 06, 2009, 10:58:03 pm
Was it definitively due to a bug with the decompressor on ticalc itself or just a mistake in your code? Glad progress still continues. :)
Title: Re: Yet another shooter
Post by: Madskillz on January 06, 2009, 11:44:40 pm
I'm glad to this looked like it was progressing pretty nicely I'm glad the hang up was found!
Title: Re: Yet another shooter
Post by: kalan_vod on January 07, 2009, 05:25:54 pm
Glad someones work could contribute to this amazing game ;)
Title: Re: Yet another shooter
Post by: Iambian on January 07, 2009, 10:42:59 pm
The compressor did not have a bug, per se. The compressor required that the compressed image be in RAM since it needs to modify the original compressed image to perform compression. Someone on UTI's forum provided me with changes that would let me decompress from Flash. It's no fault to the author himself, since it was originally written to work only on an 82, which had no Flash. So... I just tried to make it work outside of its scope.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 08, 2009, 12:15:31 am
aah I see now, I hope to see more progress now :)
Title: Re: Yet another shooter
Post by: Iambian on January 15, 2009, 03:36:25 pm
The demo version of the app has now officially run out of space. The differences, other than one crippling bugfix, should you choose a pacifist style, which has been fixed, include a nonspecific background for the title screen, a screen for the n00bs should you choose "Easy", and a simple story only visible should you choose "Easy". Might tweak one or two things before I post a release.

After this, I'll be working on converting it to a two-page application. Then, I'll be adding in content. I've already got something concrete from someone at my college, so I'll be going for that one. Generic storyline, but it'll be good. Just trying to see how epic the system can get.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 15, 2009, 10:52:28 pm
At least I'm happy maxed out space doesn't mean cancelled project after demo release x.x, two page app sounds good afterward.
Title: Re: Yet another shooter
Post by: Madskillz on January 16, 2009, 12:34:11 pm
wow this must be a feature packed game. Can't wait to try the demo keep us posted!
Title: Re: Yet another shooter
Post by: Iambian on January 21, 2009, 03:01:20 pm
Try it.

If no problems are found, this will be the version that is to be released to ticalc.org. A screenshot will be attached to the one being sent to ticalc.org, but not here since the computer I'm using won't allow uploading of large files, for some inexplicable reason.

EDIT: Removed attachment in favor of more recent posting.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 21, 2009, 03:45:02 pm
tried it and awesome, but to be honest Idk if I'll even bother trying to beat the game, because it's ridiculously hard. You need to tone down the amount of bullets in easy mode. I don't even see any difference between both lunatic and easy mode so much it is hard. Make sure the space between each enemy bullets is as large as your ship. SOmetimes the enemy bullets patterns gets you trapped and you can't even avoid getting hit
Title: Re: Yet another shooter
Post by: Iambian on January 21, 2009, 04:03:39 pm
I guess you're right about the difference not being shown in the stage portion. In fact, there was literally no difference, save for just the boss. This post has been edited to reflect that, and the previous post's attachment removed to promote this version. Getting to the boss in "Easy" will be easier.

Also, note that in this version (and the one that was promptly removed), spellcard bonuses are implicitly supported (don't get hit or use bombs and you'll receive it). In addition to that, you get a "continue" screen but not yet an official game over screen. There *is* an ending if I haven't already mentioned it, but it is the same no matter which mode you choose. It just thanks you for playing the demo. Couldn't put in any other information since I ran out of space AFTER I optimized the crap out of the space-eating runs. There's actually one more run I can go ahead and optimize but it'll save me a whopping 20 (or so) bytes if I undertake that task. Might just do it since I want the thing to be as lean as possible whenever I actually get to the 2 page app conversion.

I also believe that for the real story, I'll be pucrunch-ing the data so it'll fit nicer. If I can, I might just move from Spiffy to pucrunch totally. "If I can" being if I can work around with a load of data manipulations to prepare the result for insertion, and if I get significantly better results using pucrunch.

EDIT2: Starting to reminisce now. When I look at the screenshots of the previous iterations of the game, the engine seemed to run significantly faster than this version. Understandably, since the game now has most everything it needs, but it still bugs me.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 21, 2009, 04:41:55 pm
oooh nicer now, I was starting to be frustrated to lose all my lives before the test mode convo appeared then only have one left for the rest of the game. For some reasons this level was so much harder than the two next ones x.x. I at least managed to get to lv 3 (I think) this time :P
Title: Re: Yet another shooter
Post by: Iambian on January 21, 2009, 04:55:45 pm
Keeps in mind that you *do* have a continue should you lose all your lives. Helps make sure you get to the end. Ought to have some sort of penalty for using such, like a loss of score and the inability to (in future iterations) to record a replay.

In the future, you'll also be able to select the number of lives you can start the game out with, but a scoring penalty if you choose more than you should.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 21, 2009, 04:58:01 pm
yeah I know, it tells me if i want to continue and gives me a few more lives
Title: Re: Yet another shooter
Post by: kalan_vod on January 21, 2009, 08:21:04 pm
This is moving real fast, and I would love this even if it was 2-10 pages...Imagine Phoenix with a storyline, or fire track...I love the direction this is heading (like R-Type for PS2).
Title: Re: Yet another shooter
Post by: TIfanx1999 on January 21, 2009, 09:52:33 pm
So far looks really good. I played it on my TI-83+ and my TI-83+ SE and I came across no problems. I beat the demo on easy, and then tried and beat it on lunatic on a whim. Lunatic doesnt seem that maniacal really...
Title: Re: Yet another shooter
Post by: simplethinker on January 22, 2009, 12:40:56 am
So far looks really good. I played it on my TI-83+ and my TI-83+ SE and I came across no problems. I beat the demo on easy, and then tried and beat it on lunatic on a whim. Lunatic doesnt seem that maniacal really...
Try without using any bombs :P  That way you can't stay in the same place and just hold 2nd :)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 22, 2009, 01:04:42 am
ooh yeah bombs, I should have abused them more maybe x.x (used around 1 or 2 at max half of the time, and other times none), but i still found lv 1 to be much harder than the others (at least before the "test mode" blabbing
Title: Re: Yet another shooter
Post by: Iambian on January 23, 2009, 12:33:35 am
This is the version that has been uploaded to ticalc's archives (which will appear in a few days, probably).

Difficulty has been tweaked to weaken the bombs (they last 4 seconds from start to finish), and the bomb count has also been dropped by 1. Auto-fire has also been weakened to a 1 game-cycle delay as opposed to a 0 game-cycle delay (which effectively cuts your fire rate in half). Netham45 has a 2 game-cycle delay. Also, you aren't given the extended grace period that you had between the time you start exploding and the time you actually use that life. It's been strictly restrained to the "border". The border itself has been shortened by one game cycle (which isn't a lot) for the DevBlock and increased by 2 or 3 for Netham45.

It now takes skill to beat the demo on the higher levels. Carelessness will lead to a game over, even on easy mode.

EDIT: A screenshot that has been circulating around the #Omnimaga channel, which depicts two iterations before this one - http://www.mediafire.com/imageview.php?quickkey=iz4zt5gmdmm&thumb=4
Title: Re: Yet another shooter
Post by: noahbaby94 on January 23, 2009, 09:32:15 am
Man the new team is fast.
http://www.ticalc.org/archives/files/fileinfo/416/41600.html
Title: Re: Yet another shooter
Post by: kalan_vod on January 23, 2009, 12:41:55 pm
I smell a feature...
Title: Re: Yet another shooter
Post by: noahbaby94 on January 23, 2009, 01:21:13 pm
I smell a feature...
Really because I smell bacon.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 23, 2009, 06:32:35 pm
I think Iambian will need to get rid of the word "Demo" in his title to get a feature though, because from what I remember ticalc.org no longer feature programs that are not finished :(
Title: Re: Yet another shooter
Post by: kalan_vod on January 23, 2009, 06:48:04 pm
I think Iambian will need to get rid of the word "Demo" in his title to get a feature though, because from what I remember ticalc.org no longer feature programs that are not finished :(
True, but I remember that 2003 Joes Phatom star did (might have been the last one)

Phatom Star (http://www.ticalc.org/archives/files/fileinfo/260/26096.html)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 23, 2009, 07:05:18 pm
I think Iambian will need to get rid of the word "Demo" in his title to get a feature though, because from what I remember ticalc.org no longer feature programs that are not finished :(
True, but I remember that 2003 Joes Phatom star did (might have been the last one)

Phatom Star (http://www.ticalc.org/archives/files/fileinfo/260/26096.html)
wel ticalc only recently started doing otherwise, like, a year after Wizards came out
Title: Re: Yet another shooter
Post by: TIfanx1999 on January 23, 2009, 11:43:35 pm
Doesnt matter anyhow, Im sure the full version will get featured. =)
Title: Re: Yet another shooter
Post by: Iambian on January 24, 2009, 12:42:59 am
So, did the tweak make it hard enough for you?
Title: Re: Yet another shooter
Post by: TIfanx1999 on January 24, 2009, 01:02:09 pm
Yes, better.=) How many continues are you going to be given in the final version? Will you be able to earn more continues or lives after getting certain score benchmarks?
*edit* What's the deal with the netham45 ship? It's HORRIBLE and you can't even move without focusing.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 24, 2009, 04:02:43 pm
lol I laughed when I saw it, but we all knew it on IRC because he was planning this for a while, I didn't remember that I couldn't move unless I press MODE though :P
Title: Re: Yet another shooter
Post by: Iambian on January 25, 2009, 12:12:59 am
Continues : You'll be given an additional continue per stage encountered, so by the 6th stage, you'll have 6 continues should you happen to spend them all there. With the upcoming shop system, you might be able to BUY yourself another continue, but that's planned to be the highest-priced item. Ought to spend that money buying yourself better weapons, though. You'll NEED them.

*edit along this item* : The "extra" stage that's planned will NOT allow continues, but you'll be given an extra life to compensate... and more powerful weapons that you already worked so hard to obtain (or might not have. More power to you if you didn't need them).

About Netham45: It's a joke character. He's gonna be one of those reoccurring character throughout the planned series that's just there for comedic effect. Of course it's gonna be hard to control him. Just imagine if I had put an uneven number for his char_dxf and char_dyf variables...
Title: Re: Yet another shooter
Post by: TIfanx1999 on January 25, 2009, 12:50:37 am
That's kind of what I figured, lol. I glad there's going to be a shop system with upgrades, that should help out alot as I'm sure the difficulty will get skewed as the levels progress. I'm sure I'll need those continues too. ^_^
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 25, 2009, 03:20:12 am
i like the shop idea ^^
Title: Re: Yet another shooter
Post by: yoman82 on January 25, 2009, 10:18:09 am
This game is EXCELLENT. I can't wait for the next version. Are there going to be any more characters?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 25, 2009, 10:58:48 am
Hi yoman82 and welcome :)

I think he's planning to add a few more characters using nicknames from people in #omnimaga IRC, but I'M unsure who besides me
Title: Re: Yet another shooter
Post by: kalan_vod on January 25, 2009, 01:19:39 pm
A rickroll character maybe?? haha
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 25, 2009, 04:25:59 pm
he could always use the background image i posted in his request in the sprie forum :P
Title: Re: Yet another shooter
Post by: Iambian on January 28, 2009, 02:09:32 pm
One bugfix: If you press MODE when faced with the option to "Challenge Again?", the calculator will crash. Creds to "Adam" from teh college's math lab for finding this bug. Fixed in five minutes. Post delay: 2 days.

On another vein: The conversion process is nearly completed as far as doing it roughly. After I get it to actually compile, I'll start modding the existing system to best utilize the appvar storage space for work RAM.

Why it won't compile? "tasm: cannot realloc for macro definition"
What's it mean? Ain't got a clue. TASM's manual and Google has both failed me.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on January 28, 2009, 06:15:10 pm
wow didn't even notice that one x.x. At least since the game is a flash app it's not deleted during the following RAM clear though :)

And TASM sometimes gives weird errors like this x.x. Did you tried Spasm from Revsoft.org? It's kinda an alternative to TASM IIRC
Title: Re: Yet another shooter
Post by: JonimusPrime on January 29, 2009, 07:50:59 am
Yeah Spasm should compile it with little to no modification and with larger apps it is much faster.
Title: Re: Yet another shooter
Post by: Iambian on February 09, 2009, 03:14:40 pm
Small updates. Though it hasn't show signs of compiling just yet, the system's been reworked (again) to fit the 2 page environment. Discussions last week told me that I needed to redo the entire script system so I'll have more on that later on.

When I work all of it out, I'll show the same old stuff resting on the two pages. Might continue working on the demo content until I can get a good enough system down for it all. It's gonna be a LOT of data entry when I get it all situated...

The FlashAPP might even go to 3 pages, but that's pretty much gonna be the limit if I were to go that route. The script system overhaul was mentioned because it was indicative of how much space the script's actually taking up. 16k dedicated space for just the scripts AS-IS wouldn't be enough.
Title: Re: Yet another shooter
Post by: kalan_vod on February 09, 2009, 06:24:01 pm
Wow, this will still be a popular game! I can't wait to see the new system in action!
Title: Re: Yet another shooter
Post by: Iambian on February 19, 2009, 08:40:38 pm
The crossover between the 1 page and the 2 page app environment has now been mostly successful. The backgrounds won't be reimplemented until I get the new script system drafted and programmed in, but the underlying system is already in place.

Save for two things, the game now runs as though it has never been changed. (three if you include the extra room by both the 2nd page and addition of compressed everything else)
Title: Re: Yet another shooter
Post by: metagross111 on February 19, 2009, 10:40:33 pm
ooh! IAMBIAN! did you check out my little identity(4 tutorial for possible discrepancies?
Title: Re: Yet another shooter
Post by: Galandros on February 20, 2009, 02:35:02 pm
I almost forgot about this project. Nice to see advance. I have some friends who would be delighted with a freakin' shooter like this.
Phoenix isn't enough for them.
Title: Re: Yet another shooter
Post by: Iambian on March 11, 2009, 09:13:37 pm
A bit of time has passed since I've said anything... so.

A separate spellcard background has been implemented. The script system is still under development, but as soon as I get all the bugs out, I'll be rewriting the demo level using the new code, and begin working on what story I should tell.

Also, be on the lookout for a new topic related to the game.
Title: Re: Yet another shooter
Post by: simplethinker on March 11, 2009, 09:20:51 pm
Nice ;D  So the new demo will have a bit of the story?

Quote
Also, be on the lookout for a new topic related to the game.
Why? 11 pages isn't that much to sort through :D
Title: Re: Yet another shooter
Post by: noahbaby94 on March 11, 2009, 09:25:13 pm
/me is happy
Title: Re: Yet another shooter
Post by: Iambian on March 11, 2009, 10:10:14 pm
Nice ;D  So the new demo will have a bit of the story?

Quote
Also, be on the lookout for a new topic related to the game.
Why? 11 pages isn't that much to sort through :D

There will be a bit of story in the next release, but...

The new topics will be for both entering new characters into the game, and for story suggestions. I'd like to keep that material in its own topic so that I have less to sift through when I go back and start adding in material.

So, yes. 11 pages *is* too much for me to sift through. I think...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 11, 2009, 11:46:44 pm
Maybe I could have sub forums under this project section...
Title: Re: Yet another shooter
Post by: Iambian on March 16, 2009, 09:59:46 pm
Well, so much for "soon".

Anyway. The script system can basically do just about anything the old one can do, except that the more common commands now take up a little less memory. I'm in the middle of implementing a command that'll allow enemies to initiate shots from positions other than the center of themselves.

The standard shot has been given an "offset" that was previously used to find the center of the boss will be used for the purpose above. A command was added in (but is still being tested) that will change that offset to a point on a virtual circle around the enemy given a degree (in a virtual register) and a constant radius, though I may have another variation that will also have a variable radius. I plan on using that command to weave some nice looking patterns without the use of "helper" objects that the boss (in this instance) can summon.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 16, 2009, 11:28:57 pm
Interesting, can't wait for more screenshots :)

Game size-wise, what's the current planned size so far?
Title: Re: Yet another shooter
Post by: simplethinker on March 17, 2009, 08:47:12 am
Game size-wise, what's the current planned size so far?
I think two flash pages, so ~32kB.
Title: Re: Yet another shooter
Post by: Iambian on March 23, 2009, 08:37:37 pm
A much neglected and never seen problem was fixed in CaDan : Right and left side sprite clipping. They've been fixed.

Next for a fully functional demo level with enemies flying every which way and a somewhat working scoring system. After that, I'll release a demo and tell me what you think.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 23, 2009, 09:11:37 pm
Cool, I can't wait to try it :)
Title: Re: Yet another shooter
Post by: kalan_vod on March 24, 2009, 01:10:11 am
Sounds good, are you going to release the demo to ticalc?
Title: Re: Yet another shooter
Post by: Iambian on April 21, 2009, 05:56:36 pm
Didn't check whether or not I said it here, but I may have been jumping the gun when I said that "Replay" would be a standard game option. The way I see it, if it were to work out that way, the game would have some insane system requirements.

If I had it my way, 32 or 48KB of FlashROM would be for my game. ALL YOUR RAM would be needed to keep track of replays, high scores, and the temp file. Currently, the calculated number sits at a cozy 22520 bytes of RAM needed to accommodate all of what I want to keep track of.

Cutting the "Replay" option would remove only 9000 bytes from this calculation. I'll need to recalculate the memory requirements as I find out what I need to do to keep track of the scoring file.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 21, 2009, 06:10:39 pm
mhmm
I wonder if there is a way to rename APPVars? Such program could be useful if for example I wanted to keep multiple replays in my calc archive to watch later
Title: Re: Yet another shooter
Post by: calc84maniac on April 21, 2009, 06:18:57 pm
mhmm
I wonder if there is a way to rename APPVars? Such program could be useful if for example I wanted to keep multiple replays in my calc archive to watch later
I remember putting Bubble Bobble's appvar into a group a long time ago so I could essentially have a loadable save state. :P (Last boss battle was epically hard.)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 21, 2009, 06:20:48 pm
oh wait, i forgot they are groupable x.x, that works, too
Title: Re: Yet another shooter
Post by: Iambian on April 21, 2009, 11:38:54 pm
The replay files are huge. The game will swap in and out of FlashROM numbered replay files. Know that a single stage will have up to 9000 bytes for its replay. After each stage, the game asks if you want to save the replay of this stage. If you do, the game sets itself up to stash away the replay file and create another to continue recording. While the replay files are numbered, embedded in it is "who" the player is and at which stage the replay file is for, which is what the game will be reading as you go back to view the replays.

Now... will it get annoying to the player if they're asked whether or not you want the replay to be saved? Keep in mind that the replay ability stops the moment you have to use a "continue" in a run, as was in the original game...
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 22, 2009, 12:33:25 am
aah ok I see, thanks for clarifying up
Title: Re: Yet another shooter
Post by: Iambian on April 22, 2009, 10:30:45 pm
Had forgotten to reset the environment while I was spending time developing. The new script engine shows some of its power in the screenshot linked to below this paragraph. Had to turn collision detection for yourself off to demonstrate this.

http://www.mediafire.com/imageview.php?quickkey=kz5z2itz0zy&thumb=4
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 22, 2009, 11:40:46 pm
darn so many stuff moving around and still running so fast. Great job Iambian :)
Title: Re: Yet another shooter
Post by: kalan_vod on April 23, 2009, 01:50:57 pm
Really amazing work Iambian!
Title: Re: Yet another shooter
Post by: simplethinker on April 24, 2009, 03:35:23 pm
Wow, that looks incredible Iambian :D
Title: Re: Yet another shooter
Post by: Iambian on April 28, 2009, 09:00:45 pm
On the topic related to the image, I managed to get the arctan function (the stuff responsible for aiming) to be scary-precise, well within the 127 degrees of freedom allowed by my system. The only problem is the accuracy: It seems to be generally off to such that it seems to be aiming at the top-left corner of your character sprite. Given some time, I'll probably have a fix, and a screenshot ready to show it off. Until then. Later.

EDIT: Also noticed that the incorrect angle seems to pop up at semirandom intervals (mostly along the axis) at certain extremes. I'll have to explore what the problem might be, but I believe it might relate to incorrect values being added from the table in the approximation stage of the algorithm.
Title: Re: Yet another shooter
Post by: Iambian on April 29, 2009, 01:27:25 am
Double-post.

A follow up on what I last said. I resolved pretty much all the issues and now the accuracy/precision thing is golden. See in this less-crazy screenshot: http://flickcabin.com/public/view/28862
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 29, 2009, 03:09:04 am
dark this is so epic, awesome work as always. I wonder if you should post videos of it on youtube, like Calc84maniac did with Mario and the emu?
Title: Re: Yet another shooter
Post by: trevmeister66 on April 29, 2009, 10:49:54 am
Wow..that is amazing. Nice work.
Title: Re: Yet another shooter
Post by: kalan_vod on April 29, 2009, 04:41:42 pm
Convert this to a GB cartage...NOW! Amazing bullet effect!
Title: Re: Yet another shooter
Post by: Iambian on May 15, 2009, 11:08:33 pm
Sorta same old effect, except that I got the line routine to work now with a few additional tricks.

http://www.mediafire.com/imageview.php?quickkey=nvgzjgxhhem&thumb=4
Title: Re: Yet another shooter
Post by: DJ Omnimaga on May 15, 2009, 11:11:51 pm
I love that square rotating effect ^^
Title: Re: Yet another shooter
Post by: Eeems on May 16, 2009, 12:52:06 pm
wow, that's pretty awesome
Title: Re: Yet another shooter
Post by: Galandros on May 27, 2009, 09:24:04 am
Sorta same old effect, except that I got the line routine to work now with a few additional tricks.

http://www.mediafire.com/imageview.php?quickkey=nvgzjgxhhem&thumb=4
This is an eye candy or a shooter game?
Title: Re: Yet another shooter
Post by: Iambian on May 27, 2009, 10:25:17 pm
At the moment, it's more eye-candy than anything else. The collision detection *can* be thrown back in but I doubt you'd survive that. The purpose of the screenshot was to demonstrate the newly-created line drawing routine. I want to gather comments about it so I may either have to revise it, or include it into the normal game AS-IS.

The story system got a slight reworking and the stage system is next. Once the stages are done, a scoring system can be put in place. And after that, content may be added.
Title: Re: Yet another shooter
Post by: Galandros on May 31, 2009, 10:20:09 am
I am thinking in the story...
So game is simply stages, battle some ships them you have a boss, basically.

It is need to write text between the boss and the player... Is possible to present text any time in the stage? My idea is to appear some text as difficulty in the stage increases, when you have to face new waves of enemies, introductory talk to the boss and the attacks of the boss turn out more epic.

I watched some DanMaku videos on Youtube, it is intense.
Title: Re: Yet another shooter
Post by: {AP} on November 04, 2009, 03:49:03 pm
I've been playing your demo a lot this week.
I've beaten Easy and Medium.
Best is only losing 2 lives on Easy and using the continue but no other lives on Medium. (both with DevBlock, I die a lot more with Netham45 for some reason)
I found out that the boss has some 'blindspots' on Easy that don't exist in the other modes.

Also, I got pretty far in Hard (second from last stage of the boss) but only to the 3rd from last on Insane.

Anyway, thanks for the demo. I'd be bored to death in pre-calculus without it. =P
Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 04, 2009, 03:57:19 pm
I think the Netham45 char was kinda a joke, I think it won't even move at all or only move when doing something in particular (I haven't played in a while) XD

I personally epic fail at this game. It's incredibly hard to go between bullets guessing the exact pixel where i must stand to avoid them x.x
Title: Re: Yet another shooter
Post by: {AP} on November 05, 2009, 08:38:35 pm
Well, another class went by and my skillz grew!

Beat Easy - No lives lost
Beat Medium - Last life before continue
Beat Hard - Last life after continue

I'd record it... but I don't think I could make repeat performances on wabbitemu. =/
Title: Re: Yet another shooter
Post by: Iambian on November 05, 2009, 09:11:32 pm
That's pretty cool. I assume you're using the DevBlock for the character? If you're using Netham45, that would be a pretty impressive feat.

I'm glad people are getting some entertainment value out of the CaDan demo :)

EDIT: I would find it a little easier, since I'm the guy that made all these crazy patterns... but yeah. Beating the game on Lunatic mode using Netham45 gave ME a run for my money. So I'd love to hear stories about how you used that joke character in some serious run
Title: Re: Yet another shooter
Post by: {AP} on November 05, 2009, 09:15:59 pm
Yeah, DevBlock.
I've beaten Easy and Medium as Netham45 but barely each time.
Hard is near impossible thanks to the bosses' "octopus" form (as I like to call it, you know... the one where he flails bullets awkwardly around the screen?) which I only beat (without losing a life) by timing him out and Netham is too slow to dodge with easily.

Insane is... well... insane. I've not been able to beat it but I've gotten pretty far.

Title: Re: Yet another shooter
Post by: DJ Omnimaga on November 06, 2009, 01:44:54 am
People should recommend this game at school. Even as demo it's nearly POTY-worthy, maybe even feature-worthy.

As for emu, had WabbitEmu featured a quick-save key instead of just "Save as" with no keyboard shortcut, you could have done some sort of TAS and it would have been easy to record. I wish emulators also had speed settings, not just no speed restriction and regular speed :P
Title: Re: Yet another shooter
Post by: Gale on March 14, 2010, 09:17:00 pm
that is an amazing game. i am terrible at it xD, but it's still amazing nevertheless. i'm telling all my friends :D
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 14, 2010, 09:25:27 pm
Mhmm necroposting, but very well justified :P

I am curious if Iambian is planning to resume work on this after finishing E:SoR or if he'll first finish fixing Celtic III. Both sure deserves a feature on ticalc wheen finished and released there.
Title: Re: Yet another shooter
Post by: Gale on March 14, 2010, 09:31:27 pm
oh, i didn't realize how old this topic was xD sorry :P

but yeah, this project definitely deserves more work. it's amazing now. i've never really seen any good shooters besides this.

can you get grayscale in basic progs?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 14, 2010, 09:39:04 pm
Oh no problem, since the project is still alive actually ^^

As for shooters there are good ones like Phoenix and Galaxian, but they are really simple compared to CaDan, but remember back in 2000 galaxian and phoenix were the best 83+ games out there :P Now CaDan takes calc shoot-em-ups to a whole new level

As for basic grayscale you need to use xLIB or Celtic III. You can also use Omnicalc Sprite( function but it's much slower. I would recommend against grayscale if you haven't mastered all rudimentary TI-BASIC tricks and commands, though, because it can be complicated. It took me 3 years after starting calc programming to release a BASIC grayscale game. Otherwise, if you feel like giving it a try, there are some different tutorials in the downloads section. I would recommend Nitacku's grayscale utility and checking some guides there.
Title: Re: Yet another shooter
Post by: Gale on March 14, 2010, 09:43:29 pm
ahh okay. yeah, i started programming like 6 months ago, so i only have a small arsenal of commands i'm really confident with.

i have xLIB installed on my calc, but i'm not really sure how to use it xD what is it used for?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 14, 2010, 09:49:17 pm
it's one of these apps that adds new commands to the TI-BASIC language. It requires mastering most TI-BASIC rudimentary tricks before usage, though, since it can be a bit hard for beginners/intermediate coders. Basically you can make a BASIC game look like an ASM or Axe Parser one, just with the slow speed of TI-BASIC.

You need to read the readme for more information and keep a copy nearby when coding because I myself always had to open it since I was never able to remember most commands syntaxes x.x
Title: Re: Yet another shooter
Post by: Gale on March 14, 2010, 09:53:32 pm
yeah, my computer wont let me load files from this site for some reason, so i can't use axe, but i dont think i'm ready for it anyway.  and yeah, i'm printing out the readme now :P
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 14, 2010, 09:54:57 pm
it might be your internet browser settings or you might have messed something up on your computer x.x

What browser are you using? Because I never heard of this problem before. Could you tell in more details what error do you get and if right-click and save as works?
Title: Re: Yet another shooter
Post by: Gale on March 15, 2010, 07:03:43 pm
i'm using firefox. and i think it's just my computer's security settings acting up or something. but i can still install progs off of the TI homepage, which is odd. are there copies of axe anywhere besides here?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 15, 2010, 08:34:10 pm
Strange, and unfortunately, nope x.x

Are you running as administrator?

If so, you might have to ask on a computer forum about your Windows version, or ask here in the general discussion. A bunch of people could maybe be able to awnser

Or maybe try in IE or Opera just as a test?
Title: Re: Yet another shooter
Post by: Gale on March 15, 2010, 08:41:44 pm
nevermind, i just edited my settings and i successfully got axe :P just realising how amazing axe is right now
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 15, 2010, 08:50:11 pm
cool to hear :)

Btw what was your problem? It might be worthy to know if this ever happened to someone else here (altough maybe it won't since it's the first time I hear about it x.x, but again, on my old computer, I have trouble downloading mods from SMF website. They turn in mp3 files instead of zips), altough it might be a bit offtopic x.x
Title: Re: Yet another shooter
Post by: Gale on March 15, 2010, 08:54:38 pm
xD THAT is weird. but yeah, it was just my computer's security settings acting up. my dad is virus-paranoid (the reason we switched from windows-xp to Ubuntu), and only allowed downloading of files from TIcalc.org. so i went into cmd and changed the settings to allow this site too.

don't worry, there's like a 1 in 1000000 chance that someone else will have the same thing happen
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 15, 2010, 09:48:46 pm
Ouch x.x, I remember some ppl were like that, except the difference is that they thought Firefox/Linux were viruses too or that they were dangerous to get any, and despite explaining them they would remain stubborn. x.x

Anyway glad it's fixed now ^^
Title: Re: Yet another shooter
Post by: Builderboy on March 15, 2010, 10:06:20 pm
Haha, thats nothing.  I just had somebody comment on one of my java games protesting that he would not download the source because Java was a virus ;D It could erase the C folder :O
Title: Re: Yet another shooter
Post by: DJ Omnimaga on March 15, 2010, 10:13:17 pm
lol x.x
Title: Re: Yet another shooter
Post by: program4 on July 20, 2010, 05:15:57 pm
I really love this game. Actually, Netham45 was easier: just use the bombs when you are close to death, so I beat Netham45 in hard but only medium with DevBlock.

When are you going to continue this project?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on July 20, 2010, 05:25:40 pm
Wow congrats o.O

At easy I die in less than a minute x.x

I think this is on hold, though, until iambian finishes Escheron: Shadow Over Rangaroth
Title: Re: Yet another shooter
Post by: JustCause on August 24, 2010, 11:31:09 am
Yes! Beat Lunatic with both Netham and DevBlock. Congrats on making a game that I have poured 20+ hours of my life into.
Title: Re: Yet another shooter
Post by: Raylin on August 24, 2010, 12:46:47 pm
Could we get an update on this?
Or an asset release?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on August 24, 2010, 04:31:22 pm
I think it is on hold until E:SoR is completly finished. Geekboy1011 was working on a new level, though, but he has limited Internet access at home and a very old computer so he can barely access Omnimaga.
Title: Re: Yet another shooter
Post by: Geekboy1011 on September 05, 2010, 01:21:35 pm
yeah im slowly working on a level thing is teh new scripting engine isnt done yet so i cant make a full level yet i believe
as for the demo that is out now it has no room left its pushed to like having 2 bytes to spare or something so not much editing can be doe on that :/
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 05, 2010, 01:30:41 pm
Aw sorry to hear, I hope you can have a way to continue soon :(
Title: Re: Yet another shooter
Post by: Geekboy1011 on September 05, 2010, 02:35:04 pm
well i can progress im not sure if the txt routines are done though  care to share iambian? ^_^
 if they are i can just do a boss level where you fight different bosses so yeah ^_^
Title: Re: Yet another shooter
Post by: Iambian on April 08, 2011, 11:48:52 pm
This project is being restarted.

Reasons:
(1) Major pain in the arse to modify assets
(2) Too many bugs in the script system
(3) Compiles using TASM. 'nuff said.
Title: Re: Yet another shooter
Post by: ztrumpet on April 08, 2011, 11:51:35 pm
* ZTrumpet runs in circles happily while handing out cherries to Iambian! O0
Title: Re: Yet another shooter
Post by: Geekboy1011 on April 08, 2011, 11:53:07 pm
Yay I'm thinking a new thread might be in order though as If I'm not mistaken a bunch of things might be changing
Title: Re: Yet another shooter
Post by: Iambian on April 09, 2011, 12:11:38 am
Hehe. I'll be making a new thread once I actually get code down on the new CaDan. For this edition, I'll be using SPASM to perform the compile job, since I've fallen in love with it after beginning the E:SoR reboot.

It'll be tough to keep this up and still have to deal with two jobs, but I'm sure I'll be able to get something going.
Title: Re: Yet another shooter
Post by: Eeems on April 09, 2011, 12:21:27 am
I ♥ SPASM :)
good luck with the re-write!
Title: Re: Yet another shooter
Post by: TIfanx1999 on April 09, 2011, 12:27:32 am
I saw this in the E:SoR thread. Looking forward to your work as always. =)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on April 29, 2011, 07:46:01 pm
I'M glad to see this restarted. Do you think the grayscale will be improved a bit? I remember you saw some sort of grid while playing.
Title: Re: Yet another shooter
Post by: Iambian on April 30, 2011, 09:54:16 pm
I don't believe the grayscale problems will be fixed. I want to focus more on the actual gameplay, which I think is a bit more important.

If I can somehow find a way to fix it, though, I'll do just that.

EDIT: Working on the base code. Might have something that won't crash later "tonight" (May 3, 2011)
Title: Re: Yet another shooter
Post by: Iambian on May 06, 2011, 11:19:24 am
Double: Update (small)

The app now starts up and I've begun working on the large font renderer. This renderer supports variable-width fonts with a slightly variable spacing between letters, which serve to help make the text look more "natural". Example: The 'o' character can be bumped two additional pixels to the left if the previous character was a 'T', or an 'f' can be bumped one pixel to the left if the preceding character is an 'L'. I try to account for every possible combination, even though such combinations won't ever appear in English. Or any other possible language for that matter.

The font routines do not support international characters. The design kept me from adding those in. Perhaps a later version will that be possibly added in.

After that is done (there are still a few bugs left in it), I'll be able to get some graphics going and make a halfway decent menu system that's similar, if not identical, in appearance and functionality to the previous iteration of CaDan. It won't be the same, since the rendering method is far too different.

Of course, actually *using* a font renderer will make the menus appear a bit slower between screens. I can cut out the time by prebuffering every possible menu before trying to display them. The game engine uses a disproportionate amount of memory as opposed to the menu system, so I figure I could use the extra 6 or so kilobytes for *something*...

What do you think of that idea?
Title: Re: Yet another shooter
Post by: Geekboy1011 on May 07, 2011, 04:38:40 pm
I personally would rather see as much memory as possible given to the game engine and main engine if thats where it fits in. Seems to be that the slowness will not be so slow its unbearable and that by having that extra space we can make the game look better / sqeeze in more content
Title: Re: Yet another shooter
Post by: Iambian on May 10, 2011, 12:08:47 pm
I personally would rather see as much memory as possible given to the game engine and main engine if thats where it fits in. Seems to be that the slowness will not be so slow its unbearable and that by having that extra space we can make the game look better / sqeeze in more content
Ehh. That's not quite what I meant. The point's null anyway. I'm not going to prebuffer the menu frames themselves, but the image files *will* be buffered. To help make the buffering scheme a bit clearer, I'll let some of the source do the talking :)
Code: [Select]
;VARIABLE EQUATES FOR ROUTINES LOCATED AT $9D95
ramseg1       = $9D95 ;0107b Common routines for multipage app management
ramseg2       = $9E00 ;0256b Common data resource tables
ramseg3       = $9F00 ;2048b |   Menu data buffer    | Stg background buffer |
ramseg4       = $A700 ;1024b |Menu system img buffer |  Second bullet table  |
ramseg5       = $AB00 ;0512b |Menu system img buffer | Spellcard background  |
ramseg6       = $AD00 ;4096b |Menu system img buffer |Script resource buffer |
ramsegend     = $BD00 ;8043t
The game field and the menu system are exclusive, therefore, can overlap perfectly. The menu data itself shouldn't be more than 2KB and the image data, no more than 4KB.

On another note, I got the title screen to work again :)
The banner on the top is a 96x15 .bmp file, and the background is a fullscreen 96x64 image file (shuffled into the gray buffer). Yup. I've gotten how to pull the .bmp files together. It's mostly batch script based, but the script you should be editing is fully documented. At least, I think it's documented well enough...
Title: Re: Yet another shooter
Post by: aeTIos on May 10, 2011, 03:59:45 pm
Wow awesome title screen!!!!
Title: Re: Yet another shooter
Post by: DJ Omnimaga on May 10, 2011, 04:00:33 pm
Nice. Is this how the grayscale will look like now, by the way?

I'm glad this is still progressing nicely.
Title: Re: Yet another shooter
Post by: Geekboy1011 on May 10, 2011, 04:03:16 pm
rawr looks nice...hmm
/me lets his head raddle on about things related to cadanite but decides to worry about it later xD
Title: Re: Yet another shooter
Post by: Iambian on May 15, 2011, 03:40:29 pm
Got character selection working. There will be up to 8 characters in the game. Some will be unlockable. Short post. Uncomfortable posting while lying on the floor.

EDIT (5-16-2011 11:11 EST) : Wrote in some high score menu logic. Didn't get anything to actually display quite yet.
Title: Re: Yet another shooter
Post by: ztrumpet on May 15, 2011, 04:01:44 pm
Oooh, pretty.
Uncomfortable response; laying in chair.
It looks very nice. :)
Title: Re: Yet another shooter
Post by: Iambian on May 17, 2011, 02:28:02 am
Added to the Results menu, showing what I have so far of the high score menu. You can already guess where the scores are gonna be.

Note: Up to three high scores in each category are going to be kept at a time.
EDIT: Four high scores. Just re-read my spec sheet.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on May 17, 2011, 02:29:05 am
Sounds cool, and I like those fonts :D
Title: Re: Yet another shooter
Post by: Iambian on May 17, 2011, 02:42:41 am
Change: Added character sprites before name, which was the original reason why the space was there. Tell me whether or not it looks better this way, or if you want it name only. Screenshot animated to demonstrate alignment.

Still need to put in code to read out the scores.

EDIT: Think it might be better to put the sprite into the gray layer?
Title: Re: Yet another shooter
Post by: DJ Omnimaga on May 17, 2011, 02:43:36 am
Oh that looks great actually! It should make it better IMHO, especially for the more visual people. :D
Title: Re: Yet another shooter
Post by: ztrumpet on May 17, 2011, 11:04:33 pm
I like it better with the sprites. :)  Lookin' great. ;D
Title: Re: Yet another shooter
Post by: Munchor on May 18, 2011, 01:23:15 pm
Looking good Iambian, Netham45 btw :P
Title: Re: Yet another shooter
Post by: Iambian on May 20, 2011, 06:20:24 pm
A screenshot that demonstrates the completed (excepting for additional character slots) character select screen, a completed high score screen, and a mostly filled out general statistics screen. I access the gen stats screen twice to show that "game uptime" is actually being kept in the background. The "game uptime" keeps track of the number of frames the game has gone through (which is roughly 24-32 frames a second).

None of the scores are real; they were created by the script to demonstrate that the score entries can be accessed in a manner that conforms to the spec sheet. I also noted one bug with respect to the small sprite display in the character select menu, regarding what is in the gray layer. I'm going to explore that routine to figure out what is up with that. If you don't know what I'm talking about, look carefully at those 8x8 sprites at the right when it changes between the normal character set and the secret character set, then back again. You'll see it. It should either be all black or all gray, but not both.

EDIT: Nevermind about that bug that I just mentioned. It was being caused by me not clearing off the gray buffer between frames.
Title: Re: Yet another shooter
Post by: ztrumpet on May 20, 2011, 06:30:08 pm
That's really cool.  I'm glad things are going smoothly. :)
Title: Re: Yet another shooter
Post by: DJ Omnimaga on May 26, 2011, 01:25:23 am
Looks great iambian. I like how stuff is placed too :)
Title: Re: Yet another shooter
Post by: Geekboy1011 on May 27, 2011, 11:49:41 pm
i get grounded and then BAM epicness soon as i get the chance to check the topic looks amazing iambian keep up the awesome work ^_^
Title: Re: Yet another shooter
Post by: Iambian on May 31, 2011, 05:36:15 pm
Just so you know, I'm not dead, and neither is the project. I've just been a little busy with other things, like work and coding a website related to said work.

What I've got to do with CaDan is to redo the resource tables (which shouldn't take too long) and fully figure out how resource management is going to take place. Until I can get those things down, I won't be able to work on the battle engine. I just wanna be able to do things right this time around.
Title: Re: Yet another shooter
Post by: TIfanx1999 on May 31, 2011, 06:43:03 pm
Sound good. :) I'm looking forward to seeing more when you get some free time again. ;)
Title: Re: Yet another shooter
Post by: Geekboy1011 on May 31, 2011, 07:09:55 pm
I just wanna be able to do things right this time around.

sounds good to me mate...and work does take priorities having our local dragon living in a cardboard box wont be a good thing ;)

best of luck with resource managing though. was tricky as hell in the last rendition of cadan...i can only hope its not as insane this time xD
Title: Re: Yet another shooter
Post by: DJ Omnimaga on June 08, 2011, 02:10:17 am
I hope you are less busy soon so you can manage to find free time to work on this. I hope this gets finished at one point. Take your time, though :)
Title: Re: Yet another shooter
Post by: Iambian on June 15, 2011, 02:29:22 am
Changes made: Shuffled around resources to allow compression of menu text and image files. Saved around 2KB so far. "Practice" is changed to "Extra" and the ability to practice the game is now found in the settings menu, which I am working on.

Plans: Additional stage selection is planned after the character selection is complete from the main menu. You will not be able to practice the extra stage (sorry guys). I also plan on providing a simple layout for the visual replays, but none will be enabled until I get the file structures encoded. Additional juggling of some data will happen shortly after I get the menus hashed out, and then I will start working on the "battle" system (main game play area).

Screenshots will be available once all that is done.
Title: Re: Yet another shooter
Post by: Iambian on June 27, 2011, 02:31:06 am
Finished up most of the menus, at least the ones I'm going to be supporting right now. There are placeholders for the Replay and External levels sections. I still need to write something for the Extra option and get the character select screen to figure out what was selected from the main menu so I can collect all the information needed to start the main engine.

A screenshot of what I have so far. Enabling external levels changes the function of "Start" if you haven't noticed.
Title: Re: Yet another shooter
Post by: Geekboy1011 on June 27, 2011, 06:43:36 pm
Looks amazing and from the demo you sent me it flows so smoothly. it just glides threw the menus LOVE IT ^_^
Title: Re: Yet another shooter
Post by: ben_g on June 27, 2011, 06:53:14 pm
The menu's look great, but on all of the screenshots i see only the menu's. How is the game itself going?
Title: Re: Yet another shooter
Post by: Geekboy1011 on June 27, 2011, 06:58:32 pm
its currently being rebooted there is a old demo here. but i got my hands on the source to make the game less of a demo and more of a game. and needless to say i broke it ... horribly so we are starting over to make it better than it originally was. as for actual code progress that would have to be asked to iambian ^_^
Title: Re: Yet another shooter
Post by: Iambian on June 28, 2011, 01:54:12 pm
The menu's look great, but on all of the screenshots i see only the menu's. How is the game itself going?
The actual game play has not yet been recoded. I want to verify that all the data that is being passed to the main game engine is accurate given the selections from the menus that is depicted on the screen shots.

If you want to learn about the progress that happened on this project prior to the reboot, check out this post (http://ourl.ca/4298/79830), which is a summary of all that went on before.

Coding the main game engine should progress a fair bit faster than the previous iteration, since I have a reference for how it is supposed to go, and I also have tons of working code that I can copy and paste.

The next screenshot that I'm going to put up will be the main game screen with some random shots being fired from nowhere, akin to how the early stages of the initial game's progress was. This is because I want to know that the bullet engine works before I build a script system that relies on it. The prior script system could not be used since it was broken beyond repair.

Just so you know, once I get the script system working again, I'm going to lock down this thread and create a new one to show the progress of this recent iteration of CaDan.
Title: Re: Yet another shooter
Post by: Geekboy1011 on June 28, 2011, 11:52:21 pm

 The prior script system could not be used since it was broken beyond repair.


not true imo it was just buggy to the point where alot of features would break during implementation. basics were good the more advanced features were not. but thats why we are remaking it to make every thing work better! ^_^
Title: Re: Yet another shooter
Post by: JustCause on June 29, 2011, 01:28:43 am
Well, as long as you don't end up in perpetual rewrite hell, I support this completely. Looking forward to progress -- good luck!
Title: Re: Yet another shooter
Post by: Geekboy1011 on June 29, 2011, 01:46:50 am
Well, as long as you don't end up in perpetual rewrite hell, I support this completely. Looking forward to progress -- good luck!

I doubt that will happen. the only outstanding issue with the old engine was the lack of testing on the scripting engine. so when i got my hands on it i kinda reeked some havoc. and considering its almost 2 year old code now with no sane notes remaining. Its just smarter to rewrite it with a new loved compression routine (PuCrunch) and a helping eye from some one who knows where the script system failed last time (me :P)

and obviously all your guys support it making it awesome. as a great game is getting publicity again xD
Title: Re: Yet another shooter
Post by: Deep Toaster on June 29, 2011, 04:48:26 pm
What? Yet ANOTHER shooter?

Just saw those screenies... That is one sweet titlescreen! And those characters, too. Awesome font.
Title: Re: Yet another shooter
Post by: Iambian on July 09, 2011, 03:51:50 am
Recreating the status bar is going to take... quite a while. To give the basic rundown of what is holding me up on that, I'm just gonna say that the entire status bar is directly drawn to the LCD; it's not buffered anywhere. And while I'm drawing it to the LCD, I'm using some of the spare cycles to perform these tasks:

* Character sprite rendering (done)
* Character / enemy bullet collision detection
* Character movement (done)
* Anything else I can think of stuffing inside the LCD's wait states while handling the elements I need to draw to the screen, really.

It's using these spare cycles that's eating up all my time, but I really want this thing to work right the first time around.

I would copy and paste the stuff found in the old iteration, but there's just stuff I simply won't or can't (without some effort) copy. If you took a good look at the code found in _drawlcd.z80 in the S2 folder of my old project (released as open source in this (http://ourl.ca/4298/79830) post) starting at around line 202, you'll sort of understand why I don't want to mess with it.
Title: Re: Yet another shooter
Post by: Iambian on August 12, 2011, 01:52:29 pm
Added in the score counter as long as an (unused at the moment) kills counter. The player is able to move around on the field. There is a single black line in the middle of the field to serve as a test for collision detection, which works, but I have not yet removed that.

Also, the score display will display in hexadecimal (zero-padded to maintain length) if set from the menu options. This was originally designed to help me debug the game since the score counter is a perfect way to output values as the game runs. It's also a good way for the user to see through the cheap methods that I'll employ to make the score counter count upward at regular intervals.

Next on the todo list: Resource allocation for additional menus and backgrounds. Also have to do some sort of scripting and I've also got to reconstruct the bullet engine.

In the following screenshot, the scoring, hex mode, and movement is demonstrated. The score panel is not actually tied to the score, but is instead tied to the some of the internal game timer. This "some" part is seen clearly when the score is viewed under hex mode.

(http://img.removedfromgame.com/imgs/CaDan26.gif)
Title: Re: Yet another shooter
Post by: Eeems on August 12, 2011, 02:08:58 pm
Yay for progress!
Title: Re: Yet another shooter
Post by: annoyingcalc on August 12, 2011, 02:45:40 pm
Progress!! Yay
Title: Re: Yet another shooter
Post by: Iambian on September 20, 2011, 03:59:01 am
To make a long story short, I spent all this time slacking off, working on a Celtic 2 rewrite, fighting with Vista until I decided it's time for Win7, pining over the loss of Celtic II due to missing the file while backing up, and reading the Temeraire series. If you haven't read that series, you ought to. Nothing's more awesome than re-envisioning the Napoleonic wars with dragons, but don't blame me if you start slacking on your projects because you're reading such awesome (okay, you *can* but only if you get the following line and find it hilarious: "Temerer! Cow?") But now that I'm done with the 6th book with the next one not due to be released for almost another year, I'm back to working on CaDan.

Save for a few things that I'm probably not going to miss until I cross that bridge, the side bar is just about done, so I'm off to deal with the bullet engine. Everything except for the line routine (since it's pretty much self-contained) has to be written from scratch since I'm going to use a different coordinate scheme to move and render the bullets. I am doing it this way so I can have myself the option of allowing bullets to properly clip, which solves a problem with respect to using bullets larger than 2x2 squares. This will also allow me to have bullets originate and fly off-screen and at my option, still allow bullets to bounce off the sides of the screen. I also plan on having varying velocities for bullets (not by much but still present) so you can fire off stuff at different speeds. Previously, there was only full speed and half speed (which was never really used). The whole velocity thing is only going to be done if I have enough clock cycles left over to do something like that. While I'm making these upgrades to the bullet system, I also plan on filling out the various bullet types, so you will have a bit more variety than the one pixel and 2x2 pixel blocks. I might also go with some graphical frills like having a bullet creation animation. That would be cool.

Certain details have yet to be worked out, but that's pretty much the plan of attack. The next screen shot I will post (which may take a while) is going to demonstrate what the new bullet engine can do. Since scripting won't be available yet, the patterns you see will be hardcoded into the engine for testing purposes.


Title: Re: Yet another shooter
Post by: Geekboy1011 on September 20, 2011, 03:15:41 pm
wheeeee fun fun

best of luck feel free to rant to me when ever or pop ideas off me i may not have the best ones back but i can try to make some sanity of some of them :P (while going insane to try to implement some of my own....)
Title: Re: Yet another shooter
Post by: Iambian on September 23, 2011, 11:13:10 pm
Nowhere near done with the bullet engine. Instead, I'm working on the script system. Just enough so that I can get use it to run full tests on the bullet engine that I'm gonna be making. I have a specification of what I want of it so far, but at the moment, I suppose I could poll the people here to see if there's anything I might be missing with respect to the general purpose commands. Yes, the stage itself can shoot at you. And yes, this is what I'm going to be doing to test out the bullet engine. Bullets flying in from NOWHERE! Mwahahaha*COUGH*... Yeah...

Code: [Select]
Script system outline:

Internal notes:
Warning: Do not use the following for names of a script system command
"db", "dw", "end", "org", "byte", "word", "fill", "block", "addinstr",
"echo", "error", "list", "nolist", "equ", "show", "option", "seek"
These are reserved by SPASM

Naming conventions:
 rx = virtual register 0-7
 nn = 1 byte value
 ww = 2 byte value
 b  = Some value between 0-7
 s  = Some value between 0-15
 
Some names will have a more descriptive label for its use. If one is used,
read the description to determine the data's size.
 
VERY IMPORTANT NOTE: ALL SCRIPT NAMES HAVE A PERIOD (.) PRECEDING THE NAMES
EVEN THOUGH THEY DO NOT SHOW IN THIS LIST. ALWAYS REMEMBER.

COMMANDSET AND NAME
==============================================================================
------------------------------------------------------------------------------
- NORMAL EVERYDAY USE --------------------------------------------------------
------------------------------------------------------------------------------
000             | No operation. The script system halts on encountering this.
 NOP            | Used for filler or something.
------------------------------------------------------------------------------
001-008         | LOAD(rx,nn)
 LOAD           | Stores a constant (1 byte) into a register.
 2 bytes        |
------------------------------------------------------------------------------
009-016         | ADD(rx,nn)
 ADD            | Adds a constant (1 byte) with a register, then stores the
 2 bytes        | results back to the register. Affects zero and carry flags.
                | There's no subtract operand for this mode. Use a negative
                | constant for doing that. There is no add with carry.
------------------------------------------------------------------------------
017-024         | CLEAR(rx)
 CLEAR          | Sets a register to zero.
 1 byte         |
------------------------------------------------------------------------------
025-032         | AND(rx,nn)
 AND            | Do a bitwise AND operation between a register and a constant
 2 bytes        | and store the result back into the register.
                | Affects the zero flag. Does not affect the carry flag.
------------------------------------------------------------------------------
033-040         | XOR(rx,nn)
 XOR            | Do a bitwise XOR operation between a register and a constant
 2 bytes        | and store the result back into the register.
                | Affects the zero flag. Does not affect the carry flag.
------------------------------------------------------------------------------
041-048         | OR(rx,nn)
 OR             | Do a bitwise OR operation between a register and a constant
 2 bytes        | and store the result back into the register.
                | Affects the zero flag. Does not affect the carry flag.
------------------------------------------------------------------------------
049-056         | CPL(rx)
 CPL            | Inverts all bits in a register.
 1 byte         | Affects the zero flag.
                | If you want to do NEG instead, just CPL, then INC it.
------------------------------------------------------------------------------
057-064         | WAIT(rx)
 WAIT           | Makes the script system wait for the number of game cycles
 1 byte         | that is stored in a register. Remember that 24 cycles is
                | about one second's worth of time in normal gameplay mode.
                | You should be setting that register to some known value
                | before using this instruction. Feeding in 0 is using 256.
------------------------------------------------------------------------------
065-072         | CMP(rx,nn)
 CMP            | Performs subtraction between a register and a constant in
 2 bytes        | the form: register-constant. The result is NOT stored back,
                | but instead, used to affect the zero and carry flags.     
                | Good for use with conditional jumps.
------------------------------------------------------------------------------
073-080         | TEST(rx,nn)
 TEST           | Performs a bitwise AND operation between a register and a
 2 bytes        | constant, but does NOT store the results back to the
                | register. Instead, it's used to affect the zero flag.
                | Used when you need to figure out which bits are set in a
                | register, perhaps for conditional jumps?
------------------------------------------------------------------------------
081-088         | TRACK(rx)
 TRACK          | Output-only. Sets the given register to an angle that would,
 1 byte         | when used with the SHOOT command, fire a bullet directly
                | toward the player.
------------------------------------------------------------------------------
089-096         | SHOOT(rx)
 SHOOT          | Fires a shot at the angle given in a register. 'nuff said.
 1 byte         |
------------------------------------------------------------------------------
097-104         | SETSTATS(rx,nn)
 SETSTATS       | Stores rx to an external variable. If you need to define
 2 bytes        | your own variables, look in the code developer's guide for
                | more information.
------------------------------------------------------------------------------
105-112         | GETSTATS(rx,nn)
 GETSTATS       | Retrieves rx from an external variable. Again, if you need
 2 bytes        | to define your own variables, look in the code developer's
                | guide for more information.
------------------------------------------------------------------------------
113-120         | MULT(rx,nn)
 MULT           | Multiplies a register by a constant, then stores the least
 2 bytes        | significant byte (LSB) of the result back into the register.
                | NOTE: If it's possible, try to use the rotate/shift
                |       commands if you're dividing or multiplying by
                |       multiples of 2. It's much friendlier that way.
                | The most significant byte (MSB) is stored in "sta.overflow"
                | be accessed by the getstats command. Flags are affected as
                | follows: Carry is set if the MSB is not zero. Zero is set if
                | the result in the LSB was zero (even if the whole isn't)
------------------------------------------------------------------------------
121-128         | DIVIDE(rx,nn)
 DIVIDE         | Dividend (rx) / Divisor (nn) -> Quotient to (rx)
 2 bytes        | This is a slow operation. See if you can't use right shifts
                | instead.
                | The remainder is stored in "sta.overflow", which is accessed
                | via getstats command. Flags are affected as follows:
                | Carry is set if there is a remainder. Zero is set if the
                | quotient is zero (does not check remainder).
                |
------------------------------------------------------------------------------
129-136         | INC(rx)
 INC            | Increments rx by one. Same as ADD(rx,1) but much faster and
 1 byte         | uses less memory. Affects only the zero flag, to remain
                | consistent with how the Z80 does things.
------------------------------------------------------------------------------
137-144         | DEC(rx)
 DEC            | Decrements rx by one. Same as ADD(rx,-1) but much faster and
 1 byte         | uses less memory. Affects only the zero flag, to remain
                | consistent with how the Z80 does things.
------------------------------------------------------------------------------
145-152         | DJNZ(rx,label)
 DJNZ           | Automatically decrements the given register and takes the
 2 bytes        | specified relative jump while the register does not become
                | zero that cycle. Just like Z80's djnz instruction, except
                | you can use any register.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
153             | MOVE(rxa,rxb)
 MOVE           | Copies the contents of register B over to register A.
 2 bytes        | Register A is overwritten with B and B stays the same.
------------------------------------------------------------------------------
154             | SWAP(rxa,rxb)
 SWAP           | The values in register A and register B are swapped.
 2 bytes        | Nothing is destroyed in this operation.
------------------------------------------------------------------------------
155             | ADDRX(rxa,rxb)
 ADDRX          | Adds register A and register B, then stores the result
 2 bytes        | back into register A. Affects only the carry flag.
------------------------------------------------------------------------------
156             | SUBRX(rxa,rxb)
 SUBRX          | Subtracts register B from register A in the form of
 2 bytes        | rxa-rxb, then stores the result back into register A.
                | Affects
                |
                |
------------------------------------------------------------------------------
157             | ROTR(rx,b) / ROTL(rx,b)
 ROTR/ROTL      | Rotates a given register a number of bits right or left
 2 bytes        | (respectively). All bits that leave one side of the register
                | Immediately appears on the other side of the register.
                | Flags are NOT affected.
                | INTERNAL NOTE: Distinguishing between ROTR and ROTL is done
                |                with bit 7 of the data byte. (1=ROTL)
------------------------------------------------------------------------------
158             | SHIFTR(rx,b) / SHIFTL(rx,b)
 SHIFTR/SHIFTL  | Shifts a given register a number of bits right or left
 2 bytes        | (respectively. All bits that leave are gone forever. Bits
                | shifted in will always be zero.
| Flags are NOT affected.
                | INTERNAL NOTE: Distinguishing between ROTR and ROTL is done
                |                with bit 7 of the data byte. (1=SHIFTL)
------------------------------------------------------------------------------
159             | MULTRX(rxa,rxb)
 MULTRX         | Multiplies register A with register B, then stores the
 2 bytes        | LSB of the result back to register A.
------------------------------------------------------------------------------
160             | DIVIDERX(rxa,rxb)
 DIVIDERX       | Divides register A with register B in the form of rxa/rxb,
 2 bytes        | then stores the quotient to register A.
------------------------------------------------------------------------------
161             | ANDRX(rxa,rxb)
 ANDRX          | Performs the bitwise AND function between register A and
 2 bytes        | register B, then stores the result to register A. Affects
                | the zero flag.
------------------------------------------------------------------------------
162             | ORRX(rxa,rxb)
 ORRX           | Performs the bitwise OR function between register A and
 2 bytes        | register B, then stores the result to register A. Affects
                | the zero flag.
------------------------------------------------------------------------------
163             | XORX(rxa,rxb)
 XORRX          | Performs the bitwise XOR function between register A and
 2 bytes        | register B, then stores the result to register A. Affects
                | the zero flag.
------------------------------------------------------------------------------
164             | CMPRX(rxa,rxb)
 CMPRX          | Performs virtual subtraction between register A and register
 2 bytes        | B. Does NOT store the result anywhere, but the carry and
                | zero flags are affected as though subtraction took place.
                | Useful for testing conditions.
------------------------------------------------------------------------------
165             | TEXTRX(rxa,rxb)
 TESTRX         | Performs a virtual AND function between register A and
 2 bytes        | register B. Does NOT store the result anywhere, but the
                | zero flag is affected as though an AND function was done.
                | Useful for testing bits to see if they're set.
------------------------------------------------------------------------------
166             | JUMPNC(label) [+ or - 127 bytes in either direction]
 JUMPNC         | Sets the script's execution pointer to wherever you defined
 2 bytes        | the label only if the result of flag altering command prior
                | to this instruction stayed between 0 and 255 (carry flag
                | reset)
------------------------------------------------------------------------------
167             | JUMPC(label) [+ or - 127 bytes in either direction]
 JUMPC          | Sets the script's execution pointer to wherever you defined
 2 bytes        | the label only if the result of flag altering command prior
                | to this instruction crossed zero. (Carry flag set)
------------------------------------------------------------------------------
168             | JUMPNZ(label) [+ or - 127 bytes in either direction]
 JUMPNZ         | Sets the script's execution pointer to wherever you defined
 2 bytes        | the label only if the result of flag altering command prior
                | to this instruction was NOT zero. (Zero flag reset)
------------------------------------------------------------------------------
169             | JUMPZ(label) [+ or - 127 bytes in either direction]
 JUMPZ          | Sets the script's execution pointer to wherever you defined
 2 bytes        | the label only if the result of flag altering command prior
                | to this instruction was zero. (Zero flag set)
------------------------------------------------------------------------------
170             | JUMP(label) [+ or - 127 bytes in either direction]
 JUMP           | Unconditionally sets the script's execution pointer to
 2 bytes        | wherever the label is defined. Just like Z80's JR.
------------------------------------------------------------------------------
171             | NEWPOSRT(rx_angle,rx_radius)
 NEWPOSRT       | Changes the firing position from the center of the enemy to
 3 bytes        | radius away from that center at some angle, both of which
                | are stored in registers. ANGLE is between 0 and 255, and
                | RADIUS can be anything, just note that 90 is the length of
                | the longest possible line on the screen. Keep that in mind
                | so you don't clip.
                | NOTE: Position is reset to center after a pause, or another
                |       use of the NEWPOSRT command.
------------------------------------------------------------------------------
172             | NEWPOSXY(rx_x,rx_y)
 NEWPOSXY       | Changes the firing position from the center of the enemy to
 3 bytes        | some offset X,Y away from the enemy. You MUST understand
                | that Y is reversed (positive values move down, negative
                | moves upward). To obtain negative values of a certain number
                | you should CPL/INC it. Or store a negative number to the
                | register to begin with. The screen is 64 by 64 pixels.
                | NOTE: Position is reset to center after a pause, or another
                |       use of the NEWPOSRT command.
------------------------------------------------------------------------------
173             | USESPRITE(rx_resourceID,rx_locationID)
 SETSPRITE      | Sets a sprite found in resourceID to an active enemy sprite
 3 bytes        | found in locationID. resourceID refers to a place on the
                | current script's resource table, which should be set at
                | "codegen"-time. locationID refers to a number 0-3, which
                | refers to which sprite slot to use (there are four).
------------------------------------------------------------------------------
174             | JUMPTABLE(rx_offset,nn_table_length) \.db label1,label2,...
 JUMPTABLE      | Allows you branch to different routines depending on what
 3+n bytes      | is in a register. You MUST put the table immediately after
                | this instruction. Example:
                |
                | LOAD(r1,0)      ;sets r1 to zero
                | JUMPTABLE(r1,4) ;r1 is the offset, 4 is the number of labels
                | .db Label_0     ;<-- Will be chosen, since it's the 0th one.
                | .db Label_1     ;Next label. If r1=1, then this is taken.
                | .db Label_2     ;Same, except if r1=2...
                | .db Label_3     ;And again... If r1=3...
                |
                | Note: If r1 is a value outside the bounds, the table is
                |       skipped over and code beneath is will run.
                | Note: The labels are relative addresses, + or - 127 bytes
                |       in either direction. This makes it prohibitive to use
                |       very large tables. If you need to make tables that
                |       large, use jump nodes as intermediaries.
                | IMPORTANT NOTE: THE TABLE CANNOT BE LARGER THAN 16 LABELS!
                |                 If you try to make it larger anyway, garden
                |                 gnomes will (likely) invade your home.
                | A typical use for this routine is retrieving the built-in
                | difficulty level, and then branching to different attacks
                | based on the difficulty, so one script does many things.
                | See how *you* can abuse this sucker. I won't be stopping you
------------------------------------------------------------------------------
175             | CALL(ww_relativelabel)
 CALL           | Lets you run a subroutine so you can save precious space by
 3 bytes        | not having to replicate redudnant code. The spacing for this
                | label is double-wide, so it can reach anywhere you need it
                | to. DO NOT TRY TO CALL ANYTHING WHILE IN A SUBROUTINE.
                | Endless loops and never getting back to the main code will
                | result. It's safe this time around to do a PAUSE or a WAIT
                | while you're in a subroutine, however. It's safe this time
                | around to do a PAUSE/WAIT combination while in a subroutine.
------------------------------------------------------------------------------
176             | RETURN   
 RETURN         | Exits a subroutine. Don't try to use this if you're not in
 1 byte         | a subroutine. Main script code all have exit points, and
                | using this command is NOT one of them. You might end up
                | crashing your calc or something.
------------------------------------------------------------------------------
177             | XYTORT(rxa_x,rxb_y,rxc_r,rxd_t)
 XYTORT         | Takes of the x,y coordinates found in registers A and B
 3 bytes        | (respectively), then uses the position given by the center
                | of the enemy in use (or whereever newposxy/newposrt has
                | changed it to) to output a distance and an angle in
                | registers C and D, respectively.
------------------------------------------------------------------------------
178             | RTTOXY(rxa_r,rxb_t,rxc_x,rxd_y)
 RTTOXY         | Similar to above, except it takes a distance and an angle,
 3 bytes        | then converts it to its corresponding x,y coordinates,
                | outputting to registers C and D, respectively.
                | The starting position is the center of the enemy in use or
                | wherever you changed it to via newposxy/newposrt.
                |
------------------------------------------------------------------------------
179             | GETPLAYERXY(rxa_x,rxb_y)
 GETPLAYERXY    | Outputs the player's X,Y coordinates to registers A and B,
 2 bytes        | respectively. If you only need an angle, you should be using
                | the TRACK command instead. Much faster that way.
Title: Re: Yet another shooter
Post by: DJ Omnimaga on September 23, 2011, 11:15:54 pm
I'm glad you're still around and working on this. Even though I don,t check the forums as much anymore I'm still looking forward for this.
Title: Re: Yet another shooter
Post by: annoyingcalc on September 24, 2011, 11:33:38 am
CaDaN TWTG (to win THE GAME)
Title: Re: Yet another shooter
Post by: Iambian on September 29, 2011, 10:56:05 pm
Current progress:

Made sure that most of the basic script commands work. So much FAIL happened that night when I started testing those commands, I was ranting and raving on an IRC channel someplace either on Omnimaga or Cemetech about how almost every command I tested failed. Hell, getting TO the script system was failing HARD. It got better.

I just started running tests on the bullet engine's integrity. So far, it does not crash when faced with a clean formatted table, which was a breath of fresh air given the recent history of failure. So maybe I'll have something to show for all of it sometime tomorrow or the day after. It'll look amazingly like the very first screenshot of the project so many years back, but the point is that things are going to get better from here on out (hopefully). Maybe instead simple downward moving bullets, I might just go ahead and demonstrate some script system niceness to make it look somewhat better. With circle patterns. There's things I can probably do with it. That was really the reason why I wanted to get the script system out of the way before I worked more on the bullet engine. I wanted to make sure it looked nice, but really, I just wanted to make sure that I have no dead test code sitting around like I did with the old CaDan.
Title: Re: Yet another shooter
Post by: ztrumpet on September 29, 2011, 11:02:38 pm
Awesome!  I'm glad you're making progress.  Keep it up. :D
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 04, 2011, 12:35:00 pm
I wanted to make sure it looked nice, but really, I just wanted to make sure that I have no dead test code sitting around like I did with the old CaDan.

yeah that was annoying lol made some things go wonky >.<
Title: Re: Yet another shooter
Post by: Iambian on October 16, 2011, 09:07:23 pm
Bullet table problem fixed (FBT-related). Wrote up a test script below, and below that blob of code is a screenshot of the result. Remember that these bullets only move down.

Code: [Select]
StageScript:
 .load(r1,128) ;starting angle
 .load(r2,6) ;starting variable radius
 .load(r4,5) ;counter for increment
 .load(r5,1) ;toggle
 .load(r6,10) ;delay between cycles. Also hardcoded in routine
StageScriptCont:
 .load(r0,2) \ .wait(r0)
 .newposrt(r1,r2) ;angle,radius
 .add(r1,3)
 .call(CustomMakeBullet)
 .move(r3,r2)
 .add(r3,3)
 .newposrt(r1,r3)
 .call(CustomMakeBullet)
 
 .dec(r6)
 .jumpnz(_)  ;cycle delay
 .load(r6,10)
 .addrx(r2,r5) ;changing radius
 .dec(r4)
 .jumpnz(_)
 .load(r4,5)
 .cpl(r5)
 .inc(r5)
_:
 .setstats(r7,rs.debug1)
 .jump(StageScriptCont)


CustomMakeBullet:
 .runasm(_)
 bit fbt1full,(iy+stateflags)
 jr nz,SSSKIP
;Include and call ionRandom for varying bullet speeds when that test
;is about to be performed
 ld c,$20
 ld hl,freebullet1
 ld e,(hl)  ;1.READ
 inc (hl)   ;2.INC
 ld d,$8C
 ld a,(de)
 ld (ix+7),a
 jp p,$+7
 set fbt1full,(iy+stateflags)
 ld h,$88>>2
 add a,a
 ld L,a
 add hl,hl
 add hl,hl
 xor a
 ld (hl),CLSB(TestEBTShot)
 inc L
 ld (hl),CMSB(TestEBTShot)
 inc L
 ld (hl),c  ;acc/TTL
 inc L
 ld (hl),b  ;angle (allow to be uninitialized for now)
 inc L
 ld bc,(curpos) ;C=Y,B=X
 ld (hl),a      ;*.8 set to zero
 inc L
 ld (hl),c      ;8.* X position
 inc L
 ld (hl),a      ;*.8 also set to zero
 inc L
 ld (hl),b      ;8.* Y position. Finished writing
SSSKIP:
 jp r.runasm.ret
_:
 .return
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 17, 2011, 12:51:24 am
Yay now i can start mucking around. and keep a change log of what is not working right in the current scriptsystem :P

for starters you documented or coded .newposxy (r.npxy in lib_script) and they are backwards x is y and y is x blah blah blah just pointing that out there :P
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 17, 2011, 01:41:40 am
Wow I love how those bullets are moving around. It still looks smooth too.
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 17, 2011, 01:47:58 am
Wow I love how those bullets are moving around. It still looks smooth too.
yeah it does look cool and they are only moving 1 direction down yay testing xD


(http://img.removedfromgame.com/imgs/yaynoclipping!!.gif)

uhhh you not masking the sprites right or something iambian? as i dont think you should have that box around you in this screenie :P

also when holding quite a few common keycombos in game down the whole game slows down until you release them not sure whats causeing that havent looked hard though

and this one i mention earlier.
Quote from: geekboy
for starters you documented or coded .newposxy (r.npxy in lib_script) and they are backwards x is y and y is x blah blah blah just pointing that out there :P
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 17, 2011, 03:01:09 am
How do you get through these lines of bullets without getting hit??? O.O
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 17, 2011, 11:16:35 am
How do you get through these lines of bullets without getting hit??? O.O

you dont :3

this isnt a feasable script i was just bored and testing things. currently cadan is in debug mode aka you cant get hit :P
Title: Re: Yet another shooter
Post by: Iambian on October 17, 2011, 12:54:23 pm
[...]
Quote from: geekboy
for starters you documented or coded .newposxy (r.npxy in lib_script) and they are backwards x is y and y is x blah blah blah just pointing that out there :P

It wasn't a problem with r.newposxy. It was a problem with r.shoot. Fixed it in my copy. Thanks for keeping me updated. Also the bullets are going clockwise now, as expected.
Title: Re: Yet another shooter
Post by: Iambian on October 17, 2011, 02:43:59 pm
Whee! Doublepost!

I ran into a problem with how the the whole velocity/ttl thing works. Should be easily fixable but I wanted to show a screenshot of the problem. The problem is that the bullets are not expiring and instead, they are slowing down halfway down.

Just so you know, I did not "copy" geekboy's script but I re-implemented it to closeness. I will also post the script that performs this effect. Note that the call to the custom bullet creator is not included since that just does that one thing.
Code: [Select]
StageScript:
.load(r1,-30) ;x
.load(r2,-30)   ;y
.load(r3,30)  ;loop range
.load(r4,1)
StgScptLoop:
.load(r7,2)
.wait(r7)
.newposxy(r1,r2)
.call(CustomMakeBullet)
.cpl(r1)
.inc(r1)
.newposxy(r1,r2)
.call(CustomMakeBullet)
.setstats(r0,rs.debug1)
.cpl(r1)
.inc(r1)
.addrx(r1,r4)
.dec(r3)
.jumpnz(_)
.load(r3,30)
.cpl(r4)
.inc(r4)
_:
.jump(StgScptLoop)

And the resulting screenie is attached. I'm just sharing it because sometimes bugs can look better than the intended result :)

EDIT: Also, you can see the bullet engine maxing out at 128 bullets. When I get slowmode ready, I'll show a screenshot of the thing going up to 256 bullets. Yay.
Title: Re: Yet another shooter
Post by: Jonius7 on October 17, 2011, 02:53:18 pm
Oh wow! This looks really nice! Good work.
That slowing down bullet effect is quite weird, though.
Title: Re: Yet another shooter
Post by: TIfanx1999 on October 17, 2011, 03:47:41 pm
That's actually pretty cool looking. It looks like the screen is being warped. ;D
Title: Re: Yet another shooter
Post by: DJ Omnimaga on October 17, 2011, 03:51:46 pm
Lol that actually looks kinda cool lol.
Title: Re: Yet another shooter
Post by: Iambian on October 17, 2011, 06:04:39 pm
If you didn't catch it from my previous post, the slowdown behavior is bugged. It's not supposed to slowdown at all. It's supposed to disappear as it is a test condition.

But while this is a bug, it does demonstrate velocity change (which *is* supported) for them bullets. You only get 4 speeds, but it's enough variance to make something cool
Title: Re: Yet another shooter
Post by: Iambian on October 18, 2011, 12:38:55 am
Double post.

I tried to fix the velocity thing but I ended up breaking it even further. It actually looks kinda cool. Here's the result so far.

EDIT: Even tho the screenshot is cool, disregard it. I fixed the problem. Gotta thank calc84maniac for providing the initial fix, and me for somehow screwing up that fix >.<
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 18, 2011, 04:28:47 pm
who huh what olook they move right now >.> <.<
(http://img.removedfromgame.com/imgs/totherightotheright.gif)

added a second stream to this one.
(http://img.removedfromgame.com/imgs/totherightotheright2.gif)
Title: Re: Yet another shooter
Post by: annoyingcalc on October 18, 2011, 07:23:51 pm
the last demo is from 2009 can we have a current demo? the screenshot is amazing!!!!!!!
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 18, 2011, 07:37:39 pm
the last demo is from 2009 can we have a current demo? the screenshot is amazing!!!!!!!

once its in a releasable state sure. that is not going to be for a while still. Currently all the demos are hackedish together with some really good knowledge of the code base to the point where its not really even usable. (read we have a custom make bullet routine for everything as well we have not coded in a proper shoot command.)Not to mention we don't have anything else really coded in as far as enemies and such.
Title: Re: Yet another shooter
Post by: annoyingcalc on October 18, 2011, 07:41:35 pm
that is ok I can wait as long as it is realesed by 2099 :P
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 18, 2011, 07:47:52 pm
that is ok I can wait as long as it is realesed by 2099 :P

the plan is to have it done soon as sanely possible. Definitely not a easy game to code for :P
Title: Re: Yet another shooter
Post by: Iambian on October 18, 2011, 08:24:17 pm
Well, if we keep up this progress, we might have a three stage demo out by Christmas of this year. But what I'm really hoping for is a shot at this year's POTY so we're gonna try to get this thing rolling ASAP. Because there's all these 2012 things that the world's gonna end, so I might not get another chance at a POTY.

Erh. Apocalypse aside, I'm gonna see how fast I can get a *real* demo out.
Title: Re: Yet another shooter
Post by: Eeems on October 18, 2011, 08:34:15 pm
Well, if we keep up this progress, we might have a three stage demo out by Christmas of this year. But what I'm really hoping for is a shot at this year's POTY so we're gonna try to get this thing rolling ASAP. Because there's all these 2012 things that the world's gonna end, so I might not get another chance at a POTY.

Erh. Apocalypse aside, I'm gonna see how fast I can get a *real* demo out.
Woo :D Can't wait :)
Title: Re: Yet another shooter
Post by: BalancedFury on October 18, 2011, 09:11:19 pm
I love any shoot 'em up games as long as it's not that crappy one... what is it called?
Duck Hunt?
I would rather hunt that dog and bury him :P
Title: Re: Yet another shooter
Post by: Iambian on October 18, 2011, 09:22:38 pm
We can probably put in a Duck Hunt mode. (j/k)

But seriously, with how advanced the script system is going to be, we might add in a Tetris mode just to see how far we can take the idea.

Currently on the task list is putting in actual radially moving bullets. If I can get that done tonight, I might ask Geekboy pull together a (few) script(s) to demonstrate it.
Title: Re: Yet another shooter
Post by: BalancedFury on October 18, 2011, 09:26:10 pm
We can probably put in a Duck Hunt mode. (j/k)

But seriously, with how advanced the script system is going to be, we might add in a Tetris mode just to see how far we can take the idea.

Currently on the task list is putting in actual radially moving bullets. If I can get that done tonight, I might ask Geekboy pull together a (few) script(s) to demonstrate it.
*DualBLDR hyperventilates and then stops as soon as he reads JK...
Tetris mode? O.O
Can you explain, or does it mean like the enemies fall down like the tetris blocks and u hav to shoot them down?
Like that game Bubble Busters(?)
Title: Re: Yet another shooter
Post by: ztrumpet on October 18, 2011, 09:37:28 pm
Tetris mode? O.O
I really want to know how that could work.
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 18, 2011, 09:37:56 pm
We can probably put in a Duck Hunt mode. (j/k)

But seriously, with how advanced the script system is going to be, we might add in a Tetris mode just to see how far we can take the idea.

Currently on the task list is putting in actual radially moving bullets. If I can get that done tonight, I might ask Geekboy pull together a (few) script(s) to demonstrate it.
*DualBLDR hyperventilates and then stops as soon as he reads JK...
Tetris mode? O.O
Can you explain, or does it mean like the enemies fall down like the tetris blocks and u hav to shoot them down?
Like that game Bubble Busters(?)

no like turn the whole engine into a full tetris game with scoring and such iirc. we have been poping back and forth on this for a while :P
Title: Re: Yet another shooter
Post by: BalancedFury on October 18, 2011, 09:39:43 pm
Oh....
How are you gonna do that?
I DEMAND...
Spoiler For for what I demand:
Screenshots!
Title: Re: Yet another shooter
Post by: Iambian on October 18, 2011, 09:42:29 pm
Geekboy said it. I was thinking of abusing CaDan's bullet and script engines to form a "stage" where instead of actually shooting things, you play a game of Tetris using an amalgamation of 2x2 bullets as the tetrominoes.

This wouldn't actually be a serious use of the CaDan script system, but it would be pushing the limits on what you could get it to actually do. A variation of this would be building a version of Pong for it.
Title: Re: Yet another shooter
Post by: Deep Toaster on October 18, 2011, 09:55:50 pm
I really want to try Tetris mode O.O
Title: Re: Yet another shooter
Post by: BalancedFury on October 20, 2011, 05:21:30 pm
Me too
Title: Re: Yet another shooter
Post by: Iambian on October 21, 2011, 12:17:59 pm
Well sirs. You can shoot now. Can't hit anything yet but you can most certainly shoot stuff.
Title: Re: Yet another shooter
Post by: Deep Toaster on October 21, 2011, 03:34:44 pm
Yaza, progress! Can't wait for the engine to pick up again :w00t:
Title: Re: Yet another shooter
Post by: annoyingcalc on October 21, 2011, 10:10:58 pm
please post a screenie with all the characters you can use
Title: Re: Yet another shooter
Post by: Yeong on October 21, 2011, 11:39:57 pm
please post a screenie with all the characters you can use
I think cemetech have some characters in screenshot
Title: Re: Yet another shooter
Post by: Iambian on October 22, 2011, 06:23:04 am
Character roster is incomplete, so I can't post that.

Verified that sprite rendering and clipping works flawlessly. Since I'm not using "normal" math to calculate some of the addresses, I find it funny that due to that fact, I had to deal with a literal corner case. The top-left corner to be exact. When you try to left-clip up there, the resulting number is negative, and that didn't sit well with the cheap as hell "addition" of $8000 by simply setting bit 7 of HL to find the buffer address.

Here's the routine that's in use (nevermind some of the sillier comments) :
Code: [Select]
;Automagically clips x bounds. Idea given by calc84maniac
DrawClippedSprite:  ;D=X E=Y A=spriteID. Allows negative numbers to an extent.
;screen dimensions are 64x64 pixels
 rrca
 rrca  ;%11000000 get
 ld c,a ;A is saved into C. Now let's start doing display sanity checks.
 ld hl,$F940   ;H=-7 (carry=oob), L=64 (nocarry=oob)
 ld a,d
 cp L
 jr c,_  ;skip further checking. We are in bounds
 cp H
 ret c   ;kill routine if the sprite can't be displayed.
_:
 ld a,e
 cp L
 jr c,_  ;same deal as above, since max width and height are the same as in X
 cp H
 ret c
_:       ;if we reach here, sanity has been checked. Sprite is displayable.
 ld L,c  ;sprite ID selector in L for now, since C is being overwritten
 ld bc,$0800 ;B=loop counter, C=offset modifier
 ld a,e  ;getting Y position.
 cp 57   ;checking to see if is on either right or left edge
 jr c,DrawClippedSpriteSkipYClip
 jp m,_  ;jumping if result is still negative (top side clipping)
;Bottom-side clipping
;57=7, 58=6 59=5 60=4 61=3 62=2 63=1. Just limit loop counter.
 cpl       ;-58 -59 -60 -61 -62 -63 -64
 add a,65  ;7   6   5   4   3   2   1
 ld b,a    ;new loop counter established
 jp DrawClippedSpriteSkipYClip
_:  ;This is the top-side clipping routine
;IN:CNT:OFFSET -1:7:1 -2:6:2 -3:5:3 -4:4:4 -5:3:5 -6:2:6 -7:1:6 NDS:NDS:NDS
 neg
 ld c,a       ;offset established. Already? Wow.
 cpl          ;-2:7 -3:6 -4:5 -5:4 -6:3 -7:2 -8:1
 add a,9      ;Yes.
 ld b,a       ;Loop counter achieved.
 ld e,0    ;set new Y position at 0 to allow proper clipping
DrawClippedSpriteSkipYClip:
 push bc      ;save loop counter, RCL by pop af. Use C offset soon.
  ld a,d  ;now, let's start processing these coordinates, shall we?
  and %00000111
  ld b,a  ;save for getting mask address
  add a,a
  add a,a
  add a,a ;x8 %00111000
  add a,L ;merge to get correct sprite position
  add a,c ;add sprite offset for Y clipping
  ld c,a  ;position saved
  ld a,b
  add a,8 ;getting spritemask position
  ld h,$40
  ld L,a
  ld b,(hl) ;B=spritemask
;At this point, C=spritepostionLSB, B=mask DE=XY,
  ld L,e  ;y
  ld h,0
  add hl,hl
  add hl,hl
  add hl,hl
  ld e,c   ;sprite positioner. C is free'd up, using E as LSB to complete addr
  ld a,b   ;mask (left side AND)
  cpl      ;invert it
  ld c,a   ;mask (right side AND)
  ld a,d   ;check x position for clippage.
  cp 57    ;Check to see if X needs to be clipped
  jr c,DrawClippedSpriteSkipXClip
  jp m,_   ;If still negative, then jump to left side clippage.
;Right side clipping.
  ld a,7   ;manually set to right side of screen
  ld b,0   ;manually clear right side mask to avoid showing sprite on left
  jp DrawClippedSpriteManualSetX
_:
  ld c,0   ;manually clearing left side mask to avoid showing sprite on right
  dec hl
  bit 7,h  ;checking to see if HL went negative
  jr z,DrawClippedSpriteManualSetHL
  ld hl,$7FFF ;handling corner case where clipping at top-left edge
  jp DrawClippedSpriteManualSetEdge ;It's a freaking literal corner!
DrawClippedSpriteSkipXClip:
  rrca
  rrca
  rrca
  and %00000111
DrawClippedSpriteManualSetX:
  add a,L
  ld L,a
DrawClippedSpriteManualSetHL:
  set 7,h    ;83cc
DrawClippedSpriteManualSetEdge:
  ld d,$87   ;D=MSB of sprite position, E already is LSB. Address completed.
;So what we have so far is: C=LSMask, B=RSMask DE=sprAddr HL=scrnAddr
 pop af      ;A=loop counter we saved from so long ago.
 ld (itemp2),sp
 ld sp,7     ;SP = using in place of DE for advancing HL.
DrawClippedSpriteDrawLoop:
 ex af,af'
  ld a,(de)  ;FINALLY. We are writing out that sprite in accordance to
  and c      ;all of our carefully laid out plans. Of course... plans
  or (hl)    ;tend to never survive initial contact. Oh, well. That's
  ld (hl),a  ;what the debugging phase is for.
  inc hl
  ld a,(de)
  and b       ;These comments have nothing to do with this particular stretch
  or (hl)     ;of code. Instead, I'm using this area to chronicle the debug
  ld (hl),a   ;phase. (1) Incomplete sanity check. Forgot to set HL fully.
  add hl,sp   ;(2) Bad inputs and script system incompatibility. (itemp1)
  inc e       ;needed to be preserved, and characte X,Y had subpixel data that
 ex af,af'    ;I needed to get rid of. (3) Reversed masks. (4) Top-left corner
 dec a        ;case addressed. Debugger used to find the problem. All fixed.
 jr nz,DrawClippedSpriteDrawLoop
 ld sp,(itemp2)
 ret         ;If your scale color is red, you're in good claws.

Sprite rendering is done during the stage script, purely for testing purposes. This is the code I've used (the whole thing, including the lines going across the screen; relevant code near bottom) :
Code: [Select]
StageScript:
.load(r1,-30) ;x
.load(r2,-30)   ;y
.load(r3,30)  ;loop range
.load(r4,1)
StgScptLoop:
.call(TestSpriteRoutine)
.load(r7,2)
.wait(r7)
.newposxy(r1,r2)
.call(CustomMakeBullet)
.cpl(r1)
.inc(r1)
.newposxy(r1,r2)
.call(CustomMakeBullet)
.setstats(r0,rs.debug1)
.cpl(r1)
.inc(r1)
.addrx(r1,r4)
.dec(r3)
.jumpnz(_)
.load(r3,30)
.cpl(r4)
.inc(r4)
_:
.jump(StgScptLoop)





CustomMakeBullet:
 .runasm(_)
 bit fbt1full,(iy+stateflags)
 jr nz,SSSKIP
;Include and call ionRandom for varying bullet speeds when that test
;is about to be performed
 ld c,%10000011
 ld hl,freebullet1
 ld e,(hl)  ;1.READ
 inc (hl)   ;2.INC
 ld d,$8C
 ld a,(de)
 jp p,$+7
 set fbt1full,(iy+stateflags)
 ld h,$88>>2
 add a,a
 ld L,a
 add hl,hl
 add hl,hl
 xor a
 ld (hl),CLSB(TestEBTShot)
 inc L
 ld (hl),CMSB(TestEBTShot)
 inc L
 ld (hl),c  ;acc/TTL
 inc L
 ld (hl),b  ;angle (allow to be uninitialized for now)
 inc L
 ld bc,(curpos) ;C=Y,B=X
 ld (hl),a      ;*.8 set to zero
 inc L
 ld (hl),b      ;8.* X position
 inc L
 ld (hl),a      ;*.8 also set to zero
 inc L
 ld (hl),c      ;8.* Y position. Finished writing
SSSKIP:
 ld a,(characterID)
 ld (ix+0),a
 jp r.runasm.ret
_:
 .return
 

TestSpriteRoutine:  ;so ruinous. Just total hell is about to be unleashed.
 .runasm(_)
 ld de,(chary)
 srl e
 srl e
 srl d
 srl d
 ld a,-10 \ call TestSpriteRoutineAddToY ;up above
 ld a,-10 \ call TestSpriteRoutineAddToX ;top-left
 ld a,10  \ call TestSpriteRoutineAddToY ;left
 ld a,10  \ call TestSpriteRoutineAddToY ;bottom-left
 ld a,10  \ call TestSpriteRoutineAddToX ;bottom
 ld a,10  \ call TestSpriteRoutineAddToX ;bottom-right
 ld a,-10 \ call TestSpriteRoutineAddToY ;right
 ld a,-10 \ call TestSpriteRoutineAddToY ;top-right
 
 jp r.runasm.ret
TestSpriteRoutineAddToY:
 add a,e
 ld e,a
 push de
  xor a
  call DrawClippedSprite
 pop de
 ret
TestSpriteRoutineAddToX:
 add a,d
 ld d,a
 push de
  xor a
  call DrawClippedSprite
 pop de
 ret
_:
 .return
Yes, I *am* aware that there's way more Z80 ASM code than there is CaDan script code. See, the stage script became mine and Geekboy's best friend. A great way to test out assembly code.

And attached to the end of the post is a screenshot of the actual test.
Title: Re: Yet another shooter
Post by: ztrumpet on October 22, 2011, 10:14:07 am
Wow, this looks really cool.  I'm glad you're making progress, Iambian. :D
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 22, 2011, 03:47:53 pm
I agree with the last thing in that post iambian it is our playground :P we can mess with just about anything...i mean all we need to do is remember to restore ix and a few other registers. and nothing breaks...to easily xD
Title: Re: Yet another shooter
Post by: Iambian on October 23, 2011, 06:16:46 am
As of this update, enemies are now up and running. Well, mostly anyway. You can shoot them and they can shoot you (run CaDan scripts). They can die but they can't move quite yet. Haven't gotten around to building MovePath script (both the script themselves and the interpreter). Haven't gotten around to even defining what that sort of script is going to look like. But the important thing is that you can shoot your enemies now.

I've also put together a small routine that smooths out the score increase so it looks like it's continuously increasing. I think it makes the whole thing look nicer.

Note: Each shot that connects with the enemy is worth 100 points. The laser looking like thing is actually two shots glued right next to each other, and a stream of such shots pretty much right on top of each other. The one with three streams are all individual bullets and each bullet counts as a shot. With the way the thing is set up, each enemy gives 12,800 points.
Title: Re: Yet another shooter
Post by: annoyingcalc on October 23, 2011, 11:37:22 am
Keep up the good work It is awesome
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 25, 2011, 12:33:06 am
Eye candy?!?!?!?!?

Eye candy!!!!!!!!!!

(http://img.removedfromgame.com/imgs/Shinyshiny.gif)
Title: Re: Yet another shooter
Post by: Iambian on October 25, 2011, 12:39:25 am
This time around, I got bullet tracking working. Couple with the fact that the angle values are interpolated to give a better shot AND that I've increased the number of angles in a circle to 256, these things are deadly-accurate. Long gone are the days where you can find a safe spot by taking advantage of the system's inaccuracies.

Even the non-interpolated version (which will appear in bullet engine as a bullet script) is fairly accurate. You don't want to be messing with this stuff!
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 25, 2011, 12:41:07 am
HOLY HELL THAT LOOKS SO MUCH MORE ACCURATE THAN BEFORE

in all honesty it does xD
Title: Re: Yet another shooter
Post by: Iambian on October 25, 2011, 12:54:26 am
Okay, I did a comparison between CaDan 0.03a (source posted in some other thread), and the current build of CaDan 0.04a. The first screenshot shows the old version, and the second shows the newer version. See for yourself.

EDIT: And now you see. Survivability has never been lower.
Title: Re: Yet another shooter
Post by: Eeems on October 25, 2011, 04:51:59 am
Wow this is looking epic :P
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 25, 2011, 05:30:22 pm
OK OK OK i know this looks like a bunch of bullets going in random directions....owait thats what i wanted it to do

This screenie uses the PRNG me and iambian worked on last night to shoot bullets in different angles.

best part is it is repeating, every 255bullets it starts over wheeee

(http://img.removedfromgame.com/imgs/LFSRGOGO.gif)
Title: Re: Yet another shooter
Post by: BalancedFury on October 25, 2011, 05:32:58 pm
i.......SEE...... LAZAR!!
BROHAOHROIAHLASKALSR!!
Title: Re: Yet another shooter
Post by: LincolnB on October 25, 2011, 05:49:01 pm
epic......i say as i slowly go comatose
Title: Re: Yet another shooter
Post by: BalancedFury on October 25, 2011, 05:49:40 pm
Comatose?
???
Title: Re: Yet another shooter
Post by: LincolnB on October 25, 2011, 05:56:51 pm
Comatose basically means lying on the floor, going into a coma
Title: Re: Yet another shooter
Post by: BalancedFury on October 25, 2011, 05:59:50 pm
Oh I get it now
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 25, 2011, 06:05:06 pm
Comatose basically means lying on the floor, going into a coma

on a side note doing this in cadan is a sure way to NOT get a high score :P
Title: Re: Yet another shooter
Post by: LincolnB on October 25, 2011, 06:10:06 pm
You don't know my mad calculator gaming skillz (yes, while lying on the floor comatose) >:D
Title: Re: Yet another shooter
Post by: BalancedFury on October 25, 2011, 06:25:52 pm
Lol Comatose will get u a higher score in games...
The spazz contest :P
Title: Re: Yet another shooter
Post by: ztrumpet on October 25, 2011, 06:50:13 pm
I love the recent changes.  CaDan lives again!
Title: Re: Yet another shooter
Post by: TIfanx1999 on October 27, 2011, 01:00:32 am
This time around, I got bullet tracking working. Couple with the fact that the angle values are interpolated to give a better shot AND that I've increased the number of angles in a circle to 256, these things are deadly-accurate. Long gone are the days where you can find a safe spot by taking advantage of the system's inaccuracies.

Even the non-interpolated version (which will appear in bullet engine as a bullet script) is fairly accurate. You don't want to be messing with this stuff!

O.O Wow... this screenie makes me afraid. Be afraid... very afraid. >:D
Title: Re: Yet another shooter
Post by: Iambian on October 27, 2011, 05:09:20 am
Smallish update: I got enemies to put out an explosion animation. I haven't gotten it to clip yet, but that's not going to be much of a problem since killing enemies while they're still outside the screen's edge is unlikely. Speaking of killing enemies while they're still clipping, I haven't exactly tested out the collision detection scheme to see if it'll handle negative coordinates. I must investigate this.

Also, someone has suggested that I should make the explosion 16x16 instead of 8x8 to make it more dramatic. Others have commented that it should be like this, so I may go ahead and write some general purpose 8x*y big sprite routine that supports clipping and use that routine instead. I was originally going to put that routine in so I can have more flexible stage introduction graphics but I can see its use elsewhere. Maybe an actual bigger boss sprite? I wouldn't count on it but the possibilities are still there.

Next on the task list is to enable some form of background rendering and perhaps put in a tilemapper for additional advanced stage backgrounds and the like. It would be awesome, that's for sure. But what really needs to be done is getting the resource table structure fully defined and ready to go. That part will pretty much allow me to dynamically load script and stage data to extend the stage beyond what is immediately loaded into memory. Very important.

Anyway, here's a screenshot demonstrating what I have of the explosion effect. Coding it was easy. Debugging it was not.
Title: Re: Yet another shooter
Post by: Yeong on October 27, 2011, 06:18:39 am
Wow! awesome!
If you finish the bg and player dying, we might see a demo! ;D
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 27, 2011, 06:24:36 pm
So in hcwp last night iambian taught me how to use the sin cosine tables

well i think they work but i messed up my logic for shooting bullets so we got this instead


(http://cadan.57o9.org/Screenshots/FAILFAIL.gif)

(NOTE this is not a real script :P though it would kill everything pretty nicely >.> <.<)
Title: Re: Yet another shooter
Post by: JustCause on October 27, 2011, 06:52:01 pm
So in hcwp last night iambian taught me how to use the sin cosine tables

well i think they work but i messed up my logic for shooting bullets so we got this instead
Clipped to save bandwidth
(NOTE this is not a real script :P though it would kill everything pretty nicely >.> <.<)

That pattern has safe spots. :P
Title: Re: Yet another shooter
Post by: TIfanx1999 on October 27, 2011, 08:23:02 pm
So in hcwp last night iambian taught me how to use the sin cosine tables

well i think they work but i messed up my logic for shooting bullets so we got this instead


(http://cadan.57o9.org/Screenshots/FAILFAIL.gif)

(NOTE this is not a real script :P though it would kill everything pretty nicely >.> <.<)

O M G . . .  S O  . . .  M A N Y  . . .  B U L L E T S !  x.x
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 27, 2011, 08:25:57 pm
Scary part is thats was a glitch from me writing value to the PBT wrong xD
Title: Re: Yet another shooter
Post by: Iambian on October 28, 2011, 09:37:03 pm
All those bullets that you see were coming from just the player. Enemies have their own bullet table.

But that's not the point of this post. The point is that I've got dragon fire going down. Since Geekboy had so many problems, I decided to take a crack at it, and lemmie tell you. It wasn't easy (and it still isn't perfect since it doesn't clip on the left/right sides).

Here's a screenshot of the preliminary version of it.
Title: Re: Yet another shooter
Post by: BalancedFury on October 28, 2011, 09:40:12 pm
This reminds me of Pheonix somehow
YOu should also make a shop where you can buy better weapons and/ or upgrade them
and also heal if there's gonna b hp
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 28, 2011, 10:41:19 pm
Mega thanks to iambian for getting that working was giving me a headache.

Anyway.

I Took what he had and changed some stuff around mostly making it use our PRNG routines so that we can rely on the fire spread in replays. I also made it feel a bit more natural by using the same PRNG output to limit the bullets travel time in a seemingly random fashion like fire :P

(http://cadan.57o9.org/Screenshots/FIREFIRE.gif)

(note ignore the scoreboard i did not enable hex mode like Iambian so its all giberished :P)
Title: Re: Yet another shooter
Post by: Xeda112358 on October 28, 2011, 10:44:33 pm
mmm, that candy is pretty tasty :)
Title: Re: Yet another shooter
Post by: ztrumpet on October 28, 2011, 10:57:52 pm
Aww, look!  It's the cute Iambian shooting fire with his cyoot dragon breath.  Who's a cute little dragon?  You are. </Cooing>

It looks awesome!  Major props to you guys; I realize that it was really to code, but it looks amazing.  Excellent work!

Did someone say something about replays? What'll that do?
Title: Re: Yet another shooter
Post by: Iambian on October 28, 2011, 11:26:31 pm
Aww, look!  It's the cute Iambian shooting fire with his cyoot dragon breath.  Who's a cute little dragon?  You are. </Cooing>

It looks awesome!  Major props to you guys; I realize that it was really to code, but it looks amazing.  Excellent work!

Did someone say something about replays? What'll that do?
^_^ *happehfaic*
</nonproductivepost>

Replays are keystroke recordings that form up a movie of what you have done that game session. If you had a particularly awesome run but forgot to turn on the record feature of Wabbitemu, or if you're out on the road playing on a real TI-83 Plus, you can save what you did and have an automatic replay of it so you can show your friends how awesome you are.

After all. Vids or it didn't happen.
Title: Re: Yet another shooter
Post by: ztrumpet on October 28, 2011, 11:30:00 pm
Replays are keystroke recordings that form up a movie of what you have done that game session. If you had a particularly awesome run but forgot to turn on the record feature of Wabbitemu, or if you're out on the road playing on a real TI-83 Plus, you can save what you did and have an automatic replay of it so you can show your friends how awesome you are.

After all. Vids or it didn't happen.
That is really frikin' tight.  How many can you you have saved at once?
Title: Re: Yet another shooter
Post by: Iambian on October 28, 2011, 11:32:01 pm
[...]
That is really frikin' tight.  How many can you you have saved at once?
However much memory you have. I figure that a single stage will eat up anywhere around 8 to 12KB apiece, depending on how much you mash the buttons and how long the stage is.
Title: Re: Yet another shooter
Post by: TIfanx1999 on October 28, 2011, 11:51:10 pm
Mega thanks to iambian for getting that working was giving me a headache.

Anyway.

I Took what he had and changed some stuff around mostly making it use our PRNG routines so that we can rely on the fire spread in replays. I also made it feel a bit more natural by using the same PRNG output to limit the bullets travel time in a seemingly random fashion like fire :P

(http://cadan.57o9.org/Screenshots/FIREFIRE.gif)

(note ignore the scoreboard i did not enable hex mode like Iambian so its all giberished :P)

Lookin good geek!

Aww, look!  It's the cute Iambian shooting fire with his cyoot dragon breath.  Who's a cute little dragon?  You are. </Cooing>

It looks awesome!  Major props to you guys; I realize that it was really to code, but it looks amazing.  Excellent work!

Did someone say something about replays? What'll that do?
^_^ *happehfaic*
</nonproductivepost>

Replays are keystroke recordings that form up a movie of what you have done that game session. If you had a particularly awesome run but forgot to turn on the record feature of Wabbitemu, or if you're out on the road playing on a real TI-83 Plus, you can save what you did and have an automatic replay of it so you can show your friends how awesome you are.

After all. Vids or it didn't happen.

That's pretty awesome!
Title: Re: Yet another shooter
Post by: Deep Toaster on October 29, 2011, 11:10:03 am
Replays would be epic. And those screenshots look great, especially that last one which actually looks like dragon fire :D
Title: Re: Yet another shooter
Post by: Xeda112358 on October 29, 2011, 11:42:43 am
Wow, that would be awesome O.O Is it okay if I use that replay feature in some of my programs if I ever feel up to it? That would be lovely for walk throughs and help features for games !
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 29, 2011, 11:47:16 am
Wow, that would be awesome O.O Is it okay if I use that replay feature in some of my programs if I ever feel up to it? That would be lovely for walk throughs and help features for games !

Go for it its just an idea. but keep in mind if you just store keypress data like we are the game has to be 100% non random in actual execution. The way cadan is set up is if you init everything with the same seeds and such it will run the exact same every time. Which is why that scheme can work
Title: Re: Yet another shooter
Post by: Xeda112358 on October 29, 2011, 11:50:00 am
Ah, good point, so I should store a copy of the randseed, too... THanks much, I hadn't even thought of that!
Title: Re: Yet another shooter
Post by: mrmprog on October 29, 2011, 11:52:50 am
Replays sound pretty cool.Does it store the key, and then how long it was pressed, or does it store whatever key is pressed each time through?
Title: Re: Yet another shooter
Post by: Geekboy1011 on October 29, 2011, 11:56:44 am
Replays sound pretty cool.Does it store the key, and then how long it was pressed, or does it store whatever key is pressed each time through?
it stores what keys are pressed every game cycle then uses a modified RLE scheme to compress them on the fly. well thats the intent at least. to my knowledge not a lick of it has been coded. other important behind the scenes things to work on >.<
Title: Re: Yet another shooter
Post by: annoyingcalc on October 30, 2011, 07:37:40 pm
O.O those screenshots are awesome!
Title: Re: Yet another shooter
Post by: Iambian on November 03, 2011, 03:34:49 am
Not a real update, but I just want to share that after a natural disaster hampered the other side of the CaDan dev team (geekboy), we're getting back on track.

Tonight during HCWP, we hashed out yet another sprite routine to add to our already growing collection, which looks more like an actual clipped sprite routine than the others. This advancement was necessary for geekboy to start work on a secret character's shot type. (EDIT 2: This was also necessary to work in a primary shot type for the dragon. The flames you've seen was his secondary shot type.)

I also need to remind everyone that we have two slots open for the normal playable characters, and two slots open for the secret playable characters. Sorry Netham45, I decided to drop your pre-lobsterification variant, unless we are unable to get two normal playable characters in.

The next leg of the project beyond that is getting the decompression up and running and codifying CaDan's resource table. These two things are the things that allows CaDan to load level sets, so I cannot take that sort of thing lightly. This means that I'm going to be spending some quality time losing what's left of my hair... and mind... over this mess. You know, debugging and all that good business.

Self note: Create static resource entries and write script commands that rely on them. This way I won't have to figure out whether the script system or the resource loader went boom.

EDIT: While you're mulling over that, why don't you check out some eye candy that geekboy posted a while back that somehow got superseded by a posting I made involving high-accuracy shooting: http://ourl.ca/2637/255825 . If you look at it closely, you can see that it does indeed hit the upper bullet limit.
Title: Re: Yet another shooter
Post by: Darl181 on November 04, 2011, 06:23:41 pm
This is a little late, but...
Quote from: http://ourl.ca/2637/255828
(http://www.omnimaga.org/index.php?action=dlattach;topic=40.0;attach=10044;image)
0.o
What's the theory behind that?  I've been trying to get aiming like that working since something like January...
Title: Re: Yet another shooter
Post by: Deep Toaster on November 04, 2011, 06:29:42 pm
And another thing: the topic title is still "Yet another shooter." Methinks that's an enormous understatement O.O
Title: Re: Yet another shooter
Post by: Geekboy1011 on November 04, 2011, 07:17:26 pm
This is a little late, but...
Quote from: http://ourl.ca/2637/255828
(http://www.omnimaga.org/index.php?action=dlattach;topic=40.0;attach=10044;image)
0.o
What's the theory behind that?  I've been trying to get aiming like that working since something like January...


well we move bullet based off an angle and velocity. so all he really does is use an arctan routine with the enimies pos and your pos to get an angle and plugs that into the bullets trajectory and thus it flyies at you ;p

he does some crazy fucking shit with it though to get it to be that accurate though...

you should ask him for more info though :p
Title: Re: Yet another shooter
Post by: ztrumpet on November 04, 2011, 07:26:15 pm
he does some crazy fucking shit with it though to get it to be that accurate though...
And this is why we love him.
Title: Re: Yet another shooter
Post by: Iambian on November 04, 2011, 08:36:21 pm
This is a little late, but...
Quote from: http://ourl.ca/2637/255828
(http://www.omnimaga.org/index.php?action=dlattach;topic=40.0;attach=10044;image)
0.o
What's the theory behind that?  I've been trying to get aiming like that working since something like January...

To begin, let us go ahead and set what we mean by "angle". In our nice happy normal lives, we know that there are 360 degrees or 2*pi radians in a circle. We will assume that the zeroth degree is a line starting from the center of the circle drawn to the right most point (the 3 'o clock position). Draw another line from the center out to any other point on the circle and we can measure how far away it is from that starting point. That will be our angle, and it is measured in... wait? What? No, we're not going to use degrees for this. Neither are we going to use radians! Instead, we'll just make up our own unit of measurement. Let's call this a "binary degree" and set the number of these binary degrees that can exist in a circle from zero to 255. Why do we do this? Because it fits nicely in a single 8-bit register and lets us calculate these things faster. After all, we're in it for the speed.

The bullet's path is in polar coordinates, so that means we've got an angle and a radius. Since the bullet's radius is a function of time, we can omit having a radius altogether and just let it fly at a velocity.

To aim at something, you have to ask yourself "What angle do I need to shoot at in order to intersect at the player's position?" To get this answer, you will need an inverse trigonometric function. Given the starting point, which is the enemy's firing position, and the end point, which is the player's position, you have an X and Y. You have three basic inverse trigonometric functions to choose from: arcsine, arccosine, and arctangent. Absolutely FORGET about the other three. When you run your arguments through those functions, you will obtain an angle that you can then use to shoot at the enemy. But wait!

You only have information readily available to use the arctangent function, since it only needs the X and the Y. The other two functions want a hypotenuse (or rather, the radius, which we never kept track of) so they're right out, unless you want to go ahead and calculate them using Pythagorean's theorem. When you need to perform high speed calculations, you don't need to do more than you have to, so now let's forget about arcsine and arccosine. Let's just use arctangent.

So, now we picked our function. We get the angle from arctan(y/x). So now we've got to do division, right? Wrong! CaDan does absolutely no division, at least, not in the way a "normal" person would think of it. In fact, we don't actually do the function at all! Instead, we create a lookup table (LUT) that contains all the coordinates we can input, and have all the angles we need to output. Now, let's go ahead and say right now that we can strip the signs off of the X and Y to make using this table a bit easier. You still need to keep record of what those signs were; we'll need them for later.

For CaDan, since the screen is 64 x 64, I can get away with having X's and Y's go from 0 to 63 (zero inclusive), in such a manner that each column (data in a single row) enumerates all X's given a certain Y, and going from row to row, enumerates all Y's. But such a table, given 64*64, would total 4KB. We do NOT want to spend that much memory on such a table, so let's cheap this one out. We'll pick every 4th value, going from 0 to 60 in both directions. Keep in mind that you can't have 0 as an X value, so you're just going to have to assume that as X approaches zero, the angle approaches 64 binary degrees (pi/2 = 64 binary degrees). In the code box below is such a table, ranging from 0 to 64 binary degrees.

Code: [Select]
ArcTanTable:
.db 00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00 ;|00 00|
.db 64,32,19,13,10,08,07,06,05,05,04,04,03,03,03,03 ;|01 04|
.db 64,45,32,24,19,16,13,11,10,09,08,07,07,06,06,05 ;|02 08|
.db 64,51,40,32,26,22,19,16,15,13,12,11,10,09,09,08 ;|03 12|
.db 64,54,45,38,32,27,24,21,19,17,16,14,13,12,11,11 ;|04 16|
.db 64,56,48,42,37,32,28,25,23,21,19,17,16,15,14,13 ;|05 20|
.db 64,57,51,45,40,36,32,29,26,24,22,20,19,18,16,16 ;|06 24|
.db 64,58,53,48,43,39,35,32,29,27,25,23,22,20,19,18 ;|07 28|
.db 64,59,54,49,45,41,38,35,32,30,27,26,24,22,21,20 ;|08 32|
.db 64,59,55,51,47,43,40,37,34,32,30,28,26,25,23,22 ;|09 36|
.db 64,60,56,52,48,45,42,39,37,34,32,30,28,27,25,24 ;|10 40|
.db 64,60,57,53,50,47,44,41,38,36,34,32,30,29,27,26 ;|11 44|
.db 64,61,57,54,51,48,45,42,40,38,36,34,32,30,29,27 ;|12 48|
.db 64,61,58,55,52,49,46,44,42,39,37,35,34,32,30,29 ;|13 52|
.db 64,61,58,55,53,50,48,45,43,41,39,37,35,34,32,31 ;|14 56|
.db 64,61,59,56,53,51,48,46,44,42,40,38,37,35,33,32 ;|15 60|

To fetch values off this table at a good speed, let's go ahead and align this table to a high byte. Say, this table is to be copied to 0x8000. Now, let's construct the low byte in the following manner: Since the low 4 bits (16 entries wide) represents X, let's shove the X value in the low 4 bits, and since each row represents a Y value, it should be the upper 4 bits, so let's shove that in the upper nibble of the low byte. You set the resulting value as the low byte of the address, then fetch from that address.

And this is where geekboy says it starts getting crazy, but I would like to disagree.
Now that we've gotten an angle from the table, you'll want to notice the values as you approach the axes. See how they're getting rather... granular? That's one weakness to this approach. The angles you get as you approach the X or Y axes tend to suck and your shots will tend to miss simply because it can't aim properly. Especially since we've used a table that doesn't cover every single point, so what do we do? We go ahead and interpolate those values. I sure hope you didn't discard the sign-stripped X and Y values you calculated earlier between you and the enemy. We're going to need those bits you shuffled out in order to use the LUT. In fact, those are the ONLY bits you need for this part. What we're going to do is pick the angle you're at and find the next angle to the right and below you and find out how "close" you are to those angles. In our scheme, we stripped the lowest 2 bits of our X and Y, so that means there are 4 values to choose from. If you're sitting exactly on the boundary in the LUT (those two bits are zero), then you can skip the step for either the X or Y. What you do with those two bits is count how many times you are at the first angle you have, and then count how many times you are away from the next angle, then take the average of that. I like to do the X and Y calculation separately so that I can stick with 8 bit math. When you take a total average, you end up with an angle that is about as close as you can get without actually having to have those values in your table. It's not magic. It's just making a straight line that closely matches the curve, and then taking a point off that line... okay, so we're stretching that concept but hey. It works.

"But wait," you might ask after that hefty paragraph. "That's only one quadrant! I spent all that time listening to you whine on and on about the accuracy of the angle, but I want to be able to aim anywhere!" That's right. You *do* want to be able to aim anywhere within that full circle. Remember when I asked you to save what signs the X and Y were? You get to use those signs to correct what the angle should be. Now, since this is a circle, once you've got one quadrant, you basically have all four of them with just a little bit of manipulation. I'm going to leave it as an exercise to you as to *how* the angle is to be modified given the sign. Here's a hint: With one, you negate the angle. With the other, you add pi (128 binary degrees).

So, all in all... that's the theory. Or explanation. Or whatever.
That's what I do. And the aiming still sucks around the X and Y axes. I mean, it's good enough to not give you a safe spot but still. Not as good as I'd like it to be.

EDIT: I think I forgot to mention that almost all instances of X and Y are supposed to be calculated from your position and the enemy's position, so I suppose that would make it a delta X and delta Y? I dunno.

EDIT2: If you didn't get much out of that, perhaps you could get a little more out of the routine that CaDan uses. Because of the way the routine uses its pointers, it's not necessary to have the arctangent LUT page-aligned. That's just a side-effect of using IX in a manner that ensures compatibility with the Nspire or other half-broken emulators that doesn't support undocumented instructions.

Also keep in mind that the character's X and Y coordinates (in routine's DE) are formatted as (%xxxxxx00,%yyyyyy00) with the lowest two bits being subpixel bits, which aren't used in the calculation. I'm sure I could squeeze a little more accuracy during the interpolation phase if I *did* include those bits, but I did not. Anyway, below is the routine that CaDan uses:
Code: [Select]
;Warning: Loads and loads of register-juggling ahead.
r.arctan: ;in: HL=(x1,y1) DE=(x2,y2)
 ld b,0        ;initializing...
 ld a,e        ;
 rrca \ rrca \ and %00111111
 sub L    ;y1-y2
 jr nc,_  ;result is negative. Set B for flags (bit 0) and adjust Y for pos.
 set 0,b
 neg
_:
 ld e,a      ;D=Y for later
 rlca \ rlca ;shifting so that %00yyyynn is %yyyynn00 for later. n matters not
 ld L,a      ;half-result in L now
 ld a,d
 rrca \ rrca \ and %00111111
 sub H     ;x1-x2
 jr nc,_   ;result is negative. Set B for flags (bit 1) and adjust X for pos.
 set 1,b
 neg
_:
 ld c,a    ;C=X for results later
 rrca \ rrca ;shifting so that %00xxxxnn is %nn00xxxx. n still matters not.
 xor L     ;combine with Y
 and $0F   ;mask out to keep old X low bits
 xor L     ;and we have %yyyyxxxx
 ld L,b    ;saving flags into L for now.
 ld h,e    ;restore H for... stuffs
 ld ix,ArcTanTable
 ld e,a
 ld d,0
 add ix,de ;We have our offset now.
;So at this point, C=X, H=Y, L=flags.
;Let's go ahead and do X-interpolation first.
 ld a,c
 and %00000011 ;value-ranking
 ld c,(ix+0)   ;storing non-adjusted "output" value into C
 jr z,r.arctan.skipx
 ld e,a  ;Loop for second half of X interpolate
 cpl     ;ranking first value on inverse of distance to next number
 add a,5 ;So 1=3,2=2,3=1
 ld b,a
 xor a
_:
 add a,c
 djnz -_
 ld c,(ix+1)
 ld b,e
_:
 add a,c
 djnz -_
 rra \ rra
 and %00111111
 ld c,a       ;out by the time we're done with everything.
r.arctan.skipx:
 ld a,h
 ld H,c     ;H=InterpolatedX
 and %00000011 ;value-ranking
 ld c,(ix+0)   ;storing non-adjusted "output" value into C
 jr z,r.arctan.skipy
 ld e,a  ;Loop for second half of Y interpolate
 cpl     ;ranking first value on inverse of distance to next number
 add a,5 ;So 1=3,2=2,3=1
 ld b,a
 xor a
_:
 add a,c
 djnz -_
 ld c,(ix+16)
 ld b,e
_:
 add a,c
 djnz -_
 rra \ rra    ;Also trying to get any leftovers from too many values of 64
 cp 64
 jr z,_
 and %00111111
_:
 ld c,a       ;added. Since 64*4 is a 9 bit number, getting that back.
r.arctan.skipy:
 ld a,c
 add a,H
 rra
 cp 64
 jr z,_
 and %00111111 ;and NOW we have our final angle. (if it wasn't 64...)
_:
 ld b,0        ;Set to 128 if X is negative. For additions later on.       
 bit 1,L
 jr z,_
 ld b,128
 neg           ;negate angle
_:
 bit 0,L
 jr z,_
 neg           ;negate angle again if (-,-) else first neg. Still correct :)
_:
 add a,b       ;completing the angle
 ld c,a        ;saving the completed angle to C
 ret

EDIT3: If you're trying to get a routine like this to work on a 96x64 buffer, I could suggest doubling your area by halving the input X/Y coordinates. There will be some loss of accuracy, but if you're putting this in a game where your "hitbox" is the full 8x8 or larger sprite, then this won't be much of a concern. In fact, I don't think there will be any concern now that with a 128x128 firing range in all directions around the sprite (256x256 total area), then you could safely fire from off-screen. The angle that is output will be all the same.

If you somehow need the radius as well, I'd consider saving whatever's in C and use Pythagorean's Theorem to obtain the radius. You'd just double (square) the X and Y, add them together, and then pass that value through some sort of square root algorithm. You can find a good routine that does square roots around here: http://baze.au.com/misc/z80bits.html
Title: Re: Yet another shooter
Post by: Darl181 on November 06, 2011, 11:15:20 am
Ok, that's a bit more detailed than I was thinking of 0.o
I'm not sure if that would even be possible in Axe XD
Title: Re: Yet another shooter
Post by: Yeong on November 07, 2011, 07:26:21 am
wow Iambian that should go to a tutorial section :D
Title: Re: Yet another shooter
Post by: Iambian on November 16, 2011, 03:52:22 am
Sorry there hasn't been an update in ages. The resource table thinger is kicking my butt... and I felt kinda burnt out on the project in the past week or so. I'm gonna try to pick it up later "tomorrow" (technically today) and see how far I can get into a test scenario. I mean, pulling together a miniature file system isn't the easiest thing in the world, but who knows how things'll turn out.
Title: Re: Yet another shooter
Post by: LincolnB on November 16, 2011, 10:17:44 am
hmm...good luck! We're all behind you here.
Title: Re: Yet another shooter
Post by: Geekboy1011 on November 16, 2011, 05:55:01 pm
I have not had anyfree time lately. Lifes been crazy.  >.<  whan i do post an update tho hopefully i will have some eyecandy ^_^

Title: Re: Yet another shooter
Post by: Iambian on November 23, 2011, 10:14:59 am
Alright. I'm trying to get this project back on track. What I've decided on tackling right now is the mini-menu for the danmaku mode. Doing this will give me a basis on which I can enter and exit danmaku mode without having to rely on a "debug" stretch of code. This will also help facilitate other instances where a menu or menu-like situation needs to happen while still co-existing with the danmaku system.

I've already coded the sections needed for the graphical aspect of the transition, and one maintenance routine needed for re-entering danmaku mode. Here's hoping they all work out.
Title: Re: Yet another shooter
Post by: annoyingcalc on November 23, 2011, 11:05:43 am
YES! more progress
Title: Re: Yet another shooter
Post by: Iambian on November 26, 2011, 06:26:14 am
Got the mini menu up and running.

What I've got to do now is put together something involving resource creation and management so I can finally put together some stages. OR... handle the high scores. Whichever works best for me at the time.

EDIT: Changed screenshot. Added a white backing on menu title to make it more visible under extreme circumstances.
Title: Re: Yet another shooter
Post by: Yeong on November 26, 2011, 07:51:31 am
:D looks nice!
Are you planning to add more characters?
Title: Re: Yet another shooter
Post by: Iambian on December 05, 2011, 06:14:07 pm
Minor update: Working on the menu used to input your name for the high score screen / replay save screen. The screen shot below shows a test condition layered on top of the title screen. Note the small 's' is in black to show that it has been selected. The space below the lowercase 'z' is the space character. You have to back out of the menu by pressing MODE to finalize your selection. The DEL button moves the cursor backwards but does not erase anything. If you go back too far, just keep hitting the DEL key as it wraps around to the other side. Perhaps I can use the Y= button for moving the cursor forward? Now that's an idea...

[post attempt 3; forum attachment system appears to be broken. Using RFG for this.]
(http://img.removedfromgame.com/imgs/CaDan45.gif)

EDIT: Will modify this routine later on to make the spacing between the characters more like the rest of the game. Should be prettier.
Title: Re: Yet another shooter
Post by: annoyingcalc on December 05, 2011, 06:17:19 pm
That blew me away! That is a great screenshot!
Title: Re: Yet another shooter
Post by: epic7 on December 05, 2011, 06:36:51 pm
Iambian, do you like cherries? It would appear so.
/me lost

Anyways, cool menu :thumbsup:
Title: Re: Yet another shooter
Post by: Xeda112358 on December 05, 2011, 07:26:05 pm
Does that lowercase "t" have an extra pixel?
Title: Re: Yet another shooter
Post by: Iambian on December 05, 2011, 08:08:39 pm
Does that lowercase "t" have an extra pixel?
Yes. That was intentional and is part of the font.
Title: Re: Yet another shooter
Post by: Xeda112358 on December 05, 2011, 08:13:54 pm
Ah, okay! Also, you have 1+27 well deserved uprates so far O.O
Title: Re: Yet another shooter
Post by: Iambian on December 07, 2011, 10:37:32 pm
Well, I've got a little bit of some of the other stuff done. Can't save replay files yet, but at least there will be a placeholder for them. Observe.

Oh, yeah. And an included easter egg in the naming screen.
(http://img.removedfromgame.com/imgs/CaDan47.gif)
Title: Re: Yet another shooter
Post by: hellninjas on December 08, 2011, 01:03:07 am
/me lost
looks nice!
Title: Re: Yet another shooter
Post by: NanoWar on December 08, 2011, 08:19:20 am
I don't think you need a cursor to go through the letters. If you choose a letter, the cursor automatically jumps one to the right. Like in most name input screen in Gameboy games or like this: http://img.photobucket.com/albums/v626/bublnsqeek/tutorials/nameinput.gif :) .
Title: Re: Yet another shooter
Post by: annoyingcalc on December 08, 2011, 10:39:07 am

(http://img.removedfromgame.com/imgs/CaDan47.gif)

AWESSOME and I love your avatar!
Title: Re: Yet another shooter
Post by: Iambian on December 08, 2011, 02:56:40 pm
I don't think you need a cursor to go through the letters. If you choose a letter, the cursor automatically jumps one to the right. Like in most name input screen in Gameboy games or like this: http://img.photobucket.com/albums/v626/bublnsqeek/tutorials/nameinput.gif :) .
I would prefer a cursor in the name, especially since the name input screen will be automatically filled out with the name you used the last time (Or "Nameless" if you're starting fresh with a new install). If something is already in the field, it might take more thought than strictly necessary to figure out where you are.

Also, whoever said it on IRC, I stand corrected. The behavior of the DEL key, at least in Perfect Cherry Blossom, is to move the cursor back and then remove the character at that position. The cursor also didn't wrap, so I might want to go ahead and fix that behavior. Also, maybe I ought to have something like an "End" option like in most games to exit out of the name select screen, because I'm not sure it's evident that the "go back" key (MODE) will allow you to exit and still accept the changes made.

EDIT: *nomnomnomnom*
Title: Re: Yet another shooter
Post by: TIfanx1999 on May 01, 2012, 11:26:29 am
A Cherry-Flavored Iambian draws near... what do you do? .../me casts thread bump!
Title: Re: Yet another shooter
Post by: Iambian on April 16, 2013, 02:19:17 pm
Minor progress being made with the project. Reworked the player bullet routines to be easier to work with, so geekboy can work more on Nanami's shot type. I'm finally working on the resource handler routines. Might tweak the idea around to support internal garbage collection or something fancy like that. The thing is already getting pretty fancy.
Title: Re: Yet another shooter
Post by: Matrefeytontias on April 16, 2013, 04:27:07 pm
...

...

...

Wait what ? -_o

Iambian posted ?

In CaDan thread ? O.O

HE'S RESUMING IT !!?? :w00t:
/me organizes a rave party to celebrate the event
Title: Re: Yet another shooter
Post by: Matrefeytontias on November 27, 2013, 04:07:37 am
/me and IkarugaX pokes Iambian and Geekboy1011

I like to think of IkarugaX as CaDan's little brother since that's CaDan which made me want to create it, it would be too bad if only one of the two came to fruitition ...
Title: Re: Yet another shooter
Post by: Iambian on December 13, 2013, 10:33:10 am
geekboy got me to work on this thing once again. It's still a monster that needs much more TLC than it's been given recently.

Because CaDan has been on such a long hiatus, I've completely forgotten what I've been working on and it's quite a nice thing to rummage through stacks of notebook paper trying to figure out what the last thing was.

As it turns out, it was a replacement garbage collector for the resource handler routines (went with that instead of script-managed memory) and a really fancy set of routines for scripted enemy movement. Absolutely none of which are in the codebase yet. But judging from the number of "Quality Assurance Dragons" drawn on the pages, I may have gone off the deep end more than once writing it.

Note: Geekboy wants a picture of said Quality Assurance Dragon(s)
EDIT: QAD attached.
Title: Re: Yet another shooter
Post by: TIfanx1999 on December 13, 2013, 11:14:28 am
Zomg it's Iambian! ^^ Good to see you again! Also, lovin the QAD. ;D