This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - deeph
Pages: 1 2 3 [4] 5 6 ... 10
46
« on: March 15, 2013, 02:35:26 pm »
But how will you check with coordinates ? because I guess that you won't have a "If X=... and Y=..." for every trainer, will you ? Or maybe having with another data list with the form "x1,y1,x2,y2,...,xn,yn", and for every trainer, finding the k so that X=xk and Y=yk would be possible, but once again, wouldn't adding a data list be in opposition with the aim of saving space ?
How are you handling that right now ? When the player has beaten a trainer, you have to save it somewhere, right ? Not by modifying the map itself I guess. That said, using a single tile for all trainer may not be the most optimised thing to do whereas using differents one per trainers and per maps might be better (and takes less than 127 different ones)... I'll try to encode your map just to see how many bytes you can gain.
47
« on: March 15, 2013, 11:47:16 am »
Yeah, I figured out that it would look like something like that, and it took me an entire week to code the tilemapper in ASM, hence why I said that I could not manage to code another piece of code with two "for loops" one in another Or there might be a way to get it with only one "for loop" by putting x and y in one number (like a=y*256+x or something). Or maybe you were not thinking about me making this in ASM but in Axe ? That would work
You can do it in both asm and axe, and if you need help to do it in asm, you can create a topic and post your current code. But how do you start a new game ? You have to restore the map, and "the only way" to do that is to have a copy of an untouched map somewhere, so I thought that instead of having 2 different maps, one untouched, the other one being the map for the current game, I'd only deal with one map that never moves.
Oh you mean modifying the map datas from the game ? Yeah that's not a good solution since you may have to restore it. I don't know how you handle trainers right now, but for my part I think I'm just going make a list of them (within the players datas), and modify it when they are beaten. When the player will past by the trainer's tile (the same for all), I'll just check from the coordinates who it is. That could work to optimize the map, but for all the methods, there is to choose between compressing the map and adding code to uncompress it, or saving code with an uncompressed map, and for this method, I feel like keeping track of all maps and get to know which one the player must go to would add more code than it saves space
Yeah in axe maybe, but in asm I'm sure you'll gain space even with some more code to handle different compressed maps. 10ko only for maps is kind of huge, and as far as I remember Pokémon Topaze maps weren't that vast, no ?
48
« on: March 15, 2013, 10:21:11 am »
If you're planning to do it in asm, space won't be an issue I think. Woah, I don't think I'll manage that
You just need to know 3 things : the uncompressed map width and x/y offsets. Then you can do something like this (can be a lot optimised, though) : counter = 0 for x=0 to screen_width/tile_width for y=0 to screen_height/tile_height tile_number = offset_x+x+(offset_y+y)*map_width while tile_number-compressed_map(counter) > 0 ; substract the current length of same tiles to our tile ID until zero or less counter+2 ; to get the next length of tiles end counter+1 ; to get the tile number draw_tile(x, y, counter) end end However with chickendude's tip you'll have to check the sign flag first, and if it's on, only increase the counter to 1, unless that's the tile we want (if so, reset it). There surely is, but I didn't find any way to do it without modifying the map
Why won't you want to modify it ? That's the only way to optimise it I think you can still use the same system (each trainer = a tile) if you divide the map into smaller ones, this way you can reuse some tiles for different trainers, and to check who it is just compare with the map ID (you'll have of course to save it with the list of beaten trainer, but it would just take one more byte and will allow you to use less than 127 different tiles).
49
« on: March 15, 2013, 06:55:24 am »
You can still read it from the archive, while uncompressing it to ram, no ? Or even read the tiles to draw or check for events from the compressed archived map on the fly.
And I'm sure you can use another method to handle trainers, one where you don't have to assign a specific tile to each trainer.
50
« on: March 15, 2013, 04:14:30 am »
If your maps didn't use more than 127 tiles, then you could use bit 7 to mark that it's just one tile. Normally you would do something like .db 1,tileNumber, which actually adds a byte. I do: .db tileNumber+$80, which is the same as the uncompressed size. That way your RLE-compressed maps will never be larger than the uncompressed versions.
That's pretty clever ! Using the sign flag this way would definitely save a lot of bytes, thanks for the tip
51
« on: March 14, 2013, 04:08:12 pm »
Yeah, it is true that I have a lot of zeroes in fact. But since no part of the map is a perfect rectangle, there would still be some waste even with divisions. And in fact, I even have tiles using numbers up to 229 Each trainer that you have to beat (those who block the road) have an associated number. This way, when you bet them, you don't have to beat them again. Maybe there is a better way to code it but for now, I have a lot of numbers You could use the same tile for every trainers, then just check which one it is when the player walk by (by comparing the coordinates of the "sight length" with the player's ones). This way RLE would be more efficient. But my program only used arrow keys, which are all in the same group so it was not hard yet. Well, you'll just have to change the key group (see this for example). Lol, why would I play on a 76.fr when I have a 83+ and a 84+SE ? I don't know, just to make it less useless ? And I am not sure that reading other's codes would help a lot seeing how hard it already was to understand and debug mine when I made it But yeah, if you know some overcommented code that I could read, that could be useful for me or others Contra has recently started an excellent serie of code review on his website : http://www.ti-84-plus.com/ti-84-plus-code-review.php , and there's plenty of code explaination over yN.
52
« on: March 14, 2013, 03:23:30 pm »
Yeah, the map is in one block. Why would dividing it in small parts take less space ? And how to use RLE on a map that takes values between 0 and 170 ? Because I believe you've filled the space between maps with 0 just to make sure that when we scroll near the border of a map we don't see another one, no ? Also, you're really using 170 different tiles ? I don't remember seeing such a diversity on maps The real problem was that the routine I found (don't remember where) that handles the keyboard was a pain (used groups of keys or I don't know what) That's direct input, which is fairly well explained in a lot of tutorials (for example : http://tift.tuxfamily.org/asmpourlesnuls.html ). It's not that hard to understand, the thing is that the keyboard is divided into parts, and you have to specify it to the keyboard port before reading a key state. Aww man, I just looked around in my ASM folder, reading some old code, and it brought back so many memories, when I was full of hope, thinking about coding Pokemon Topaze in ASM And I just ran that scrolling-map program again, it really works well and all I think I should try ASM again some day, I just need to find a proper routine to handle keys You still can, just to be able to play it on a TI 76.fr Also, you should try to read other's code, it helps a lot (you can look at mine, but it sure isn't as commented as it should be). And don't hesitate to ask for help here or on french forums, it's always good to help people join the restrained circle of asm z80 programmers
53
« on: March 14, 2013, 01:38:24 pm »
Nope, It has too much data -.-° Even the map itself already takes more than 10 000 bytes.
All maps are grouped together ? I think you could gain a lot a space by dividing it into smaller parts and/or using some compression (the easiest one is RLE). And no, I don't mind you using some of my sprites, I stole some from tifreak (with his permission) so I won't say anything to anyone using mine
Thanks Well I understood pointers (that helped for Axe ) and know what the main instructions do but I don't know how to do what I want then There is absolutely no command for nothing. That is of course an advantage, but it is also a drawback sometimes. At least, thanks to the basic knowledge I acquired in ASM, Axe became very easy to pick up
There are many rom calls which are very useful and aren't that slow (in my case I'm mainly using maths rom calls so I can stick to the originals formulas during battles). I think the only thing you really have to understand is how to interact with the LCD (using pre-existant routines or not, such as _ionfastcopy). Once you know how to draw sprites, that's pretty much it, you're ready to program great games.
54
« on: March 14, 2013, 12:42:11 pm »
Optimised ASM programs can be much smaller than Axe ones, further more if you uses some compression (RLE etc...). I'm pretty sure Pokémon Topaze can fit in 27ko (the original Pokémon Blue fits in only 1Mo, using lot of compressions methods, even if the GB hardware help to handle sprites and such). In fact I started my own adaptation of pokémon to the TI 83/83+ : Pokémon Monochrome, it's not as developped as Pokémon Topaze but with the tilemapper, menus and battles almost finished, I'm currently at ~10ko (and without using any compression). By the way, I think I'm using one or two tiles/sprites from your project, I hope you don't mind... (It's a bit off-topic but I haven't planned to start topics everywhere about it unless I'm sure to finish it...) Well in fact, I tried ASM before Axe, but failed miserably so I chose Axe instead.
Did you tried asking some help ? ASM is kind of hard when all you've ever programmed in are high-level langages (basic), but once you understood some concepts (pointers...) and learned how to use the main instructions, it becomes way easier. There are also a lot of libs to help you making some nice games fairly quickly (I'm using GBA Lib 2 (which looks a lot like GBA Lib 1), mainly because its mapper is way better than mines).
55
« on: March 14, 2013, 12:01:09 pm »
The TI 83-like aren't that bad (unless you're only programming in Axe, which unfortunatly seems to be the case). I started programming with a TI 82 STATS and I keep try to cross-compile my asm projects so they can run on both 83&83+. Maybe it's time to switch to asm
56
« on: March 14, 2013, 11:45:21 am »
The choice was made by TSP promotion, and come on, I'm sure it can still be useful to anyone in your entourage :p
57
« on: March 14, 2013, 11:41:15 am »
It still prints "AAARGH!".
58
« on: March 14, 2013, 11:34:39 am »
Hayleia > Originally there was no prizes to win with the zContest (it was purely honorific), but Contra kindly managed to find us sponsors that agreed to gives us free ones. So I'm sorry if you don't really appreciate the TI 76.fr, but keep in mind it was better than nothing.
59
« on: March 14, 2013, 06:26:21 am »
Well, this new test says "AAARGH!" now... Strange
60
« on: March 13, 2013, 05:31:31 pm »
I can't be more sure, I've copy-pasted it in TI-Graph Link and just to be sure I've also type it by hand.
And it sure says 69 (it's an old TI 84+ SE, I got it in 2006 if I remenber correctly, and I'm using OS 2.55MP).
But now with this new test it seems ok (no RAM cleared or AAARGH!, it just quits when I press Clear).
Pages: 1 2 3 [4] 5 6 ... 10
|