Jump to content
Sign in to follow this  
José Pereira

Add more chars to G2F Screen Fonts

Recommended Posts

Hello.

 

Today I have some questions:

 

I create all that screens on G2F in this way: 1Charset for each line (40 chars maxim.)

1.)- Last Ninja Screenplay chars 000to029 on Charsets 0to17, Save the screen

2.)- " " Right and bottom status Area Charsets 0 to 25 (I reserve the 000to029 free for the screenplay graphics, so, the right status line begins at char 030.

 

It looks like this:

1.)-post-6517-12593354264_thumb.png 2.)-post-6517-12593354524_thumb.png

 

I want to Use a Char Editor that I can first Load the Master screen (Charsets 0to 25) that I can latter add the screen .FNT from lines 0 to 17 (The screenplay ones). What program? How?

 

 

 

 

 

After this I get a real screen with Charsets 0to25 and Chars 0to39. Now I want to add:

Objects (Soft sprites): Chars 040,041,042,043 in the desired Charset nºs.

Ninja (Soft Sprites diferent shapes including all shifting needed): 044->085.

Enemy (The same as Ninja): 086->127.

How to...?

 

 

 

Hope you can help me.

Thanks,

josé Pereira.

Share this post


Link to post
Share on other sites

I'm not sure what the answer to your question is, but I was trying to understand something: you are using ONE charset per line? So 24/25 1024 byte charsets in total for your pictures?

Share this post


Link to post
Share on other sites

I think he talks about screenmap and fonts used for panel(s) and action screen. The main problem is to convert graphics to fonts the way to reserve "some" chars for right panel and all the rest for action screen. I would make the screen using 1,2,1,2... etc. charset, but don't know how many objects are there in LN. Also I've played with G2F some time ago (and mainly "just for fun"), so can't help more.

 

Maybe some gfx-man could help here? :)

Share this post


Link to post
Share on other sites

José,

 

I think you need to take the ninja/enemy out of what you are trying to achieve at this point.

 

I would recommend thinking from the starting perspective of "I have 25 empty character sets and a screen map of 25 lines of 40 characters with each line having the characters 0-39 on then". You aim (I think), at this point, is to have the font data populated and the screen map altered such that an Atari program can render one of your screens?

 

You have 3 things you require graphics for here:

1) Lower and Right border graphics - most of this is static but you may overlay parts of it with fixed images.

2) Scene background graphics - the 30 * 18 area, again static but again will some areas have 'reveals'? (i.e. background changes after an action)

3) Sprites - i.e. ninja/enemy/objects

 

Once you have a 'scene' drawn in G2F you are saying you have a file containing data for 25 fonts, albeit only chars 0-39 will have data within each font (assuming you've not drawn any sprites).

 

So, at this point you need a program that will extract the data into a format your Atari program can later use to re-populate the fonts. You can achieve this with a simple program to load the font data and run through a couple of for-next loops and output the data in another file. In theory you only need to do this once for you border graphics and then for each scene you produce.

 

Great! So now we can organise this in a ROM cart image with another simple program to say pick a scene and then render it - this begins by setting up the screen dlist and screen-map and DLIs for changing the fonts and then fills the font memory area with the appropriate data. So far so good.

 

Now... you want to add some sprites. OK...

 

What I'd recommend here is that you simply use something like G2F or anything else (MsPaint, PaintShopPro, Gimp etc) to draw all you sprite images, aligning them correctly to their pixel limits, e.g. each frame is drawn in an X*Y area with X being divisible by 4 and Y divisible by 8.

 

With just a few of these done we can have another simple program to take that data and output it in a form we can later use. As we are using a ROM and assuming that space is not an issue, we can also generate the 'shifted' sprite data at the same time, but we don't need that for starters. Whilst at it you may also want to produce a set of two colour mask images for each frame (unless we can assume one colour is unused which I'm not sure is the case).

 

Now all we need to do is add some sprite drawing routines to our rendering program. Given the X/Y of where we want to draw we can read off the existing background data into our sprite characters, locate the appropriately shifted data and apply the mask to the sprite characters and then add the sprite image data.

 

Voila, one rendered image.

 

Then you can start thinking more about moving around and animating the sprites, changing background etc.

 

HOWEVER - there are big caveats to this approach.

1) Memory - 25K of font data is kindof excessive seeing as the sprites themselves seeing as a high proportion of the sprite area of the font memory will be blank. Still would not be a concern for me as a bank swapping cart (or 130XE banks) will faciliate this.

2) Following on from that - when redrawing sprites you have to blank out the existing used font areas. This will have to be co-ordinated such that it looks good - i.e. no flicker or 'holes' seen during rendering.

3) Inefficiency - as noted by others in the past, the original game would be re-using graphics. A scene would be built up and rendered from a set of tiles and so only one copy would be required, e.g. floor tiles. Again, not so much of an issue if we've chosen to use your screen memory layout but could be a problem if any kind of detection coding is based around this in the original game.

 

I hope this gives you some food for thought - using something like Turbo Basic may permit you to do some of the things described. Maybe get yourself a download of Visual Studio Express C#.NET or VB.NET and write the simple data transforms apps in those. I'm sure people here would offer help with that.

 

Regards,

Mark

Share this post


Link to post
Share on other sites

Once you've restricted the # of chars used in each font in g2f, you can export each font by either saving the source files or if you prefer you can do this via the character edit menu after manually selecting the fonts one by one in the rows.

One of the many utilities written during BJ's development was one which enables adding the fixed char definitions (prepared in advance) to each of the fonts. I can send this to you if you like.

25 fonts is way too much though, you won't need to use that many.

Share this post


Link to post
Share on other sites

Once you've restricted the # of chars used in each font in g2f, you can export each font by either saving the source files or if you prefer you can do this via the character edit menu after manually selecting the fonts one by one in the rows.

One of the many utilities written during BJ's development was one which enables adding the fixed char definitions (prepared in advance) to each of the fonts. I can send this to you if you like.

25 fonts is way too much though, you won't need to use that many.

 

Thamks all of you-. Just get into here now...

 

Tezz and others the reason to use 25Charsets is that in Playing area I need:

- 36+36chars(normal 1:1 to 2:1 pixels) or probably 42+42(I've trying some sprites redone last night like PeteD advise) to Ninja+Enemy (ManBody&weapon, including weapons and shifting)

- 30 chars reserved for playing area.

- Minimum3, maximu, 10 for right status panel (depends what is inside it: "Holding", empty places-only many nºs. of PF0-Black cells,...)

- 4 chars for Objects in the "Found" and "Holding" lines (can be apart of chars 030to039 on that correspondent lines and diferent Objects diferent soft sprites shapes. Ex.- Amulet is 4chars wide and Claw is only2, but reserve 4chars(032,033,034,035) and Amulet wil be frame1, Claw frame2 (Empty char-032,claw-033,claw-034,empty char035)

 

You'll have 40chars(screen)+72(normal 1:1 to 2:1 sprites conversion)=112 chars.

Or 122 if you add one more char to the sprites wide and look much better (Our Ninja looks very good from what I got last night. No more hozizontal nor vertical wide possible because he would not enter the doors).

 

 

 

So, you'll see why 1charset for each line, even If I know that I'll need all that nº of Kb. from the begining. I also counted all the Ninja&Enemy frames+Objects and it's a tremendous/enormous amount of memory, but I don't see any other one possible! Or is there any other?

 

 

 

By the way Tezz can you send me that you used on Bomb Jack it will be great. Thanks.

 

 

Greetings,

José Pereira.

Share this post


Link to post
Share on other sites
..I don't see any other one possible! Or is there any other?

Naturally there is, take a look at either International Karate or the (Palace) Barbarian and the characters are made up of 4*8 pixel chars and so a frame is a set of these. Many frames share common single 4*8 pixel patterns and so these are re-used. Therefore once you have all of you images drawn a semi-clever routine would run through and identify these before outputting the data and charmaps.

 

As with others, I don't see why you need so many characters per sprite? At the figure you are quoting the sprite can potentially fill all of one line of the display area? Can you demonstrate their usage as you see it in terms of a screen map?

 

I am sure you'd only need 4 or 5 chars a font line maximum, remember that the next line is a completely different font and so the memory for it is in another area so when you copy a 'whole' ninja image then this would span many fonts, or are you intending to copy the whole image to each of the 18 fonts of the play area?

 

If <20 characters per line are possible for soft-sprites then this model should permit you two lines of display per font, dramatically reducing the memory overhead.

 

Best wishes,

Mark

Share this post


Link to post
Share on other sites
..I don't see any other one possible! Or is there any other?

Naturally there is, take a look at either International Karate or the (Palace) Barbarian and the characters are made up of 4*8 pixel chars and so a frame is a set of these. Many frames share common single 4*8 pixel patterns and so these are re-used. Therefore once you have all of you images drawn a semi-clever routine would run through and identify these before outputting the data and charmaps.

 

As with others, I don't see why you need so many characters per sprite? At the figure you are quoting the sprite can potentially fill all of one line of the display area? Can you demonstrate their usage as you see it in terms of a screen map?

 

I am sure you'd only need 4 or 5 chars a font line maximum, remember that the next line is a completely different font and so the memory for it is in another area so when you copy a 'whole' ninja image then this would span many fonts, or are you intending to copy the whole image to each of the 18 fonts of the play area?

 

If <20 characters per line are possible for soft-sprites then this model should permit you two lines of display per font, dramatically reducing the memory overhead.

 

Best wishes,

Mark

 

 

Take a Look at this:post-6517-125942576219_thumb.png

 

Simply redone to more25% wide, looks better and fit into all the places: I have now 5chars horiz. and need 1more for left moving (shifting) and another one for right moving. The way I see the walking method I need 1/2 char for top moving (shifting) and another 1/2 for the bottom. Man is 5high, becomes 6high with shifting.

7horiz.x6vertical=42 that's my toughts, but, wait, always a but... Yes if I have, for example the 7chars of the Hands line, if the Enemy goes one step higher on the same place I will have the 7chars of stomach lines. And if I'm right this can be the same 7chars nºs as Hands ones. You'll never have Head lines and Hands and Stomach,... on the sames lines? Understand me? Am I right?

 

José Pereira.

One _

Share this post


Link to post
Share on other sites
And if I'm right this can be the same 7chars nºs as Hands ones. You'll never have Head lines and Hands and Stomach,... on the sames lines? Understand me? Am I right?

Yes, I think you understand it better now, the same 7 'characters' (e.g. 40-46) would be used on each line (5 or 6 of them) to display the sprite.

 

But if you look at your sprites you'll see there is lots of redundancy, specifically the 'blank' characters. These you do not need to include in your sprite's makeup and so one line (e.g. head) may take up two characters but another would use more.

 

So, if you move to using two lines per font then you'd need to ensure you have enough characters for the sprites over those two lines. E.g. 128-(40*2) = 48 so even with 7*2 each for the ninja and enemy then you've still got 20 left over for other things.

 

Hope that helps,

Mark

Edited by Wrathchild

Share this post


Link to post
Share on other sites

In an actual game programming situation, the human character data is dynamically merged with whatever background it has to stand over.

 

No way will you need 25 character sets... ever.

 

At worst you might have 10-12 characters in a screen row that need to be allocated to the player + enemy.

If you're using 1 charset per 2 rows, that still leaves 104 spare characters.

Share this post


Link to post
Share on other sites
And if I'm right this can be the same 7chars nºs as Hands ones. You'll never have Head lines and Hands and Stomach,... on the sames lines? Understand me? Am I right?

Yes, I think you understand it better now, the same 7 'characters' (e.g. 40-46) would be used on each line (5 or 6 of them) to display the sprite.

 

Thanks Wratchild. Why I never think in this way. Of course it must have to be like this. It so simply logical!

 

If I am using 7for Ninja and more 7for Enemy I'll have 114free for screen. Taking in account the same chars used in different lines on the right status area(Lines, Black(PF0 cells) I Think that now I can have 1Charset for 3lines.

 

I will try, but have to be like this:

If I'm doing only the 30chars of the playing area, I get on G2F chars 000to089. Leaving the right status area to later... (Load it first, stays all game, only Load each bakg. screen), But I must have to see if Right status panel only have chars from 090to114, like this:

Lines00->02 - Charset0

03->05 - 1

06->08 - 2

09->11 - 3

12->14 - 4

15->17 - 5

 

And I'll count the bottom status area panel+weapons, I think we also have a good surprise here.

 

Thanks. Always very good learning new things.

José pereira.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...