Jump to content



0

released JellyBeans-Source


38 replies to this topic

#1 walter_J64bit OFFLINE  

walter_J64bit

    River Patroller

  • 3,441 posts
  • Location:Goldsboro NC

Posted Mon Aug 15, 2005 1:12 PM

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:

Attached Files


Edited by walter_J64bit, Mon Aug 15, 2005 1:12 PM.


#2 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Mon Aug 15, 2005 3:11 PM

Hello Walter!


walter_J64bit, on Mon Aug 15, 2005 8:12 PM, said:

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:

View Post



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


Bye!
Matthias

#3 walter_J64bit OFFLINE  

walter_J64bit

    River Patroller

  • 3,441 posts
  • Location:Goldsboro NC

Posted Mon Aug 15, 2005 5:30 PM

Matthias, on Mon Aug 15, 2005 4:11 PM, said:

Hello Walter!


walter_J64bit, on Mon Aug 15, 2005 8:12 PM, said:

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:

View Post



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


Bye!
Matthias

View Post


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

#4 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Tue Aug 16, 2005 2:37 AM

Hi!

Quote

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

#5 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Tue Aug 16, 2005 6:45 AM

Matthias, on Tue Aug 16, 2005 10:37 AM, said:

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

View Post


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

#6 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

  • 889 posts
  • Luck can't last a lifetime unless you die young.
  • Location:Dallas, Tx

Posted Tue Aug 16, 2005 9:58 AM

karri, on Tue Aug 16, 2005 6:45 AM, said:

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

View Post



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

#7 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Tue Aug 16, 2005 11:54 AM

Hello Cybernoid!

Cybernoid, on Tue Aug 16, 2005 4:58 PM, said:

karri, on Tue Aug 16, 2005 6:45 AM, said:

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...

View Post


Could you perhaps provide the graphics in a non-A8-specific format?
Like BMP, GIF,TGA?


Regards
Matthias

#8 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

  • 889 posts
  • Luck can't last a lifetime unless you die young.
  • Location:Dallas, Tx

Posted Thu Aug 18, 2005 10:50 AM

Matthias, on Tue Aug 16, 2005 11:54 AM, said:


Could you perhaps provide the graphics in a non-A8-specific format?
Like BMP, GIF,TGA?


Regards
Matthias

View Post



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-

#9 walter_J64bit OFFLINE  

walter_J64bit

    River Patroller

  • 3,441 posts
  • Location:Goldsboro NC

Posted Thu Aug 18, 2005 4:52 PM

Cybernoid, on Thu Aug 18, 2005 11:50 AM, said:

Matthias, on Tue Aug 16, 2005 11:54 AM, said:


Could you perhaps provide the graphics in a non-A8-specific format?
Like BMP, GIF,TGA?


Regards
Matthias

View Post



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-

View Post



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

#10 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Thu Aug 18, 2005 11:25 PM

walter_J64bit, on Fri Aug 19, 2005 12:52 AM, said:

Cybernoid, on Thu Aug 18, 2005 11:50 AM, said:

Matthias, on Tue Aug 16, 2005 11:54 AM, said:


Could you perhaps provide the graphics in a non-A8-specific format?
Like BMP, GIF,TGA?

View Post

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.

View Post

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

View Post


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

#11 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Fri Aug 19, 2005 2:54 AM

Hi!

karri, on Fri Aug 19, 2005 6:25 AM, said:

walter_J64bit, on Fri Aug 19, 2005 12:52 AM, said:

Cybernoid, on Thu Aug 18, 2005 11:50 AM, said:

Matthias, on Tue Aug 16, 2005 11:54 AM, said:


Could you perhaps provide the graphics in a non-A8-specific format?
Like BMP, GIF,TGA?

View Post

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.

View Post

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

View Post


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....

View Post


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, Fri Aug 19, 2005 2:56 AM.


#12 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Fri Aug 19, 2005 5:15 AM

Matthias, on Fri Aug 19, 2005 10:54 AM, said:

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.

View Post


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

#13 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Fri Aug 19, 2005 6:32 AM

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

#14 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Fri Aug 19, 2005 7:05 AM

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

#15 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

  • 889 posts
  • Luck can't last a lifetime unless you die young.
  • Location:Dallas, Tx

Posted Fri Aug 19, 2005 9:33 AM

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

#16 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Fri Aug 19, 2005 2:29 PM

Hello Cybernoid!

Thanks for all the technical details :-)

Cybernoid, on Fri Aug 19, 2005 4:33 PM, said:

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.

View Post


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

#17 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

  • 889 posts
  • Luck can't last a lifetime unless you die young.
  • Location:Dallas, Tx

Posted Fri Aug 19, 2005 2:45 PM

Matthias, on Fri Aug 19, 2005 2:29 PM, said:

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 ;-)

View Post


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-

#18 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Fri Aug 19, 2005 4:28 PM

Eye candy can be added later...

Now I managed to compile a version using this graphics.

Posted Image

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.

Posted Image

Gameplay is still zero. Something is going on with the beans but I still
have no clue what happens there.

--
Karri

#19 agradeneu OFFLINE  

agradeneu

    Moonsweeper

  • 302 posts
  • Location:Germany

Posted Sat Aug 20, 2005 8:08 AM

Looks great. But I would say there's some need for new gfx.
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.

#20 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Sun Aug 21, 2005 3:51 AM

Hello Karri!

karri, on Fri Aug 19, 2005 11:28 PM, said:

Gameplay is still zero. Something is going on with the beans but I still
have no clue what happens there.

View Post



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, Sun Aug 21, 2005 3:52 AM.


#21 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Sun Aug 21, 2005 10:52 PM

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.

Posted Image

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, Mon Aug 22, 2005 12:31 AM.


#22 Fadest OFFLINE  

Fadest

    Moonsweeper

  • 384 posts
  • Location:France

Posted Mon Aug 22, 2005 2:41 AM

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

agradeneu, on Sat Aug 20, 2005 9:08 AM, said:

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.

View Post

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.

#23 karri OFFLINE  

karri

    Stargunner

  • 1,049 posts
  • Location:Espoo, Finland

Posted Mon Aug 22, 2005 2:58 AM

Fadest, on Mon Aug 22, 2005 10:41 AM, said:

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

agradeneu, on Sat Aug 20, 2005 9:08 AM, said:

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.

View Post

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.

View Post


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

#24 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

  • 889 posts
  • Luck can't last a lifetime unless you die young.
  • Location:Dallas, Tx

Posted Mon Aug 22, 2005 10:48 AM

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
char_data0.png

char_data1
char_data1.png

char_data2
char_data2.png

char_data3
char_data3.png

Edited by Cybernoid, Mon Aug 22, 2005 10:49 AM.


#25 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,044 posts
  • Location:Germany

Posted Mon Aug 22, 2005 1:05 PM

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

Attached Thumbnails

  • jb.gif





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users