CodeWalrus

Development => Calculators => Calc Projects, Programming & Tutorials => Topic started by: 123outerme on April 10, 2016, 01:45:28 AM

Title: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: 123outerme on April 10, 2016, 01:45:28 AM
I've decided to recreate Super Smash Bros (Melee, hopefully) on the TI-84+CSE (and CE assuming all goes well with xLIBCE). Super Smash Bros CCM, CCM standing for Color Calc Melee. I decided that if I posted this, it'd get done quicker. I'm doing this on the side, when I'm waiting for my testers to bring me back bugs and other things, and I get the urge to code, I'll be doing this. Here's a screenshot for no reason other than because I like you.
(http://i.imgur.com/vxbOAqm.gif)
The blank background is intentional. I plan to break free from moving in 8x8 chunks (as in Sorcery of Uvutu), and for that, I'll need to have a blank background present.
Title: Re: Super Smash Bros CCM
Post by: Dream of Omnimaga on April 10, 2016, 03:40:00 AM
I like the speed so far. But when gameplay gets added you'll definitvely need to use shortcuts and workarounds in order to keep the speed high. I think it's possible, though.

-The walking loop should only include floor collision, jumping/falling speed/flag.
-When you press any key that isn't jump/walking, when you get hit, when you touch an item or when the enemy does anything else than walking, the main engine loop is exited.
-Once exiting the main loop, the game processes the above if needed. The Else instruction with nested Ifs must be used to minimize lag caused by going through long code whenever possible.
-No rand, randInt(), Sin(), Cos(), Tan() nor string operation must be used in the main walking loop. Those are too slow. In other words, have some form of AI and/or pre-determined enemy attack/move patterns, even if it means longer loading times before the match starts.
-Special moves should probably not be animations like a fireball moving gradually, but rather happen instantly, else having code to make a fireball or laser move every frame will slow down the game.

Some of the above have been used in Illusiat 13 and it helped a lot. The plain color background will definitively help too. I wish you good luck with this game and I hope it is successful. Just make sure to not start too big lol. :)
Title: Re: Super Smash Bros CCM
Post by: 123outerme on April 10, 2016, 09:51:53 PM
Quote from: DJ Omnimaga on April 10, 2016, 03:40:00 AM
I like the speed so far. But when gameplay gets added you'll definitvely need to use shortcuts and workarounds in order to keep the speed high. I think it's possible, though.

-The walking loop should only include floor collision, jumping/falling speed/flag.
-When you press any key that isn't jump/walking, when you get hit, when you touch an item or when the enemy does anything else than walking, the main engine loop is exited.
-Once exiting the main loop, the game processes the above if needed. The Else instruction with nested Ifs must be used to minimize lag caused by going through long code whenever possible.
-No rand, randInt(), Sin(), Cos(), Tan() nor string operation must be used in the main walking loop. Those are too slow. In other words, have some form of AI and/or pre-determined enemy attack/move patterns, even if it means longer loading times before the match starts.
-Special moves should probably not be animations like a fireball moving gradually, but rather happen instantly, else having code to make a fireball or laser move every frame will slow down the game.

Some of the above have been used in Illusiat 13 and it helped a lot. The plain color background will definitively help too. I wish you good luck with this game and I hope it is successful. Just make sure to not start too big lol. :)
Thanks.
Unfortunately, all I have is the running loop with 1 "animation" (Falco sticks his leg out but never changes foot), no gravity or anything, just basic bounds checks, and already I can tell this is impossible. It's fairly slow already, and flickery (since I use both sides of GRAM to draw the map, I can't use double-buffering). On top of speed issues, since I can't mirror sprites, I'd need 2 copies of every single sprite in the game, one for facing left, and the other right. I'd estimate a grand total of 2 characters, using up both tileset slots. It's a shame to kick this project away so early, but I'm absolutely sure it was a mistake to start. At least the camera code might be helpful to some. Maybe this can be of use to someone. I'll leave the files here.
(http://i.imgur.com/BJpcSbC.gif)
Title: Re: Super Smash Bros CCM
Post by: Dream of Omnimaga on April 10, 2016, 09:56:37 PM
Aw too bad. Actually the speed isn't that bad but As as ssb game some people might find it too slow. On the CE the speed would be twice faster at least so perhaps it could be playable there? You would need to test with Wabbitemu CSE at 200% speed, tho.

Also that character looks cool.
Title: Re: Super Smash Bros CCM
Post by: 123outerme on April 10, 2016, 10:07:21 PM
Quote from: DJ Omnimaga on April 10, 2016, 09:56:37 PM
Aw too bad. Actually the speed isn't that bad but As as ssb game some people might find it too slow. On the CE the speed would be twice faster at least so perhaps it could be playable there? You would need to test with Wabbitemu CSE at 200% speed, tho.

Also that character looks cool.
It's possible that if I get a CE, this would be a CE-only game, and I'd pick it back up. But as I have no reliable way to test for the CE (and DCE isn't even out yet), it'd be pointless to try.
It was hard to fit that much detail in 8x8, and some of the "animations" I'd already created look pretty bad.
Title: Re: Super Smash Bros CCM
Post by: Dream of Omnimaga on April 11, 2016, 12:16:30 AM
Well, for the most part, all you need for CE testing (xLIB at least) is a CSE emu set to 200% speed.
Title: Re: [TI-84+CSE] [Hybrid BASIC] Super Smash Bros CCM
Post by: Dudeman313 on April 11, 2016, 12:44:50 PM
Yeah, maybe a CE would be able to run it. Unfortunate to have to drop it so soon. It looks nice.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 14, 2016, 04:34:41 AM
On a side note, have you experimented with scrolling wrapping around like in my Tunnel game? Kerm also made a Flappy Bird clone using that technique. If all you did was update and erase one block every frame, along with moving the character around, then I wonder how fast a jump game would run? Like this game, for example:

http://www.ticalc.org/archives/files/fileinfo/432/43207.html


Or you could just use rectangles if they're faster than sprites. With rectangles you could even draw and update longer platforms and scroll further as the game progresses. Wrapping around is insanely difficult, though >.<
Title: Re: xLIBC Experimental Games
Post by: 123outerme on April 16, 2016, 01:26:20 AM
Quote from: DJ Omnimaga on April 14, 2016, 04:34:41 AM
On a side note, have you experimented with scrolling wrapping around like in my Tunnel game? Kerm also made a Flappy Bird clone using that technique. If all you did was update and erase one block every frame, along with moving the character around, then I wonder how fast a jump game would run? Like this game, for example:

http://www.ticalc.org/archives/files/fileinfo/432/43207.html


Or you could just use rectangles if they're faster than sprites. With rectangles you could even draw and update longer platforms and scroll further as the game progresses. Wrapping around is insanely difficult, though >.<
It's definitely possible that I could do that. I might have to try it. I was trying out a physics platformer myself (with 4 pixel-based movement instead of 8 ) but unfortunately, it's pretty tough to get it precisely right.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 16, 2016, 07:46:34 AM
Yeah I never had any luck with 4 pixels movement so far. I tried in my RPG but I couldn't get it right the first time around. That said, I was using tilemaps, which might not be necessary for the jump game example above (since you just draw a tiny rectangle to make platforms scroll then erase the other end with a rectangle that is the same color as the background.
Title: Re: xLIBC Experimental Games
Post by: 123outerme on April 17, 2016, 04:37:53 PM
Quote from: DJ Omnimaga on April 16, 2016, 07:46:34 AM
Yeah I never had any luck with 4 pixels movement so far. I tried in my RPG but I couldn't get it right the first time around. That said, I was using tilemaps, which might not be necessary for the jump game example above (since you just draw a tiny rectangle to make platforms scroll then erase the other end with a rectangle that is the same color as the background.
I could post my code, just so you can see what I'm currently doing with that. The only problem with the best version I have is that you fall through the left half of blocks. I've been trying to fix it, but no luck yet.
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: 123outerme on April 18, 2016, 02:50:49 AM
It appears I've lost my top secret .gif somewhere...






(http://i.imgur.com/5I9U53g.gif)
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: Snektron on April 18, 2016, 09:26:09 AM
Looks pretty good, keep up the good work :)
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 18, 2016, 03:34:32 PM
Hm interesting. Is this supposed to be a strategy game like those old NES/SNES ones where you had a world map, but with the ability to zoom in to conquer lands? I am curious about what are your plans with this. :)
Title: Re: xLIBC Experimental Games
Post by: 123outerme on April 18, 2016, 06:50:22 PM
Quote from: DJ Omnimaga on April 18, 2016, 03:34:32 PM
Hm interesting. Is this supposed to be a strategy game like those old NES/SNES ones where you had a world map, but with the ability to zoom in to conquer lands? I am curious about what are your plans with this. :)
Yeah, so far I'm planning to combine Fire Emblem with Empire Earth. Build a large army and organize them into different formations (attack formation, defending formation, etc.). Build many bases (I'll probably have randomly generated empty castles, then conquer them as you see fit). I might try to have a multiplayer mode, but I'm not quite sure how that'd work out. I'd at least have a 1-player vs AI mode.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 18, 2016, 09:48:20 PM
Aah cool. Is it more like Lord of the Realms in the way that you build everything first then wait until the very end before attacking? Or is it more like Starcraft and Command and Conquer where you have to defend while you build as well?
Title: Re: xLIBC Experimental Games
Post by: 123outerme on April 19, 2016, 12:23:01 AM
Quote from: DJ Omnimaga on April 18, 2016, 09:48:20 PM
Aah cool. Is it more like Lord of the Realms in the way that you build everything first then wait until the very end before attacking? Or is it more like Starcraft and Command and Conquer where you have to defend while you build as well?
Ideally you'll have to defend attacks while you build your army. I'm not sure how the execution of that idea will play out, though.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 20, 2016, 06:26:46 AM
For a TI-BASIC RTS, you'll definitively need to have some scripted events that happens based on some of your actions, as well as randomized ones. Enemies probably won't be able to move all at the same time each loop for speed reasons, so maybe 1 set of enemies could move at a time but only 2 units at once. Or they could just not move altogether then warp instantly near your base while you're not looking. It will most likely have to be some sort of hybrid between turn-based and real-time.
Title: Re: xLIBC Experimental Games
Post by: 123outerme on April 25, 2016, 09:26:42 PM
Quote from: DJ Omnimaga on April 20, 2016, 06:26:46 AM
For a TI-BASIC RTS, you'll definitively need to have some scripted events that happens based on some of your actions, as well as randomized ones. Enemies probably won't be able to move all at the same time each loop for speed reasons, so maybe 1 set of enemies could move at a time but only 2 units at once. Or they could just not move altogether then warp instantly near your base while you're not looking. It will most likely have to be some sort of hybrid between turn-based and real-time.
That's a good idea, thanks! Currently, I've only planned to have 1 enemy kingdom, but if I can I'll try to add more.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on April 26, 2016, 02:17:45 AM
DO you mean 1 kingdom as in the game would have two factions like in Command and Conquer, but you would only be able to use the ally faction?
Title: Re: xLIBC Experimental Games
Post by: 123outerme on May 11, 2016, 10:14:16 PM
Quote from: DJ Omnimaga on April 26, 2016, 02:17:45 AM
DO you mean 1 kingdom as in the game would have two factions like in Command and Conquer, but you would only be able to use the ally faction?
I mean that there are only 2 factions: Yours, and your opponents. There are unused castles scattered around the map, but they don't belong to anybody. I also had the idea of adding special abilities. Like one makes it so that your troops are 1.1x stronger than the enemy, or that you can produce troops faster, or an attack "spell", or something like that. You could choose one at the start of the game, and that's the only one you get. Of course, I'll have to balance those abilities out if that's the case.

Also, I was talking to JWins and got an idea to create a sort of spiritual successor to Source Seekers in xLIBC, as sort of a puzzle/action hybrid as the first one was. With my programming skills being much better than they were when I created Source Seekers, I feel like I could create a better game that still feels the same.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on May 11, 2016, 10:51:39 PM
The unused castles could maybe do nothing but give you extra gold or stuff like that? Or maybe there could be abandoned farms that you can capture in order to increase your maximum unit cap?

And yeah the goal for a strategy game is to ensure it's well-balanced. Have for example units strong and weak against specific stuff on each side, so that you have to choose the right army composition to win.


As for a new Source Seekers that would be cool. I liked the original, but something in color (even if ASCII) would be great.
Title: Re: xLIBC Experimental Games
Post by: 123outerme on May 11, 2016, 11:12:27 PM
Quote from: DJ Omnimaga on May 11, 2016, 10:51:39 PM
The unused castles could maybe do nothing but give you extra gold or stuff like that? Or maybe there could be abandoned farms that you can capture in order to increase your maximum unit cap?

And yeah the goal for a strategy game is to ensure it's well-balanced. Have for example units strong and weak against specific stuff on each side, so that you have to choose the right army composition to win.


As for a new Source Seekers that would be cool. I liked the original, but something in color (even if ASCII) would be great.
I plan for the abandoned castles to be points where the most action takes place, as these are the castles you can capture. If you capture one, you get increased benefits, which I plan to make increased troop production (possibly, if so, just by a little), being closer to the main enemy castle, etcetera. I'll definitely make sure balance is there, since strategy is more or less about doing better with what you have than the opponent does.

For the new Source Seekers, I might reuse some graphics from other projects, and possibly discard a direct story connection to Source Seekers. I'll probably create all new background/world tiles (stuff like grass, trees, etc.) but copy over the character sprite from SoU. I plan to especially bring out the puzzle combat from Source Seekers, since I think that was the reason why it wasn't terrible. Gaining new weapons, solving puzzles with them, etc. was probably the majority of the fun that happened.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on May 12, 2016, 05:16:40 AM
Oh i see you have an use for the abandoned castle already. That's good. Maybe treasure chests could be scattered in some areas?
Title: Re: xLIBC Experimental Games
Post by: 123outerme on May 12, 2016, 06:57:04 PM
Quote from: DJ Omnimaga on May 12, 2016, 05:16:40 AM
Oh i see you have an use for the abandoned castle already. That's good. Maybe treasure chests could be scattered in some areas?
Possibly, I'll try to add random items to the map (it may be just that the winning force in a battle picks up any items left there).
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on May 12, 2016, 07:01:26 PM
That could work too. My idea though was more like Warcraft III, but without neutral enemy forces. Basically in some hard to reach map spots you can encounter enemies that guards gold mines or treasures and then it gives you a big boost. Maybe treasures could also includes extra troops (eg troops held hostage that are freed up by killing the neutral enemies)
Title: Re: xLIBC Experimental Games
Post by: 123outerme on May 12, 2016, 07:24:27 PM
Quote from: DJ Omnimaga on May 12, 2016, 07:01:26 PM
That could work too. My idea though was more like Warcraft III, but without neutral enemy forces. Basically in some hard to reach map spots you can encounter enemies that guards gold mines or treasures and then it gives you a big boost. Maybe treasures could also includes extra troops (eg troops held hostage that are freed up by killing the neutral enemies)
Sounds like a good idea! I'll have to do that if I can.
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: c4ooo on October 15, 2016, 02:53:38 AM
Quote from: 123outerme on April 18, 2016, 02:50:49 AM
It appears I've lost my top secret .gif somewhere...
(http://i.imgur.com/5I9U53g.gif)
@123outerme do you happen to still be working on this? If not, you should let me steal the sprites; I really like the art style :3
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: 123outerme on October 19, 2016, 10:48:51 AM
Quote from: c4ooo on October 15, 2016, 02:53:38 AM
Quote from: 123outerme on April 18, 2016, 02:50:49 AM
It appears I've lost my top secret .gif somewhere...
(http://i.imgur.com/5I9U53g.gif)
@123outerme do you happen to still be working on this? If not, you should let me steal the sprites; I really like the art style :3
I don't mind if you steal the sprites. There's a chance I might still work on this but I don't mind sharing an aesthetic with another project. Once I get back to my computer I'll pm you it.
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on October 19, 2016, 04:25:22 PM
Wow I remember this. I liked the zooming into a bigger map in particular. :)
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: c4ooo on October 19, 2016, 07:17:06 PM
Hmm, after doing pixart myself for a week i see how big of a problem the tiles not blending together is >_>
Title: Re: xLIBC Experimental Games
Post by: 123outerme on October 20, 2016, 01:06:09 PM
Quote from: DJ Omnimaga on October 19, 2016, 04:25:22 PM
Wow I remember this. I liked the zooming into a bigger map in particular. :)
I thought that was a smart way to do an RTS of sorts. I hope I can finish SoU and my other projects so I can try to finish this.
Quote from: c4ooo on October 19, 2016, 07:17:06 PM
Hmm, after doing pixart myself for a week i see how big of a problem the tiles not blending together is >_>
Yeah, the tree tiles in particular definitely don't blend nicely.  Idk what I'll do to fix that, but go ahead and make suggestions or changes if you want.
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: c4ooo on October 20, 2016, 01:21:53 PM
Thanks for sending the PM :)
Right now the game ime working on has 24*24 sprites, so i cant really use yours at the moment, but thanks anyways :)
Title: Re: xLIBC Experimental Games
Post by: Dream of Omnimaga on October 20, 2016, 08:11:18 PM
What I usually do to make sure that stuff is tiled properly is try to mirror the second half or parts of it. That might not be practical for all kind of small graphics, though.
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: c4ooo on October 20, 2016, 08:15:59 PM
The thing is - the edges of the tiles look really, but over all it has this charm to it. So its kinda bittersweet :)
Title: Re: [TI-84+CSE] [Hybrid BASIC] xLIBC Experimental Games
Post by: 123outerme on October 21, 2016, 03:37:34 PM
Quote from: c4ooo on October 20, 2016, 08:15:59 PM
The thing is - the edges of the tiles look really, but over all it has this charm to it. So its kinda bittersweet :)
I'm glad you like my tiles! If you need me to, I can create some 24x24 ones for you, in the same style I did this.