It is currently Tue Nov 21, 2017 2:46 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
PostPosted: Thu Sep 17, 2009 9:50 pm 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
Since I have been asking all kind of questions regarding sprite flipping etc, I think the least I could do is show a build of my current status, which is available here.

At less than 1h/40min per programming session, it takes an eternity to reach new milestone. I reached a new one today: my concept for sprite animation for the data using meta-meta sprite is working.

What is does:
- Play concrete man song made by Tssf (he re-made most of the soundtrack indirectly because of me so it's the least I can do is use his song right away)
- Scroll and show meta-tile based map for first part of level. Doesn't check limits.
- Animate megaman in running mode (non-stop)
- Switch mega man side based on direction (test of sprite flipping)
- Pressing up switch animation to running with gun (test switch animation)
- Pressing down switch animation to running without the gun (test switch animation)

There is no collision or anything, I'm not there yet. I have to celebrate every milestone as small victories.

I work on it everyday at lunch time only. I don't know when I will finish it but I didn't give up. I hope to see the light someday. It's hard but I'm ok with it. It I make my building blocks properly, later it should be faster to make it.

I hope you will enjoy it.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 17, 2009 9:57 pm 
Offline
User avatar

Joined: Tue Jul 17, 2007 9:04 am
Posts: 313
Location: Somewhere
Very interesting indeed. Scrolling is the one thing that is tough. it seems you draw two columns of 16x16 tiles every few steps, which seems like it would work.

Are you going to modify Famitracker to make sound effects actually work? That's the one problem with using that engine.

This project is more than I would have done for a game, heh.

_________________
-Sivak
http://sivak.nintendoage.com/
http://www.youtube.com/user/SivakD


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 17, 2009 10:20 pm 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
Sivak wrote:
Very interesting indeed. Scrolling is the one thing that is tough. it seems you draw two columns of 16x16 tiles every few steps, which seems like it would work.


For the scrolling, for now I use 2x2 meta-tiles and write 2 meta-tile columns at a time in inc32 mode. The columns are decoded in the main loop upon request and when ready, are drawn in the NMI. After passing 4 columns of tile, I update the content that you just passed. This procedure may change a little bit in the future. I may change back to meta-meta tiles if the size of the data is too big. For now I still have time to think about it.

Sivak wrote:
Are you going to modify Famitracker to make sound effects actually work? That's the one problem with using that engine.


To reuse patterns for the sound effect at the same time would be quite a task. You would basically need twice the variable to make it work or some fancy trick once you understand the core well (which I don't yet). So the answer is yes and no. I already modified the engine so you can disable channels on demand then you can play you own sound effect then re-activate the channel. Sound fx shouldn't be that complicated to make by hand compared to music so it's less an issue. If I find a way to re-use some track data and play it at the same time would be great but it's not one of my main goal for now. Just to be able to use the code for the music is more than a time saver. This way, it's easier for someone that know how to track to make music too. Once I have a way to play sound fx, custom way or using FT code, I will release the code for sure.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 17, 2009 10:38 pm 
Offline
User avatar

Joined: Tue Jul 17, 2007 9:04 am
Posts: 313
Location: Somewhere
Well, it's interesting. What's inc32 mode?

MMC3 is the way to go. It'll be interesting to get it to scroll vertically.

I was wondering if you plan to setup a palette cycling thing to get the waterfalls to move (among other animations seen in other stages).

Also, just a very minor nitpick and I don't mean disrespect: I think the trees should use $08,$18 for their palettes instead of $07,$26.

_________________
-Sivak
http://sivak.nintendoage.com/
http://www.youtube.com/user/SivakD


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 17, 2009 10:49 pm 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
Sivak wrote:
Well, it's interesting. What's inc32 mode?


Sorry, that's the way I'm used to call it ;) It means increment the VRAM address of the ppu by 32 so I can write colums of tiles.

Sivak wrote:
I was wondering if you plan to setup a palette cycling thing to get the waterfalls to move (among other animations seen in other stages).


Yes, this is planned but I'm not at that stage yet. I build small blocks by small blocks for the main engine. Once objects can move on the screen and interact between them, I will add those small details.

Sivak wrote:
Also, just a very minor nitpick and I don't mean disrespect: I think the trees should use $08,$18 for their palettes instead of $07,$26.


I was using different color at the beginning. If you use FECUX, the color will look red and I'm aware so you're not nitpicking actually. On my old (1998) japanese TV, it look the right way, like the original when the TV setting are to their default values with my famicom. Let's just say that colors don't look the same that I was used with my US nes. This is why I chose those color. I will test it back when I have a chance with the one you proposed on my famicom.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 17, 2009 11:52 pm 
Online
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7272
Location: Chexbres, VD, Switzerland
This is a great start.
BTW I'm pretty sure all Mega Man games used 32x32 meta-meta tiles made of 4 16x16 metatiles, altough that don't imply MM9 have to be this way.

About sound effects, the only thing you really have to do is double the amount of channels (and of memory reserved to them...), and write to hardware regs of the lower 4 channels (music) only if corresponding channel in the upper 4 channels (SFX) are inactive. You just need to init some pointers and counters to start a SFX like you do it for the music.
Also if you don't use all channels for SFX (for example if you never use triangle) you can save memory by removing the triangle-SFX channel.

_________________
Life is complex: it has both real and imaginary components.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 18, 2009 1:24 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
@Sivak:

I checked my code and the colors I was using before are exactly the one you said. On my TV, it was looking more muddy and green. I will need to think what to do about it in the future.

@Bregalad:

Thanks for the comment. As for the virtual channels, it is a possibility. The only thing is that the sound driver already has a memory footprint of ~200 bytes: this mean the memory could double easily. Modifying to allow this feature will require to update most of the code of the driver. Just thinking about it, I feel pain everywhere ;) If I can find the time, I will see what I can do. That would be useful to use the same format music and sfx.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 03, 2009 11:14 pm 
Offline
User avatar

Joined: Mon Mar 30, 2009 4:40 pm
Posts: 306
Wow, very neat demo. I drool just thinking of the future this could have. Mind you it could end up a 16meg NES game. :P


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 04, 2009 2:41 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
It will all depends how far that I will make that proof of concept go. For now, my first target is to make 1 level, intro and selection screens. After having the code working for one level, it will be easier to evaluate how much time it could take to make the other ones.

For now, at less than 30 min per day of coding (when I can code, and often only during the week).. The road will be long. But for now this is an interesting project.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 9:10 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1518
Location: Fukuoka, Japan
At last, after a few months that I couldn't touch it I was able to work on my project this weekend. Here's the current build.

What is different compared to the first build in september:
- Animation of character work (not hard coded)
- Can change state from stand still/blink, run, jump, and weapon use
- Basic collision detection is done
- Velocity for jump is done
- Palette animation

It's quite a big step compared to the first build I posted but it's still a looonng way to go.

It's not easy to reproduce an already existing game since you have to follow the rules exactly. One rule that I need to implement is the velocity factor when walking. For now, 1 pixel per frame is too slow. I will need to adapt to something like MM2 which is 1.25 pixel per frame. This as an impact on many things but I will figure out something. So I'm still working on it.

Any comment will be appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 10:37 am 
Offline

Joined: Sat Nov 17, 2007 8:44 pm
Posts: 385
That's pretty cool!

You're right, it does need work, the physics aren't quite there yet but it's still very impressive. It feels like it takes slightly longer than it should to start moving when you press a button, but maybe this is just due to the slow running speed.

Did you notice that if you're right next to a block and press towards it briefly, Megaman's leg bends for some reason?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 12:13 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Great, it's really starting to look like a game! Collision still needs a lot of work, I was able to do many strange things like getting Mega Man stuck with the jump frame while standing and walking, getting him to stand on blocks that are part of walls, things like that.

But it's starting to look pretty good. Even though you said you wouldn't do it, it would be cool if you made the whole game, because then I'd be able to play it! =) This would be my only chance, since I don't have any of the current gen consoles. I was able to emulate the Wii version, but it was too slow and flickery to be enjoyable.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 12:51 pm 
Offline
User avatar

Joined: Sun Jun 05, 2005 2:04 pm
Posts: 2136
Location: Minneapolis, Minnesota, United States
Great work so far! I'm with tokumaru on this one. I probably won't be able to play the Wii version, since I have no newest gen consoles. I would definitely love to be able to play this one.

And yes, I agree that the collision needs some work. What I do for my game is I have 4 universal routines I use for rejecting up, down, left, and right from a solid metatile. These routines are called only if an object moves inside of a solid tile, of course. For rejecting an object down (for if they hit their head on a ceiling), you take the Y pixel coordinate, AND it with #$F0, and then add #$10 (assuming you have 16x16 pixel metatiles). The same thing goes for rejecting to the right, you just do the same thing with the X coordinate. This also is assuming the X/Y coordinates represent the top-left corner of the object. For rejecting left and up, you have to know the exact width or height of the object respectively. Knowing this, you take the height or width (EOR #$FF) + 1, then AND that by #$0F to get the low 4 bits, then you save that value to add it to the X or Y coordinate (depending on if you're rejecting left or up respectively) ANDed by #$F0.

If you pull that off correctly, you have simple and reliable rejection from solid tiles so you don't have this stuck-in-the-wall dilemma. Sorry if that makes no sense, but that's how I handle collision with solid tiles.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 12:57 pm 
Offline
User avatar

Joined: Tue Jul 17, 2007 9:04 am
Posts: 313
Location: Somewhere
Pretty nice. Obviously getting stuck in walls is wrong, but it's nothing to sneer at at this point.

I wonder if I'll ever do a game that scrolls. :shock:

_________________
-Sivak
http://sivak.nintendoage.com/
http://www.youtube.com/user/SivakD


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 10, 2010 1:05 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
Sivak wrote:
I wonder if I'll ever do a game that scrolls. :shock:

At the rate you are progressing, this is probably the next logical step! =)

THE NES NEEDS MOAR SCROLLING HOMEBREWS!!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group