fragmare
Punkic Cyborg
Posts: 116
Homebrew skills: Graphics, Music, Level Design, Annoying Programmers
|
Post by fragmare on Mar 28, 2019 6:07:39 GMT
Maybe he's really disappointed by all the works he has done for nothing with PC Gunjin & Xymati (which is understandable). Nahh, I don't want you think I shot you down. I just don't have any compositional skill for making music out of my head. If I've got a melody or something rolling around in my head, I don't have enough musical knowledge to easily bang it out into a song. Notice how my chiptunes are mostly covers? If you want music that somebody else has already composed, but done on the HuC6280 sound chip, I've got you covered. Big time, lol. Especially if it's powerful, banging tunes the PCE usually isn't known for. I just don't really compose. Think of me more as a sound engineer, in that regard, and not a musician. Pixel art and game graphics, on the other hand, I can draw whatever i want straight out of my head. For some reason i'm much more fluent with visual art. Now, THAT stuff, i can help you with, if you need some created.
|
|
|
Post by gredler on Mar 28, 2019 6:32:14 GMT
Sorry sir, I must have confused you for someone else. On the old forum we asked someone, who I though was you, who said they didn't want to work on our game. I would take you up on the art assistance but that would eleminiate DKs use for me! We actually don't need original tunes, I think DarkKobold (the programmer and mastermind of the game) and I are more than fine to use royalty free music. I'll send you a PM about specifics as not to further derail Elmer's HuC thread. It would be fantastic to get even one song and a handful of sfx for Elmer to use as proof of concept in finishing his deflemask sound engine for HuC, so maybe we can work something out!
|
|
fragmare
Punkic Cyborg
Posts: 116
Homebrew skills: Graphics, Music, Level Design, Annoying Programmers
|
Post by fragmare on Mar 28, 2019 7:18:23 GMT
Sorry sir, I must have confused you for someone else. On the old forum we asked someone, who I though was you, who said they didn't want to work on our game. I would take you up on the art assistance but that would eleminiate DKs use for me! We actually don't need original tunes, I think DarkKobold (the programmer and mastermind of the game) and I are more than fine to use royalty free music. I'll send you a PM about specifics as not to further derail Elmer's HuC thread. It would be fantastic to get even one song and a handful of sfx for Elmer to use as proof of concept in finishing his deflemask sound engine for HuC, so maybe we can work something out! sounds good to me, shoot me a pm sometime
|
|
hubowski
Deep Blooper
Posts: 15
Fave PCE Shooter: Blazing Lazers
Fave PCE Platformer: Ninja Spirit
|
Post by hubowski on Mar 29, 2019 22:44:07 GMT
Thank you for pointing me here gredler. Basically my initial approach was as per your comment earlier - I though map is just storing some form of index between a tile index and map coords, when the tiles file, with indexed tiles decorates it. I got slightly lost when I opened up a .fmp file in Mappy and saw not only a fully decorated map but a tile set to pick&brush. My apologies if my question is silly - I am collecting and printing materials for a longer study in the coming weeks. I have some programming knowledge in various languages but despite being a gamer...I never wrote a complete game Thank you!
|
|
|
Post by gredler on Mar 30, 2019 0:08:51 GMT
If you're using mappy you must create your tile set (art) in a separate program then mappy; Photoshop, gimp, delux paint, grafx2, paintshop pro, etc. The mappy workflow is such that you load your tileset into mappy, then use mappy to create your tilemap. The FMP it exports is basically coordinates for where each tile from the tileset is located in the tilemap.
The nice thing about Pro Motion is that you're able to create the tileset (the art within each square tile), and placement of each tile from that set all within one program. This also allows you to draw on your tilemap to generate the tile set.
I have been meaning to put together some tutorials on creating the art, so please let me know what hurdles you find yourself hitting and I'll do my best to answer them and will have more guidance on what to focus on for the tutorials.
|
|
hubowski
Deep Blooper
Posts: 15
Fave PCE Shooter: Blazing Lazers
Fave PCE Platformer: Ninja Spirit
|
Post by hubowski on Mar 30, 2019 11:55:56 GMT
|
|
|
Post by gredler on Mar 30, 2019 16:07:22 GMT
Generally that was my 1st though - map is just a set of coords and tile indexes. My understanding was it is probably more convenient than declaring a large array in the code itself...until I loaded a .fmp to mappy and saw tiles on the right as per my screenshot. That is confusing me the most - if it has tile in it (in .fmp) why to load it again? Thank you for your patience A programmer can better answer what's happening in the data for the .fmp and code, but I am happy to move the conversation along and try my best to explain so please take this as a guess and hopefully I get confirmed or corrected. A tile map contains 3 main elements. The first set of data is an index of each tile from the tile set which was loaded into mappy to create the tilemap (0/191 still blocks in your screenshot). Index 0 is the first tile, black. Index 1 is the second tile, blue. Index 2 is the third tile, the top left corner of the cloud. Hopefully this makes sense so far. The second set of data are the palettes each tile index is referencing. I can't remember what the palettes were on the bonk/obey brew tilemap (it might just be one palette to be more simplistic), so this is made up, but for the sake of explaining please bear with me. Tile index 0 is always the background color and empty of pixel data references from the loaded image, the cloud tiles in indexes 1-60 are the blue and white palette, and the tiles in indexes 150-191 are the browns for the floor tiles. The third set of data is the coordinates where each tile index is located within the map. So in your example 0,0 is referencing tile index 1, and it looks like 0,3sh is referencing tile index 2 (top corner of cloud) - and these are using the blues pallete. While 0, 14 is referencing the browns palette. The FMP is a reference file, containing no pixel data. Just coordinates. It says "cut this image into these quadrents", then says "put a number value on each quadrent", then "place this quadrant here, and use this palette for that quadrent." This means you need open mappy, and then load an image containing the tiles the map will be referencing. The reason you can see the tiles in mappy is the program is loading the image the same way memory would load the image, but you're creating the coordinate system to save out as a .fmp. Hopefully this is correct and is helpful
|
|
|
Post by elmer on Mar 30, 2019 20:55:30 GMT
The nice thing about Pro Motion is that you're able to create the tileset (the art within each square tile), and placement of each tile from that set all within one program. This also allows you to draw on your tilemap to generate the tile set. Don't forget, the current version of HuC contains an example project that shows the use of Promotion's tilemapping capabilities. I have been meaning to put together some tutorials on creating the art, so please let me know what hurdles you find yourself hitting and I'll do my best to answer them and will have more guidance on what to focus on for the tutorials. At some point, I'm really going to have to show you how to get beyond HuC's current primitive mapping capabilities, and into creating art closer to the way that the professionals did it back then. Still using ProMotion, but without using ProMotion's tileset (except as a guide/helper).
|
|
hubowski
Deep Blooper
Posts: 15
Fave PCE Shooter: Blazing Lazers
Fave PCE Platformer: Ninja Spirit
|
Post by hubowski on Mar 31, 2019 11:07:47 GMT
Generally that was my 1st though - map is just a set of coords and tile indexes. My understanding was it is probably more convenient than declaring a large array in the code itself...until I loaded a .fmp to mappy and saw tiles on the right as per my screenshot. That is confusing me the most - if it has tile in it (in .fmp) why to load it again? Thank you for your patience A programmer can better answer what's happening in the data for the .fmp and code, but I am happy to move the conversation along and try my best to explain so please take this as a guess and hopefully I get confirmed or corrected. A tile map contains 3 main elements. The first set of data is an index of each tile from the tile set which was loaded into mappy to create the tilemap (0/191 still blocks in your screenshot). Index 0 is the first tile, black. Index 1 is the second tile, blue. Index 2 is the third tile, the top left corner of the cloud. Hopefully this makes sense so far. The second set of data are the palettes each tile index is referencing. I can't remember what the palettes were on the bonk/obey brew tilemap (it might just be one palette to be more simplistic), so this is made up, but for the sake of explaining please bear with me. Tile index 0 is always the background color and empty of pixel data references from the loaded image, the cloud tiles in indexes 1-60 are the blue and white palette, and the tiles in indexes 150-191 are the browns for the floor tiles. The third set of data is the coordinates where each tile index is located within the map. So in your example 0,0 is referencing tile index 1, and it looks like 0,3sh is referencing tile index 2 (top corner of cloud) - and these are using the blues pallete. While 0, 14 is referencing the browns palette. The FMP is a reference file, containing no pixel data. Just coordinates. It says "cut this image into these quadrents", then says "put a number value on each quadrent", then "place this quadrant here, and use this palette for that quadrent." This means you need open mappy, and then load an image containing the tiles the map will be referencing. The reason you can see the tiles in mappy is the program is loading the image the same way memory would load the image, but you're creating the coordinate system to save out as a .fmp. Hopefully this is correct and is helpful Thank you very much for such a comprehensive answer. I did some trials and errors with exporting a .stm from ProMotion and loading it to Mappy and the behaviour was as anticipated - it asked me to provide a tile file in Mappy to decorate the map. By comparing the .fmp I took from ObeyBrew I noticed it is way bigger than a comparable map, exported from ProMotion. I suspect the .fmp from ObeyBrew had some metadata included, hence Mappy was showing the tiles already without asking me to provide the tile file? ProMotion looks very impressive - I am going to fully switch to it and get my head around it properly! Again, many thanks for all your help.
|
|
lunoka
Gun-headed
Diving into retrodev
Posts: 55
Homebrew skills: art, music
Fave PCE Shooter: Burning angels
Fave PCE Platformer: Ninja Spirit
Fave PCE Game Overall: Valis 3
Fave PCE RPG: Neutopia
|
Post by lunoka on Mar 22, 2022 22:20:04 GMT
Hello o/
I'm using the 3.99 version from 02/2022 Elmer's repo.
Playing with the set_color_rgb() function, I have no problem changing a color from the empty color slots or any already loaded palette for the background range ( 0-255 ). Unfortunately, if I can set a color for an empty color slot in sprite palette range, it seems to not work for a slot already used by a loaded sprite palette, meaning I can't change the colors in range 256-511 if palettes have been already loaded before ( so I can't create a blink effect or change the color of an enemy ship for example ).
Could anybody confirm that please?
Cheers
|
|
|
Post by elmer on Mar 22, 2022 22:53:36 GMT
Hmmmm ... nice resurrection of this old thread! I've just taken a quick look at the library source for set_color_rgb(), and it's doing something "clever" (i.e. VERY specific to HuC), that may have been broken years ago by Uli's changes without anyone else noticing. I'll have to write a test-case to see what the HuC compiler generates, and why, before I can understand what has broken, and if it can be fixed. In the meantime, the easiest way to get around this is to keep a shadow of the entire 16-colors that you wish to change one of, and then upload all 16 in the next vblank with the load_palette() HuC call. FWIW, set_color_rgb() seems like it is supposed to write directly to the VCE, which means 1) the color will change immediately, rather than the next frame, and 2) there will be a small sparkle/glitch onscreen, because the CPU is accessing the VCE during display time, which causes the VCE to repeat the previous color (while the CPU is keeping it busy) rather than displaying the proper color.
|
|
lunoka
Gun-headed
Diving into retrodev
Posts: 55
Homebrew skills: art, music
Fave PCE Shooter: Burning angels
Fave PCE Platformer: Ninja Spirit
Fave PCE Game Overall: Valis 3
Fave PCE RPG: Neutopia
|
Post by lunoka on Mar 23, 2022 8:24:18 GMT
Thank you elmer! I will try to use your method for now.
|
|
|
Post by elmer on Mar 25, 2022 1:19:19 GMT
I've just taken a quick look at the library source for set_color_rgb(), and it's doing something "clever" (i.e. VERY specific to HuC), that may have been broken years ago by Uli's changes without anyone else noticing. OK, I've just done a quick test, and I'm not seeing any problem with set_color_rgb() from that test. One thing about the routine that makes sense, but might not be what you expect, is that the R, G, and B values are all 0-7 and not 0-255. Anything outside the 0-7 range will definitely cause problems.
|
|
lunoka
Gun-headed
Diving into retrodev
Posts: 55
Homebrew skills: art, music
Fave PCE Shooter: Burning angels
Fave PCE Platformer: Ninja Spirit
Fave PCE Game Overall: Valis 3
Fave PCE RPG: Neutopia
|
Post by lunoka on Mar 25, 2022 8:39:17 GMT
I've just taken a quick look at the library source for set_color_rgb(), and it's doing something "clever" (i.e. VERY specific to HuC), that may have been broken years ago by Uli's changes without anyone else noticing. OK, I've just done a quick test, and I'm not seeing any problem with set_color_rgb() from that test. One thing about the routine that makes sense, but might not be what you expect, is that the R, G, and B values are all 0-7 and not 0-255. Anything outside the 0-7 range will definitely cause problems. Thank you for checking o/ I made a color test sample and realized I needed to make a disp_on() & vsync() before changing any color in palettes, which matches with what you said about colors changing at the next frame with load_palette(). Since I was trying to change the colors right after the load function, colors were overriden in the next frame. www.lunoka.net/files/pce/ColorTest.zipThanks for your time and sorry for the misleading!
|
|
|
Post by elmer on Mar 25, 2022 14:58:11 GMT
Thanks for your time and sorry for the misleading! No need to be sorry, there is so much undocumented or only-partially-documented stuff in HuC, and this is one example of a recent (i.e. 2020) change in HuC that isn't obvious. HuC's load_palette() used to act the way that you were expecting, and immediately upload the colors to the VCE. But this was causing onscreen corruption (sparkles) in games, by writing to the VCE during the display time. So load_palette() was changed to queue up a maximum of 7 sets of palette changes, and then apply them all during the next vblank when it was safe.
|
|