Jump to content

Photo

released JellyBeans-Source


38 replies to this topic

#26 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

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

Posted Mon Aug 22, 2005 2:00 PM

Matthias,

That is simply awesome! :cool:

How does the Lynx Com work? Is it a normal serial port that can be connected to an A8 to play a multi-player game?

-Chris

#27 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,171 posts
  • Location:Germany

Posted Mon Aug 22, 2005 2:18 PM

Matthias,

That is simply awesome!  :cool:



The code was of course worked out by Karri, i just have changed it a little bit to display those graphics for a vertical standing gamefield.

How does the Lynx Com work?  Is it a normal serial port that can be connected to an A8 to play a multi-player game?

View Post


I am a bit out of the business, so no details, but i can tell you that the so called ComLynx-port of the Lynx provides a single data-line with TTL-level which is internally connected to TxD and RxD of the chipset. So all connected devices have to handle all those nice echoes ;-)

I think that we should be happy if we get the game working completely on the Lynx and then could start thinking about a Lynx-Lynx-connection, and then (far far away) we could think about connecting with other computers ;-)

Regards
Matthias

#28 walter_J64bit OFFLINE  

walter_J64bit

    Quadrunner

  • Topic Starter
  • 5,200 posts
  • Location:Goldsboro NC

Posted Mon Aug 22, 2005 6:01 PM

Matthias,

That is simply awesome!  :cool:



The code was of course worked out by Karri, i just have changed it a little bit to display those graphics for a vertical standing gamefield.

How does the Lynx Com work?  Is it a normal serial port that can be connected to an A8 to play a multi-player game?

View Post


I am a bit out of the business, so no details, but i can tell you that the so called ComLynx-port of the Lynx provides a single data-line with TTL-level which is internally connected to TxD and RxD of the chipset. So all connected devices have to handle all those nice echoes ;-)

I think that we should be happy if we get the game working completely on the Lynx and then could start thinking about a Lynx-Lynx-connection, and then (far far away) we could think about connecting with other computers ;-)

Regards
Matthias

View Post


Matthias is awesome! :D

#29 Isgoed OFFLINE  

Isgoed

    Stargunner

  • 1,432 posts
  • Location:Holland

Posted Tue Aug 23, 2005 1:32 AM

I think both Matthias and Karri are "awesome" :)

#30 walter_J64bit OFFLINE  

walter_J64bit

    Quadrunner

  • Topic Starter
  • 5,200 posts
  • Location:Goldsboro NC

Posted Tue Aug 23, 2005 5:43 AM

I think both Matthias and Karri are "awesome"  :)

View Post

TRUE! :thumbsup: :thumbsup:

#31 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,171 posts
  • Location:Germany

Posted Wed Aug 24, 2005 5:28 AM

Hello Cybernoid,


can you please explain the encoding of the parts of the "player_info"-structure?
I am trying to output the "score", but i fail:

buf[0] = '0' + (player_info.score[0] & 0x0f);
buf[1] = '0' + (player_info.score[1] & 0x0f);
buf[2] = '0' + (player_info.score[2] & 0x0f);
buf[3] = '0' + (player_info.score[3] & 0x0f);
buf[4] = '0' + (player_info.score[4] & 0x0f);
buf[5] = '0' + (player_info.score[5] & 0x0f);
buf[6] = '0' + (player_info.score[6] & 0x0f);
buf[7] = '0' + (player_info.score[7] & 0x0f);
buf[8] = '0'; /* a score of 2 means "200", so add two 0s */
buf[9] = '0';
buf[10] = 0; /* terminate the string */


Thanks in advance
Matthias

Edited by Matthias, Wed Aug 24, 2005 9:03 AM.


#32 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,171 posts
  • Location:Germany

Posted Wed Aug 24, 2005 9:10 AM

Hi!

Ok, i think i have found the reason for my failure:
The "score"-array was not just a simple char-array of 8 bytes, but part of the cells of the text-screen, so the values in the 8 bytes weren't zero-based and also accessed by a vector which was too large after i have adapted the SCREEN_WIDTH and SCREEN_HEIGHT defines to values suitable for the Lynx (20 and 12, as they are text-cell-based).

Regards
Matthias

Attached Thumbnails

  • jb2.gif


#33 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,171 posts
  • Location:Germany

Posted Wed Aug 24, 2005 10:02 AM

Hello,

attached is the RAM-based game binary (for BLL or Handy, but i have tested only with Handy).

Press OPTION1, OPTION2 or PAUSE to close the title-screen,
then press OPTION1 to start the game (=let the beans appear).

Use UP or DOWN to move the selected column up or down
and LEFT or RIGHT to change the column-selection.

Use FireA and LEFT or RIGHT to cycle the beans in the middle row (marked with the dark red bar).

Use the above controls to build up a group of at least 3 objects of the same type
(beans of the same colour or bombs), see the Jellybeans-website for details.

Regards
Matthias

Attached Files



#34 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

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

Posted Wed Aug 24, 2005 1:23 PM

Hello,

attached is the RAM-based game binary (for BLL or Handy, but i have tested only with Handy).

View Post


Great! I had a fun time playing around with this version. I am surprised that something was ported so quickly that is actually half-way playable! Keep up the good work!

It is a little slow yet...but heck my first version of JellyBeans was slow and the graphics were not very good. I expect to see a version that rivals the Atari 8bit version soon! ;)

I was surpised to see the title screen make it in at the early stage... very cool! Adam, would be proud.

-C-

#35 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

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

Posted Wed Aug 24, 2005 2:26 PM

Matthias,

This is actually very playable with the emulator speed turned up! Of course, the skill level is set way low... but hey, the creator should be able to play his own game right? Make this so that it drops 3 beans every second and I will have a problem.... :ponder:

Cybernoid/Chris

#36 Matthias OFFLINE  

Matthias

    Stargunner

  • 1,171 posts
  • Location:Germany

Posted Wed Aug 24, 2005 3:01 PM

Hello Cybernoid!

This is actually very playable with the emulator speed turned up!  Of course, the skill level is set way low... but hey, the creator should be able to play his own game right?  Make this so that it drops 3 beans every second and I will have a problem....  :ponder:

View Post


Yes, i too think it is working slow, but as i can't compare the Lynx-port to the original i can't say if it's just the joypad-handling which is slow or also the game-engine. Those counters run in the VBL-Handler, and if am not mistaken the Lynx runs with 70 Hz (as the standard setting which can be changed)?
So the game-engine should run faster than on PAL/NTSC-A8s? Seems to indicate that something in the port isn't implemented properly.

Yesterday i played about 20 minutes before i had 3 bombs on the screen, i had mastered several bricks before, but i saw no goal which i have to reach?
--> When does the game end?



Regards
Matthias

#37 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

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

Posted Wed Aug 24, 2005 4:14 PM

Yes, i too think it is working slow, but as i can't compare the Lynx-port to the original i can't say if it's just the joypad-handling which is slow or also the game-engine. Those counters run in the VBL-Handler, and if am not mistaken the Lynx runs with 70 Hz (as the standard setting which can be changed)?
So the game-engine should run faster than on PAL/NTSC-A8s? Seems to indicate that something in the port isn't implemented properly.


Hmm, the first version of JellyBeans will select between 50Hz or 60Hz, and use the VBI counter. So it doesn't matter if it is running on PAL or NTSC. The timing would be the same.

Yesterday i played about 20 minutes before i had 3 bombs on the screen, i had mastered several bricks before, but i saw no goal which i have to reach?
--> When does the game end?


View Post


The game ends like Tetris... when the playfield fills with jellybeans. So, it is currently set way too easy. New Jellybeans should appear often... along with brings and bombs... new jellybeans are suppose to appear at an increasing rate as time goes on.

I am thinking of doing a JellyBeans II, where you have levels to reach... so you remove a certain number of jellybeans and you move to the next level. But, before you go to the next level you have to play a bonus round... I was thinking that maybe during the bonus round you have to match a certain number of patterns in a certain time before going to the next level.

-Chris

#38 karri ONLINE  

karri

    River Patroller

  • 2,549 posts
  • Location:Espoo, Finland

Posted Wed Aug 24, 2005 10:41 PM

The speed problem is not with the joypad.

Pressing Opt1, Opt2 or Pause causes a sleep for a while as the driver will try to see if you want a Flip screen or a Restart.

But I am afraid that calling C-code from the interrupt handler can crash the game at unpredictable times or cause slowdowns.

It would also be nice to completely separate gameplay from the display loop.

In the A8 implementation you can change beans all over the code and they appear on screen by "magic". This is not true for the Lynx.

On the Lynx you would like to code like:
init_stuff
while (forever) {
  gameplay();
  if (display_is_idle and stuff_to_display) {
    display_beans();
    display_is_idle = false;
  }
}

The vbl interrupt should only be

if (display_is_idle == false) {
  swap_display_buffers()
  display_is_idle = true
}
Then the gameplay can run at realtime speed and the screen is drawn only when we have the extra time to do it.

Anyway... Working together with Matthias on this was a nice little excercise on the cross-platform capabilities of the new cc65 compiler. Uz and the other cc65 people have done a great job.

Perhaps a full ComLynxed version will find its way on a compilation cart in the future :P

My suggestion is to move all machine dependent code into separate files. And use "standard" interfaces whenever possible.

Cybernoid, could you merge some of the results of our porting efforts to the main tree of Jellybeans? With some fairly small changes we could make Jellybeans compile out of the box on other platforms like Apple, C64, C128, Lynx, Atmos etc...

--
Karri

Edited by karri, Thu Aug 25, 2005 12:23 AM.


#39 Cybernoid OFFLINE  

Cybernoid

    Dragonstomper

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

Posted Thu Aug 25, 2005 7:22 AM

Anyway... Working together with Matthias on this was a nice little excercise on the cross-platform capabilities of the new cc65 compiler. Uz and the other cc65 people have done a great job.

Perhaps a full ComLynxed version will find its way on a compilation cart in the future  :P

My suggestion is to move all machine dependent code into separate files. And use "standard" interfaces whenever possible.

Cybernoid, could you merge some of the results of our porting efforts to the main tree of Jellybeans? With some fairly small changes we could make Jellybeans compile out of the box on other platforms like Apple, C64, C128, Lynx, Atmos etc...

--
Karri

View Post


Karri,

Sure. I understand the problems with porting this code. I never designed it (nor released it) to be portable... unfortunately. I released the code thinking that someone would use it for a similar game on the 8bit or even make this one better. So, to see this already well on the way on the Lynx is great.

I will take the code from the Lynx port so far and merge this with what I have, and try to make the main game engine as standard as possible.


Great work!!!

-C




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users