Join us on Discord!
You can help CodeWalrus stay online by donating here.

[CSE Hybrid Basic] Aqua Wars

Started by 123outerme, August 10, 2015, 01:13:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dream of Omnimaga

Couldn't the wall tiles just change as you progress further in the game? I feel that if every wall is identical through the entire game it could get boring and less original after a while. It could even be just a change in hue.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

123outerme

Quote from: DJ Omnimaga on August 18, 2015, 04:28:29 PM
Couldn't the wall tiles just change as you progress further in the game? I feel that if every wall is identical through the entire game it could get boring and less original after a while. It could even be just a change in hue.
You mean the large wave tiles, or the rock tiles? I'm confused.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Dream of Omnimaga

Yeah the rock and beach tiles. Unless the blue things on the side of the screen are not rocks?
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

123outerme

Quote from: DJ Omnimaga on August 18, 2015, 04:32:02 PM
Yeah the rock and beach tiles. Unless the blue things on the side of the screen are not rocks?
They are rocks. I was thinking that maybe in the future I could add map packs after I'm finished, so that the same overworld won't get boring. Obviously, the port stuff like town names, jobs available, etc would stay the same, but the map layouts would change. My only problem with adding new content is that as it is I'm almost at 9000 bytes :'(
But I might add a tiny scripted sequence where a new path opens up, an existing feature is destroyed, etc. Maybe then that feature will open up a portal or something? I don't know.
Also, speaking of my 9000 bytes of a tech demo, is there any speedy way to compress map data? The only way I can think of is just displaying a map with no features, then running a loop with If conditionals to draw certain sprites (or lists of sprites) in certain areas. Obviously that would be painfully slow, and not what I'm looking for.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Dream of Omnimaga

There are probably ways to compress data in basic explained on TIBD, but they are most likely very slow. You could always do what I did in FF:MF if your maps are simple, though.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

tr1p1ea

Wow this looks really cool! I love how fast it moves as well :).

c4ooo

IMHO, storing this type of game as a tile map is inaficiant. I would try storing beaches and ports using vectors or something. And there is no point having a bunch of water tiles. If you are gona store the whole thing as a tilemap, then the compression I would recomend is this: if a tile is a water tile, then the next piece of data in the map will tell the game how many water tiles follows the current tile. As I notice your water tiles come in several types (right?, just have the renderer select a random sprite for the water tile.
It's a bit hard to explain but I hope you get what I mean.

Dream of Omnimaga

Actually the solution would probably be to fill the entire screen with water tiles but I don't know if a command exists in DCSE to fill the screen or an area with just 1 tile in particular. He could always use DrawSpriteA with a 1x8 tile grid and a For loop to avoid massive slowdowns, though. Then he would draw the borders he need. Random water tiles might not be an option, though, because he might come back to the previous map and it would look weird if a map changed on every visit.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Quote from: DJ Omnimaga on August 19, 2015, 02:10:25 AM
Actually the solution would probably be to fill the entire screen with water tiles but I don't know if a command exists in DCSE to fill the screen or an area with just 1 tile in particular. He could always use DrawSpriteA with a 1x8 tile grid and a For loop to avoid massive slowdowns, though. Then he would draw the borders he need. Random water tiles might not be an option, though, because he might come back to the previous map and it would look weird if a map changed on every visit.
No, you are wrong ;)  Its the non random tiles that would look weird.  Water, after all, does move.

Dream of Omnimaga

True, but since it would not move during the entire time he stands in the screen then suddenly move when he moves back and forth, then that would either look weird or inconsistent.

Also if he doesn't want to use tilemaps to avoid wasting space on such simple maps, then how would he preserve the way water looks like as he moves over it? The CSE hybrid language works way differently than in Axe, c4ooo.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

I can describe a basic system to do this (spoiler: simple noise (not simplex)). But first, how exactly is the tilemap stored (in the file)? In an appvar? List? Matrix? Second, how exactly  do you communicate with xlib, telling it what tiles to draw?. The most important question is: how do you store the map in the first place?

123outerme

#41
Quote from: DJ Omnimaga on August 18, 2015, 09:33:33 PM
There are probably ways to compress data in basic explained on TIBD, but they are most likely very slow. You could always do what I did in FF:MF if your maps are simple, though.
How did you compress in FF:MF? ???

Quote from: tr1p1ea on August 18, 2015, 10:09:33 PM
Wow this looks really cool! I love how fast it moves as well :).
Thanks!

Quote from: c4ooo on August 19, 2015, 05:58:56 AM
I can describe a basic system to do this (spoiler: simple noise (not simplex)). But first, how exactly is the tilemap stored (in the file)? In an appvar? List? Matrix? Second, how exactly  do you communicate with xlib, telling it what tiles to draw?. The most important question is: how do you store the map in the first place?
I have a set of If commands that check which map you're on, then load the specific tilemap data into a string, then is displayed. The only way to store tilemaps is through strings. I suppose I could store it in the tileset AppVar, but I'll have to test if that messes anything up.

Edit: The tileset appvar becomes corrupted. Sadly, I can't store anything else in there.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Snektron

You know what would be cool? Procedurally generated land :P
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


c4ooo

#43
Quote from: 123outerme on August 19, 2015, 03:37:43 PM
Quote from: DJ Omnimaga on August 18, 2015, 09:33:33 PM
There are probably ways to compress data in basic explained on TIBD, but they are most likely very slow. You could always do what I did in FF:MF if your maps are simple, though.
How did you compress in FF:MF? ???

Quote from: tr1p1ea on August 18, 2015, 10:09:33 PM
Wow this looks really cool! I love how fast it moves as well :).
Thanks!

Quote from: c4ooo on August 19, 2015, 05:58:56 AM
I can describe a basic system to do this (spoiler: simple noise (not simplex)). But first, how exactly is the tilemap stored (in the file)? In an appvar? List? Matrix? Second, how exactly  do you communicate with xlib, telling it what tiles to draw?. The most important question is: how do you store the map in the first place?
I have a set of If commands that check which map you're on, then load the specific tilemap data into a string, then is displayed. The only way to store tilemaps is through strings. I suppose I could store it in the tileset AppVar, but I'll have to test if that messes anything up.

Edit: The tileset appvar becomes corrupted. Sadly, I can't store anything else in there.
How do you store a tile map in a string? Is like "A" the first tile, "B" the second ect? Also quick question, do you store the current map the boat is on with a single value (good) or an X and Y value (bad)?
Edit: storing the map as two separate values may not be so bad, it just depends on your structure of if statements.

123outerme

Quote from: c4ooo on August 19, 2015, 10:54:17 PM
How do you store a tile map in a string? Is like "A" the first tile, "B" the second ect? Also quick question, do you store the current map the boat is on with a single value (good) or an X and Y value (bad)?
Edit: storing the map as two separate values may not be so bad, it just depends on your structure of if statements.
A tilemap is stored as a series of two digit numbers representing a tile in the appvar (00 is in the very top left, 01 directly under, etc). There are two-digit numbers for every tile displayed onscreen.
I use one variable and either add/subtract 1, or add/subtract 3, since there are 9 maps total, in a 3x3 grid.
  • Calculators owned: TI-84+CSE, TI-nspire Clickpad, TI-84+SE

Powered by EzPortal