You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[CSE Hybrid Basic] Aqua Wars

b/Calculator Development Started by 123outerme, August 10, 2015, 01:13:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

u/Dream of Omnimaga 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.
u/123outerme August 18, 2015, 04:30:37 PM
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.
u/Dream of Omnimaga 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?
u/123outerme August 18, 2015, 04:45:53 PM
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.
u/Dream of Omnimaga 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.
u/tr1p1ea August 18, 2015, 10:09:33 PM
Wow this looks really cool! I love how fast it moves as well :).
u/c4ooo August 18, 2015, 10:23:39 PM
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.
u/Dream of Omnimaga 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.
u/c4ooo August 19, 2015, 03:33:46 AM
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.
u/Dream of Omnimaga August 19, 2015, 04:14:35 AM
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.
u/c4ooo 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?
u/123outerme 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.
Last Edit: August 19, 2015, 04:00:25 PM by 123outerme
u/Snektron August 19, 2015, 07:31:48 PM
You know what would be cool? Procedurally generated land :P
u/c4ooo August 19, 2015, 10:54:17 PM
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.
Last Edit: August 19, 2015, 11:45:39 PM by c4ooo
u/123outerme August 20, 2015, 01:39:24 AM
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.
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal