Jump to content
IGNORED

released JellyBeans-Source


walter_J64bit

Recommended Posts

Hello Walter!

 

 

I was in the A8 forums the other day and seen that Cybernoid released his source code to his game jellybeans

 

this would make for a good game for the Lynx :cool:

911766[/snapback]

 

 

Thanks for sharing the info :-)

(I don't own a Atari 8bit-computer, so i seldomly visit the A8-forum)

 

 

Bye!

Matthias

911855[/snapback]

 

Why do I get the feeling that Matthias have got use for game? :P

Link to comment
Share on other sites

Hi!

 

Why do I get the feeling that Matthias have got use for game? icon_razz.gif

 

Oh, sorry, but i better should focus on my other "almost finished" projects first.

 

And i also haven't switched over to the "new" CC65 compiler, but in this forum several people have and those are in a better position to check if JellyBeans could be ported to the Lynx.

 

Regards

Matthias

Link to comment
Share on other sites

And i also haven't switched over to the "new" CC65 compiler, but in this forum several people have and those are in a better position to check if JellyBeans could be ported to the Lynx.

 

Regards

Matthias

912248[/snapback]

 

I just spent 20 minutes to check the sources. The jellybeans.com

compiles almost out of the box, but when you run it on Handy it crashes

with an illegal opcode.

 

The title.c compilation uses conio for communicating with the user and our

conio lacks these features completely on the Lynx.

Unresolved external `_clrscr' referenced in:
 title.s(15)
Unresolved external `_cputc' referenced in:
 title.s(17)
Unresolved external `_gotoxy' referenced in:
 title.s(16)
Unresolved external `_write' referenced in:
 fwrite.s(10)

 

The correct way to fix this might be to use the tgi-libraries and

use tgi_text commands instead of prints throughout the code.

 

But there seems to be bitmap graphics defined as characters.

So it may be easiest to make a custom tgi-driver that has built-in

jellybean fonts instead.

 

The last problem is rs232 support. The serial driver for the Lynx is

not written yet. That means that networked play won't work unless

some nice soul creates a minimal driver for the Lynx.

 

My estimate is that it might take several evenings to port the

game to the Lynx. Just compiling it was not enough.

 

--

Karri

Link to comment
Share on other sites

I just spent 20 minutes to check the sources. The jellybeans.com

compiles almost out of the box, but when you run it on Handy it crashes

with an illegal opcode.

 

The title.c compilation uses conio for communicating with the user and our

conio lacks these features completely on the Lynx.

 

The correct way to fix this might be to use the tgi-libraries and

use tgi_text commands instead of prints throughout the code.

 

But there seems to be bitmap graphics defined as characters.

So it may be easiest to make a custom tgi-driver that has built-in

jellybean fonts instead.

 

The last problem is rs232 support. The serial driver for the Lynx is

not written yet. That means that networked play won't work unless

some nice soul creates a minimal driver for the Lynx.

 

My estimate is that it might take several evenings to port the

game to the Lynx. Just compiling it was not enough.

 

--

Karri

912301[/snapback]

 

 

The title.com is only used to produce a fancy title screen, and allow the player to enter his/her name and select music... but this is not needed to play. Also, the serial stuff is not really needed, so all XIO commands could be commented out for the initial port... In fact, I found a way to optimize and make the serial/XIO stuff faster so I will most likely create a new xio library for release later...

 

To make it easy, don't worry about title.com or any xio commands. Just my 2-cents. :D

 

Let me know if you have any other problems...

 

l8r,

Cybernoid

Link to comment
Share on other sites

Hello Cybernoid!

 

But there seems to be bitmap graphics defined as characters.

So it may be easiest to make a custom tgi-driver that has built-in

jellybean fonts instead.

 

 

 

Let me know if you have any other problems...

 

912408[/snapback]

 

Could you perhaps provide the graphics in a non-A8-specific format?

Like BMP, GIF,TGA?

 

 

Regards

Matthias

Link to comment
Share on other sites

 

Could you perhaps provide the graphics in a non-A8-specific format?

Like BMP, GIF,TGA?

 

 

Regards

Matthias

912472[/snapback]

 

 

Hi Matthias,

 

Hmmm, I don't have the graphics in a BMP format. I did them all by hand in the c-code. However, I can do some screen captures and dumps from the emulator to create a character map if you want.

 

-C-

Link to comment
Share on other sites

 

Could you perhaps provide the graphics in a non-A8-specific format?

Like BMP, GIF,TGA?

 

 

Regards

Matthias

912472[/snapback]

 

 

Hi Matthias,

 

Hmmm, I don't have the graphics in a BMP format. I did them all by hand in the c-code. However, I can do some screen captures and dumps from the emulator to create a character map if you want.

 

-C-

913862[/snapback]

 

 

Please do I'm in need of this too thanks! ;)

Link to comment
Share on other sites

 

Could you perhaps provide the graphics in a non-A8-specific format?

Like BMP, GIF,TGA?

912472[/snapback]

Hmmm, I don't have the graphics in a BMP format. I did them all by hand in the c-code. However, I can do some screen captures and dumps from the emulator to create a character map if you want.

913862[/snapback]

Please do I'm in need of this too thanks! ;)

914168[/snapback]

 

Jellybeans has a lot of machine specific code. I am currently cleaning it

up and have already converted the input and output to work through

cc65 library calls instead of banging the hardware directly.

 

It already compiles neatly and runs on the Handy, but colors are wrong,

the screen is too small, no sound is ported yet etc....

 

But if you are porting it to some other cc65 platform then my work could

help you on the way. Just drop me a PM if you want access to my CVS.

 

--

Karri

 

 

I have my version in a CVS accessible from the net. If someone else wants

to

Link to comment
Share on other sites

Hi!

 

 

Could you perhaps provide the graphics in a non-A8-specific format?

Like BMP, GIF,TGA?

912472[/snapback]

Hmmm, I don't have the graphics in a BMP format. I did them all by hand in the c-code. However, I can do some screen captures and dumps from the emulator to create a character map if you want.

913862[/snapback]

Please do I'm in need of this too thanks! ;)

914168[/snapback]

 

Jellybeans has a lot of machine specific code. I am currently cleaning it

up and have already converted the input and output to work through

cc65 library calls instead of banging the hardware directly.

 

It already compiles neatly and runs on the Handy, but colors are wrong,

the screen is too small, no sound is ported yet etc....

914394[/snapback]

 

I saw that the graphics of Jellybeans are incorporated as user-defined characters into the C-code, so i thought it would be quite useful to be able to have a look at the "source" of those character-definitions. As mentioned i have no experience with the Atari-8bit-computers, so i wasn't sure how different their pixel- or character-layout

is from the Lynx' pixeldesign and palettelayout.

 

But it seems that Karri is already mastering this hurdle :-)

 

 

Karri, about the "small screen":

If you mean the screen of Lynx (102*160 pxiels) compared to the

A8-screen (don't know how big), i would think that the

solution for this would be to focus on the part of the Jellybeans-screen

with the actual gamefield, from my understanding this should fit

onto the Lynx' screen quite well.

I think then you need only some few text-outputs (2 values per player?)

which also should fit left or right of the gamefield.

 

 

Regards

Matthias

Edited by Matthias
Link to comment
Share on other sites

Karri, about the "small screen":

If you mean the screen of Lynx (102*160 pxiels) compared to the

A8-screen (don't know how big), i would think that the

solution for this would be to focus on the part of the Jellybeans-screen

with the actual gamefield, from my understanding this should fit

onto the Lynx' screen quite well.

I think then you need only some few text-outputs (2 values per player?)

which also should fit left or right of the gamefield.

914459[/snapback]

 

The screen size is 40 characters by 20 lines.

 

There a 5 jellybeans on a line, each bean is 2 characters.

There is 15 lines of jellybeans.

 

The graphics is defined as 8 by 8 pixels / character. There is also some

aspect ratio stuff that I do not understand that further stretches the

beans.

 

Anyway... We need 5 x 2 x 8 = 80 pixels wide screen

and 15 x 8 = 120 pixels high screen.

 

Either we use a playfield that is 120 by 80 or the alternativs is

80 by 90.

 

Should I just rotate it and make another Klax or should I use just 6 pixel

high beans and ruin the graphics instead?

 

(I have not ever played JellyBeans so I have no idea if it makes

sense to play it on a rotated display. I don't want to turn the Lynx 90 degrees

just play it with a rotated display.)

 

Comments from JellyBeaner wannabees please...

 

--

Karri

Link to comment
Share on other sites

Hello Karri!

 

Perhaps i am not the right partner for discussing the port,

as i haven't played that game yet (just saw the screenshots).

 

But for a port to the Lynx i wouldn't try to keep the

character-set orientated screen-output-system of the A8-original.

 

An example:

As you say the gamefield keeps 15 lines of 5 "beans",

each "bean" consists of 2 chars in the A8-original.

So it's obvious that it would help a lot if a "bean"

would be rendered as a single sprite on the Lynx instead

of 2 as the Lynx doesn't have a text-screen-mode.

And this is quite independend from the sizes of the chars/sprites :-)

 

So i would suggest to use a single sprite per "bean"

with a height of 6 pixellines and a convenient width.

At the moment i don't know how many different

types of beans (or special objects like bombs) the

game needs for the gamefield-rendering, so the

vertical size would be limited by the Lynx' screen-height

and the horizontal size would be limited mostly by

esthetical considerations and perhaps the space

required for the player's statistics left or right of

the gamefield.

 

Regards

Matthias

Link to comment
Share on other sites

I actually rewrote all the memory mapped accesses to function calls

so it is easy to use sprites.

 

I also found out that I need to add screen erasures here and there

in the code. The original game seems to refresh the screen by

magic as it is memory mapped to the display hardware somehow.

 

Making the game double-buffered changes the logic quite a bit

as I need to update the sprites for every frame.

 

The animation consists of four frames/bean only.

 

Actually it might be easiest to request some graphics artist to

design a set of animated JellyBean sprites that can be 6 bits high

and up to 32 pixels wide. 15 colors/sprite. Any takers?

 

And I prefer the graphics in one big bmp-picture instead of a lot

of small bitmaps.

 

It would also be nice to have a cool background image for the

playfield and a cute frame around the main playfield with the

progress bars for 1 to 8 players.

 

--

Karri

Link to comment
Share on other sites

This is fantastic work so far Karri.

 

I little background on how JellyBeans works on the Atari 8bit may be useful.

 

Basically, on the a8, I used the 5-color character mode. This mode has 40x25 characters on screen. Each character is 4x8 pixels. However, the horizontal pixel width is equivalent to 2 pixels of the vertical height.

 

The graphics are defined as characters, and as Karri mentioned each bean is 2 characters wide... so 8x8, but onscreen it looks like 16x8 aspect ratio.

 

There are 5 types of beans, a bomb and a brick for 7 different items in the playfield. Outside of the game area, jellybeans uses more characters... one for the border, one for the border between names, 4 for the fill bar (shows the number of beans each player has in the game), 2 more for animated arrows to show where the center line is.

 

The a8, has several interrups that I use. One is the VBI (vertical blanking interrupt), and one is the DLI (display list interrupt). The VBI is used to switch the character set every so often to the next character set. There are 4 character sets... thus the animation is just 4 frames. The whole character set changes the whole screen. The game logic decides when the jellybeans should be removed, and thus changes those characters on screen to different characters that are animated... thus the jellybean removes after being animated and erased.

 

The DLI happens at the begining of each first horizontal line of each character. That is used to change the colors for that character lines (they are changed every 8 lines). (The DLI intterupt itself, will wait (WSYNC) every line to change colors every line.)

 

One line on the top is scrolling to the left. This is done by the VBI again. This line is defined to be 256 characters wide. The VBI changes the start position of this line every so often on a pixel increment not a character increment offset.

 

However, there is going to be one problem, and that is I use player/missle graphic overlays for the jellybean colors. There are 4 player graphics that or together and with the jellybean characters to increase the number of colors to 4*3+1 for 13 colors. Each DLI interrupt causes the number of colors on screen to shoot above 90 in the main playfield... I think that there are more than 100 colors fully on screen.

 

Hope that this helps some... feel free to bug me anytime! I am working on the big picture of the character set.

 

Chris/Cybernoid

Link to comment
Share on other sites

Hello Cybernoid!

 

Thanks for all the technical details :-)

 

However, there is going to be one problem, and that is I use player/missle graphic overlays for the jellybean colors.  There are 4 player graphics that or together and with the jellybean characters to increase the number of colors to 4*3+1 for 13 colors.  Each DLI interrupt causes the number of colors on screen to shoot above 90 in the main playfield... I think that there are more than 100 colors fully on screen.

 

914604[/snapback]

 

But this increase of the colours from 13 to >90 is just used as "eye candy", yes?

The game would still work with the 13 base-colours?

 

I am just asking to keep the porting easy, of course it's possible to use

several tricks on the Lynx to increase the visible numbers of colourshades ;-)

 

 

Regards

Matthias

Link to comment
Share on other sites

But this increase of the colours from 13 to >90 is just used as "eye candy", yes?

The game would still work with the 13 base-colours?

 

I am just asking to keep the porting easy, of course it's possible to use

several tricks on the Lynx to increase the visible numbers of colourshades ;-)

914799[/snapback]

 

Hi Matthias!

 

Yes, this is exactly correct. This is just eye candy, and the game should work just fine with 13 base-colours. In fact each jellybean is just 2 colors so 2*5 + 1 for background is 11 colours. The beans could even be done with just one colour, if needed.... the bombs and bricks reuse the jellybean colors.

 

-c-

Link to comment
Share on other sites

Eye candy can be added later...

 

Now I managed to compile a version using this graphics.

 

graphics.gif

 

On the Lynx it looks a bit weird. It obviously needs some graphics talent.

I have not bothered to match the color palette with the graphics yet.

 

lynxjelly.jpg

 

Gameplay is still zero. Something is going on with the beans but I still

have no clue what happens there.

 

--

Karri

Link to comment
Share on other sites

Hello Karri!

 

Gameplay is still zero. Something is going on with the beans but I still

have no clue what happens there.

914839[/snapback]

 

 

I just looked into the released sources, what i saw there is,

that the loop in main() polls a variable-structure bean_counter which is

changed by calling drop_beans_cnt() in the Vertical Blanking Interrupt

"vbid()" if the game is started (is running).

If a certain state is reached, drop_beans() is called which then manipulates

the player_info-structure, i think this does fill the gamefield with the jellybeans

and also changes it later.

Then the gamefield is drawn by calling draw_beans(), but ATM i have no idea what is done there exactly.

 

Regards

Matthias

Edited by Matthias
Link to comment
Share on other sites

Now Jellybeans seems to be playable on the Lynx.

 

There is still a need to show what line and columnd you are

operating on. Perhaps a vertical and horisontal bar behind

the beans could do the trick.

 

But basically I have some clue of how the game is controlled.

 

Lynxjelly1.jpg

 

With a little help from some graphically talented person.

The beans should be a little smaller to make room for

multiplayer progress bars and other info required

during the game. I don't even know what more is

still needed on the screen as I have never played

the game.

 

But with a little more coding we could have a small

ComLynxable PD title that you can burn on an EPROM

and perhaps even connect to other Atari computers for

network gaming.

 

--

Karri

Edited by karri
Link to comment
Share on other sites

This is a nice work Karri, hope this will be finished soon (ans a Comlynx version would be so nice)

 

There are some guys who did the artwork for Fadest's demos. Those bitmap artworks looked fantastic. Maybe you should ask them to do that job for JellyBeans.

915150[/snapback]

I can't speak for Templeton (the guy who made the graphs, thanks for him) , as he has a lot of work (and extra-work) but some french guys asked me some times ago how to make graphisms for a lynx game.

I put a message on our forum with a link to this topic. Maybe one of them can help you.

 

Good luck Karri and keep the good work.

Link to comment
Share on other sites

This is a nice work Karri, hope this will be finished soon (ans a Comlynx version would be so nice)

 

There are some guys who did the artwork for Fadest's demos. Those bitmap artworks looked fantastic. Maybe you should ask them to do that job for JellyBeans.

915150[/snapback]

I can't speak for Templeton (the guy who made the graphs, thanks for him) , as he has a lot of work (and extra-work) but some french guys asked me some times ago how to make graphisms for a lynx game.

I put a message on our forum with a link to this topic. Maybe one of them can help you.

 

Good luck Karri and keep the good work.

916106[/snapback]

 

Thanks. I have browsed the French graphics in your demos. They are really

great! I hope you can find someone with a few spare evenings to make the

graphics for Jellybeans.

 

It seems that I need 5 different types of animated Jellybeans, an animated

brick and an animated bomb. In addition to this it would be cool to have

two progress bars for ComLynxing two units together.

 

There may also be a need to show text fields with "IN 0" and "OUT 0".

 

Some catchy logos with the text "Game Over", "Pause" and perhaps

"You win" or "You lose".

 

And of course a credits screen ;)

--

Karri

Link to comment
Share on other sites

Well, I went back to my sources and wrote a small perl script to grab the character sets and draw them... Of course, the colors are not correct, but this should help to get the graphics started.

 

-Cybernoid-

 

char_data0

post-4398-1124729259.png

 

char_data1

post-4398-1124729267.png

 

char_data2

post-4398-1124729274.png

 

char_data3

post-4398-1124729280.png

Edited by Cybernoid
Link to comment
Share on other sites

Hello Cybernoid,

 

thanks for the charset-pics :-)

 

Today i worked a little bit on the graphics-part of the project too, below is a screenshot.

 

There is no animation implemented, but you can "play" the game, means you can move the columns up and down or cycle the content of the center row to form a group of 3 or more beans of the same colour in the center row.

 

Regards

Matthias

post-2054-1124737313_thumb.jpg

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...