Menu

Show posts

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.

Show posts Menu

Messages - HyperFighting

#1
You are a gentleman and a scholar thanks very much for your help!

This is me
___
|    |
|__|

My box no longer has any leaks! :D

Just wanted to say thanks very much for the help and your contributions as a whole! I love the book about creating video games for kids it is just about at my reading level :D Honestly I love that book along with other features on the site and I definitely wouldn't have had an opportunity to check them out if it wasn't for you. THANK YOU!
#2
I have been hard at work with a little something to show you guys. I'm not quite there yet but have been having alot of fun in the process :D

Here goes.

Imagine you have a 16x16 graphic that looks like an L. Hypothetically this graphic could be repeated 4 times to create a box.

spr_ctrl(FLIP_MAS|SIZE_MAS, NO_FLIP |SZ_16x16);  =     Bottom Left Box
spr_ctrl(FLIP_MAS|SIZE_MAS, FLIP_X |SZ_16x16);     =    Bottom Right Box
spr_ctrl(FLIP_MAS|SIZE_MAS, FLIP_Y |SZ_16x16);     =    Upper Left Box

Upper Right of Box =  ](*,)

Does anybody know the secret codes to flip in both X and Y? I have messed around to no avail.

This is me...my box has a leak.
_
|
|__|

Thanks!
#3
Thanks sooo much! I will vanish into the shadows and get to work. As soon as I have some good news to report I will post it.

P.S. Playing Bonks Revenge tonight I was shocked and amazed at how many characters and backgrounds and items it has! There must be a secret to cramming gfx into the little card! I must be ahead of myself. Just saying that game really has alot going on! Bonk is a man of many animations! Long live Hu-cards! I love holding ten games in my hand just like a small stack of credit cards crazy!
#4
My master plan is to have a map that is 3 screens high and as long width wise as I can make it.

The game would have a top area  (used for collecting secrets)
A middle area (used for the majority of the gameplay)
A bottom area (where the player falls to when he falls though a crack).

Each screen would tile seamlessly so that they could repeat and repeat forever.

 I managed to figure out how seamlessly repeat the same screen over and over again by messing with the move_map(whichway) function that is used in the Obey Brew Tutorial Part 7 - The State Of The State (Using the Mappy example provided)

I then wanted to see if there was a way I could export an entire map I created through photoshop to a PCE format and this is where the ImageToPCE came in.

Today I tried exporting a 512x512 image from ImageToPCE. I was unsuccessful when attempting to get it to scroll vertically...The image just kept repeating after the first screen.

I tried several attempts at implementing the map stuff similar to the format seen below... I realized that set_tile_data(leveltiles); is supposed to get three parameters if #incchr_ex is not used but I couldn't get it to compile correctly.The basic is idea is displayed below it is terrible freehand stuff but should describe gist of how I am trying to make it happen.   


#incbin(levelmap,"Star_DATA.bin");
#incbin(leveltiles,"Star_BAT.bin");
#incbin(levelpal0,"Star_PAL.bin"); 
main()
{
set_map_data(levelmap, 64, 64);
set_tile_data(leveltiles, 64, 1);
load_tile(0x1000);
load_map(0, 0, 0, 0, 34, 28);
load_palette(0, levelpal0, 1);

  for(;;)
  {
      if (input)
       mapx++;
       mapy++;
       load_map(mapx,mapy,mapx,mapy,1,SCR_H);
  }
     scroll(0,mapx, mapy, 0, 223, 0xc0);

I am beside myself after reviewing the spr_make function.

spr_make(spriteno,spritex,spritey,spritepattern,ctrl1,ctrl2,sprpal,sprpri)
int spriteno,spritex,spritey,spritepattern,ctrl1,ctrl2,sprpal,sprpri;
{
spr_set(spriteno);
spr_x(spritex);
spr_y(spritey);
spr_pattern(spritepattern);
spr_ctrl(ctrl1,ctrl2);
spr_pal(sprpal);
spr_pri(sprpri);
}

At a quick glance this function appears to use ints so I figured certain variables could be modified to be chars and that would optimize the function a little bit but I fear the real optimization comes from using different function calls. The entire function is based on function calls so this would mean using different more efficient function calls to create a sprite?

I would like to have a top score displayed at the top of the screen. I noticed when my background scrolls so does my text!? I can't seem to get it to sit still

The more you think you kno the more you don't know. Sorry for the ramblings and thanks for taking interest in this sad state of affairs.
#5
Hey guys I must say it is honor get some help from you guys. I really appreciate you guys taking the time to help me out. The Obey website rocks!!!! I feel like I have very evolved state machine for my main character at this point I want to eventually have something significant to show you guys.

I am looking for an alternative to Mappy and I think ImagetoPCE might just be the ticket. I should have removed the bonk stuff in the code I posted as it over complicates matters. I just wanted to give a beginner a quick snippet that they could work with when importing a map data created by ImagetoPCE. The ultimate goal is to be able to scroll to anywhere in the map I thought I was on the right track with the scroll command.

Bonknuts - I realize ImagetoPCE is intended to create a background from a picture but technically you could play by the rules work within the 16 pals and draw a bunch of repeating tiles and ten export it out of ImagetoPCE and it will do the optimizations (determine the repeating tiles etc).
It's like your favorite image editor is your Mappy and ImagetoPCE is your means to output your map.
The FMP stuff is crazy interesting I will definitely look into this as well (My head almost exploded it will take me a minute to comprehend all of this craziness)

I still have to run more tests to see if I can get scrolling happening on a larger map and figure out how to properly increment hex values when importing larger map data. :D

TheOldRover - I am definately using the spr_make command with my existing code and am using #incspr to load my .pcx files based on the examples on the Obey site. Now that I know this not the best approach I will have to investigate further.

Thanks again guys the more you think you know you don't.
#6
 :dance: I can't thank you guys enough! I really appreciate the help. I have posted some modified Obey Brew source that incorporates the ideas you guys have helped me with! It should compile provided the gfx files are in place...Obey Brew's "Part 4 - Playing With Yourself" will give you the Bonk GFX and you'll need to process a 256x256 image through ImagetoPCE.

I had an indexed colour 256x256 image that was less than 16 colours. (Only required one palette)

In imagetoPCE I specified 1 palette and the optimize flag as there where several repeated tiles. I used the three 3 files that it spat out and the rest is history. My goal is to eventually do a larger image but man was it satisfying when the image displayed on the screen! I have been using Hugo but I am defiantly excited to switch it up to mednafen (Hoping to run it using a .bat file from the Huc command prompt to make for an easier testing environment)

Things to pay attention too

#incbin(scene_data,"Star_DATA.bin");
#incbin(scene_bat,"Star_BAT.bin");
#incbin(scene_pal,"Star_PAL.bin"); 


   load_vram(0x2000,scene_data,0x2800);
   load_bat(0x0, scene_bat,32,32);
   load_palette(0,scene_pal,1);


scroll(0, bonkx, 0, 0, 223, 0xc0);

#include "huc.h"

#incspr(bonk,"bonk.pcx",0,0,2,2);
#incpal(bonkpal,"bonk.pcx");

#incbin(scene_data,"Star_DATA.bin");
#incbin(scene_bat,"Star_BAT.bin");
#incbin(scene_pal,"Star_PAL.bin");

main()
{
int j1, bonkx;
bonkx = 104;
init_satb();
spr_make(0,104,153,0x5000,FLIP_MAS|SIZE_MAS,NO_FLIP|SZ_32x32,0,1);
load_palette(16,bonkpal,1);
load_vram(0x5000,bonk,0x100);

load_vram(0x2000,scene_data,0x2800);
load_bat(0x0, scene_bat,32,32);
load_palette(0,scene_pal,1);

satb_update();

for(;;)
{
vsync();
j1 = joy(0);
if (j1 & JOY_LEFT)
{
spr_ctrl(FLIP_X_MASK,FLIP_X);
bonkx--;
}
if (j1 & JOY_RGHT)
{
spr_ctrl(FLIP_X_MASK,NO_FLIP_X);
bonkx++;
}
scroll(0, bonkx, 0, 0, 223, 0xc0);
spr_x(bonkx);
satb_update();
}
}

spr_make(spriteno,spritex,spritey,spritepattern,ctrl1,ctrl2,sprpal,sprpri)
int spriteno,spritex,spritey,spritepattern,ctrl1,ctrl2,sprpal,sprpri;
{
spr_set(spriteno);
spr_x(spritex);
spr_y(spritey);
spr_pattern(spritepattern);
spr_ctrl(ctrl1,ctrl2);
spr_pal(sprpal);
spr_pri(sprpri);
}


TheOldRover and TheOldMan are you guys responsible for Obey Brew? That site is so awesome! I ain't the best coder but enjoy it immensely the way the site is written really speaks to me and I have found it extremely helpful!
#7
To Mappy or not to Mappy that is the question?

I think Mappy is a great little monster. You can load an image of tiles and draw with the tiles that you loaded in giving you some great optimization.

Now there is a little bad ass in town called ImagetoPCE this guy will take your image and optimize the similar tiles for you.

My thought is I would prefer to build my map in an image editor and then convert it to the 3 Bin files DATA, BAT, and PAL ImagetoPCE generates.

EX: Have a complex image and break into tiles load it into mappy and reassemble it.
EX: Have a complex image load it into ImagetoPCE and have it optimize the image for you :)

Currently I have downloaded lots of sources from the HUC site to see if any show case loading backgrounds from BIN files (No luck). I have also have tried quite a bit modifying Obey examples to see if I can get the image I have exported to display (No Luck). Finally I have read the original Image toPCE thread on this forum although an example is offered it is already compiled.

Does anybody know what it takes to load and display the data in the BIN files generated from ImagetoPCE with Huc? ](*,)