nesdev.parodius.com Forum Index nesdev.parodius.com
NES Development and Strangulation Records message boards
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Level designing
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    nesdev.parodius.com Forum Index -> NESdev
View previous topic :: View next topic  
Author Message
tokumaru



Joined: 12 Feb 2005
Posts: 3584
Location: Rio de Janeiro - Brazil

PostPosted: Fri Jul 29, 2005 11:07 pm    Post subject: Reply with quote

Celius wrote:
Uh, that wasn't the full code by the way. that was a PEICE. I will create a good Qbasic program that designs levels, and I will have to think of a way to have my code incbin it. I'm not sure of how that one will work. I will be frustrated for months trying to get it to work. Well, I'll think of a good scrolling code, or go to someone for help. When saving the level data in my level editor, what kind of file should I save it as?


Just save it in the format you think is most efficient to read. Keep in mind that whatever you output from the editor is what your game code (written in 6502 assembly by YOU) is going to read and draw to the screen.

There are no "standards" for formats, it's all up to you. File extensions don't matter at all, the contents of the files do. Whatever the format you output from the editor, you'll be .incbin'ing it in your code.
Back to top
View user's profile Send private message
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Fri Jul 29, 2005 11:15 pm    Post subject: Reply with quote

Yeah, I'm going to make a Qbasic program that makes a large map, and updates it 1 line of tiles at a time. I just really hope I can make it output stuff on the NES. Even if it's not what I expect, I still want it to put stuff on the screen. This is the longest forum i've ever seen. yeah, the reason I was wondering how to load a chr file into Qbasic was because I want to have it act like NSA, but better. I want to find out if there's a way to have qbasic react to mouse movement. That's what I hate about DOS.
Back to top
View user's profile Send private message Visit poster's website
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Fri Jul 29, 2005 11:18 pm    Post subject: Reply with quote

By the way, what Tile editor was written in Qbasic?
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Fri Jul 29, 2005 11:50 pm    Post subject: Reply with quote

Celius wrote:
Yeah, I'm going to make a Qbasic program that makes a large map, and updates it 1 line of tiles at a time. I just really hope I can make it output stuff on the NES. Even if it's not what I expect, I still want it to put stuff on the screen. This is the longest forum i've ever seen. yeah, the reason I was wondering how to load a chr file into Qbasic was because I want to have it act like NSA, but better. I want to find out if there's a way to have qbasic react to mouse movement. That's what I hate about DOS.


The editor doesn't have to do the "1 line of tiles at a time" thing, this is an in-game thing, not a level editor thing. Qbasic won't interact with the NES at all, it is just a tool to prepare the level in a format your game code can make good use of.

That is the whole deal of the level editor, a better NSA, one that is suited to (and optimized for) the needs of your game.

There are tons of mouse routines for qbasic, this shouldn't be hard to find at all, there are so many qbasic sites on the net that carry this kind of stuff... look for it in google and you will surelly find one.

Celius wrote:

By the way, what Tile editor was written in Qbasic?

I said I think there is one, I'm not sure, so I can't give you a name. I can say there is an emulator made in qbasic, it's called unessential, look for it in www.zophar.net (I think you can find it there). Since it is a NES emulator, it must have code to decode NES graphics somewhere in there.

-tokumaru-
Back to top
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 5:09 pm    Post subject: Reply with quote

I just found out a really easy way to rip graphics. I think it may require Nesticle, due to its PCX snapshot thing. Take a snapshot, open it in photoshop, copy and paste it into paint, and save it as a .bmp file. Then open YY-Chr, and copy and paste the stuff from paint into YY-Chr. Make sure that there's only 4 colors in the bmp, and make sure they are the following:

Red
Green
Blue
Black

When you copy and paste it, whatever's Red will show up as the 4th color on the pallete, whatever's Blue will show up as the second, whatever's Green will show up as the the third, and Black will be the first. I'm sure you all knew that, but I just thought I might share it just in case. I'm sure different rules apply for different systems. But that one for sure works with windows.
Back to top
View user's profile Send private message Visit poster's website
Quietust



Joined: 19 Sep 2004
Posts: 1028

PostPosted: Sat Jul 30, 2005 5:21 pm    Post subject: Reply with quote

There's an even easier method - use a tile editor that supports opening multiple files (such as Tile Layer Pro) and just drag-and-drop the tiles from one file to the other. This has the added bonus of being able to load tiles from ANYWHERE in the game, not just the ones that happened to be loaded at the time you took the screenshot.

The only caveat is that this method generally doesn't work with games that use CHR-RAM (since their tile data will likely be compressed somewhat).
Back to top
View user's profile Send private message
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 5:24 pm    Post subject: Reply with quote

Well, you can do that even in YY-Chr. I shouldn't have said ripping graphics is made easier by this, I should have said, if you want something you see on the screen in a chr file, do that method.
Back to top
View user's profile Send private message Visit poster's website
tepples



Joined: 19 Sep 2004
Posts: 6106
Location: NE Indiana, USA (NTSC)

PostPosted: Sat Jul 30, 2005 7:51 pm    Post subject: Reply with quote

Celius wrote:
I just found out a really easy way to rip graphics. I think it may require Nesticle, due to its PCX snapshot thing.

Nope. Any emulator designed for Windows will do, as long as you can set it to unscaled (x1) windowed mode. Alt+Print Screen takes a snapshot of the current window in FCEU, Nintendulator, and every other "normal" Windows program and puts it on the Windows clipboard. Then you can...
Quote:
paste it into paint, and save it as a .bmp file. Then open YY-Chr, and copy and paste the stuff from paint into YY-Chr.

I'm working on a program called 'bmp2tiles' that takes any .bmp file and turns it into tiles for 1-bit, GB, SMS, NES, Super NES/PCE, Virtual Boy, Genesis, GBA, or 8-bit packed. (Why Virtual Boy? Many GBA games use 1-bit or Virtual Boy format tiles and expand them to GBA format at runtime using a GBA BIOS call.) And yes, it'll even work with 8x16 pixel sprite mode.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 8:12 pm    Post subject: Reply with quote

Yeah, I just think that it's easier to copy and paste graphics from paint into a chr editor right away, instead of going into command prompt, and doing all that crap.
Back to top
View user's profile Send private message Visit poster's website
tepples



Joined: 19 Sep 2004
Posts: 6106
Location: NE Indiana, USA (NTSC)

PostPosted: Sat Jul 30, 2005 8:37 pm    Post subject: Reply with quote

True, but the command prompt is more scriptable. Have you ever read the GNU Make manual? If you keep the graphics in a .bmp file, which some claim is the most convenient format for making modifications, you can have your makefile automatically rebuild the .chr file whenever necessary. Having the grunt work of data conversion handled behind the scenes can simplify larger projects.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 8:41 pm    Post subject: Reply with quote

You know, Jnes and VirtuaNes seem to skip a line of tiles. Am I right? FCEUXD (AWESOME EMULATOR!) and Nintendulator(ALSO AWESOME!) are the only ones I know of that don't. If I write my code like this:

Code:

   lda #$20
   sta $2006
   lda #$20
   sta $2006

   ldy #$00
   ldx #64

textwrite:
   lda menu,y
   sta $2007
   iny
   dex
   bne textwrite

   lda #%00001110
   sta $2001
   stx $2005
   stx $2005

menu:   .db $7,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,
$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$8,$9
   .db $A,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,
$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$B,$C


it starts at the top of the screen on Jnes and stuff, but starts on the second line like it should on Nintendulator and FCEUXD. Am I correct when I state that theory that Jnes skips a line?
Back to top
View user's profile Send private message Visit poster's website
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 8:45 pm    Post subject: Reply with quote

Oh, by the way, that method you see above of loading a BG is quite reliable, it seems. So yay! I found a reliable method! thanks to the hello.asm code for NESASM, there are probably a bunch, but oh well.
Back to top
View user's profile Send private message Visit poster's website
Disch



Joined: 10 Nov 2004
Posts: 1587

PostPosted: Sat Jul 30, 2005 8:54 pm    Post subject: Reply with quote

Do you have scanline clipping turned off? The NES renders 240 scanlines, but when emulating NTSC, most emulators chop off the top and bottom 8 scanlines (only rendering 224 scanlines) since the top and bottom are chopped off on most NTSC displays.

If one emu is chopping off the top 8 lines, and another isn't, it may appear that one is rendering the image lower than the other -- when it really isn't. One just isn't showing the whole picture.

Your code is drawing to ppu$2020, so without clipping, this will start drawing 8 pixels down from the top of ths screen. With clipping it will start at the very top of the screen.
Back to top
View user's profile Send private message
Celius



Joined: 05 Jun 2005
Posts: 1941
Location: Minneapolis, Minnesota, United States

PostPosted: Sat Jul 30, 2005 9:00 pm    Post subject: Reply with quote

Yeah, why would you want clipping? I'm sure there's a reason for it, but I think it's dumb.
Back to top
View user's profile Send private message Visit poster's website
Disch



Joined: 10 Nov 2004
Posts: 1587

PostPosted: Sat Jul 30, 2005 9:08 pm    Post subject: Reply with quote

As stated -- most NTSC displays cut off the top and bottom of the screen. As such, Some games expected that area to not be visible and there's sometimes trash up there which clipping hides. Can't think of a game offhand which does that, but I know they exist. Also, look at Final Fantasy without clipping. Scroll the screen virtically -- see that effect at the top and bottom? That's an unavoidable problem with Virtical Scrolling + Vertical mirroring. However clipping hides it nicely.

Another possible benefit of clipping is that it brings the screen a little closer to 4:3 aspect ratio (though it's still pretty far from it). So all the people that like stretching the image to fit the screen will have less distortion than they would if all 240 lines were rendered.

So yeah, I'm pro-clipping -- though most/all emus make it optional so it's easy to flip off if you don't like it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nesdev.parodius.com Forum Index -> NESdev All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 5 of 8

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group