Jump to content

Photo

Lynx coding contest


190 replies to this topic

#151 108 Stars OFFLINE  

108 Stars

    River Patroller

  • 2,275 posts
  • Location:Frankfurt, Germany

Posted Tue Oct 23, 2012 6:35 PM

As an example of the idea I had of using some graphics from OpenGameArt.org at least as placeholder graphics until a pixel artist comes along, I took some of the tiles from this sheet and adjusted them from the old EGA palette to the base palette I'm using


But it would still take quite a bit of work to look good. Atm the stuff just looks pretty strange/unpolished, and I doubt it's worth the effort to fix those graphics. We do have PAC-MAN-RED now, so a pixel-artist did actually come along. :) Sure, it can be a placeholder, but then again everything can be, even if it's just single color blocks. I'm not sure this is worth editing and integrating into the games when it will be throw out in the end anyway. But that's up to the coders to decide. :)

That is exactly how my palette is arranged.

Oh, and here's an adjusted palette for Little Green Quak-Quak using 12bit colour values instead of 24bit. I don't know why the palette uses 24bit colour values if the game is intended for a system with 12bit colour.

Posted Image


Because I don't know anything about bits and the likes; I just draw. I pick my palette with a ROM matashen gave me, wich lets me mix colors in handy. I mix them, take a screenshot and take the values from that.

Colors may get awry a bit through through the process of copying and pasting through several graphics until I'm done with my pixel stuff. May have happened here; usually the Lynx still displays them fine though, as they are only a little off and the Lynx displays the next possible value I guess.

About your palette: not sure if the colors are strong enough. You must imagine a huge lightsource behind the screen, brightening every color, making it lighter. Your red for example may look rather beige or so on the Lynx screen. You must always pick colors stronger than you intend them to be.

#152 MrBland OFFLINE  

MrBland

    Dragonstomper

  • 714 posts
  • 474|2!
  • Location:Richmond, Va

Posted Tue Oct 23, 2012 6:45 PM

If no one gets around to it by then,I'll try it after work and post the pics.

lol sorry guys, I'm not getting home tonight :( I meant well, maybe tomorrow if no one else gets to it.

#153 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Tue Oct 23, 2012 11:00 PM

Sage, you did not get it. I do not want to improve emulation. I want to improve the colors on the Lynx.

The problem with the Lynx LCD is that sometimes colors that can be seen on a PC become undistinguishable on the Lynx. This can be fixed by adjusting the spot colors or doing a general lookup-table. Adjusting the spot-colors is not a generic solution. I leave the generic solution to people who believe that the Lynx is worth it. My only desire is to have a default palette that works the same on Handy, Mednafen and Lynx.

#154 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Wed Oct 24, 2012 12:18 AM

Mini-tutorial in how to re-color stuff to the Lynx palette using Gimp.

1) Create a file called Lynx.gpl with this content:
GIMP Palette
Name: Lynx
Columns: 0
#
30 30 30 Untitled
225 90 90 Untitled
255 180 180 Untitled
165 180 210 Untitled
135 135 135 Untitled
105 90 90 Untitled
165 105 75 Untitled
240 165 90 Untitled
210 225 75 Untitled
90 210 60 Untitled
45 135 30 Untitled
75 60 60 Untitled
90 90 150 Untitled
45 150 240 Untitled
90 210 255 Untitled
255 255 255 Untitled

2) Save it in ~/.gimp-2.6/palettes folder (or some similar place depending on your OS)

Take some graphics you want to convert to the Lynx palette.

pjpa2194.gif

3) Choose Image->Mode->RGB

4) Choose Image->Mode->Indexed
x Use custom palette
Lynx
(untick "Remove unused colors from colormap")

After this you get the graphics in Lynx default palette colors.

LynxSprite.gif

I hope to let the sp65 understand transparent colors like in this example.

--
Karri

#155 Cammy OFFLINE  

Cammy

    Chopper Commander

  • 102 posts
  • Location:Gold Coast, Australia

Posted Wed Oct 24, 2012 3:58 AM

Karri, I'm curious about where you got these RGB values from: 30, 45, 60, 75, 90, 105, 135, 150, 165, 180, 210, 225, 240, 255 ?

#156 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Wed Oct 24, 2012 8:24 AM

Karri, I'm curious about where you got these RGB values from: 30, 45, 60, 75, 90, 105, 135, 150, 165, 180, 210, 225, 240, 255 ?


What I did was to create the palette in the Gimp by taking the screenshot of the Mednafen palette, using pick color, add to palette.

When I saved the palette as Lynx it produced this file.

Obviously the values are a bit off from what they should be. Perhaps there was one emulation layer too much.

If you have the real numbers if would be nice to have them.

The real color values I fed into the Lynx in GBR format are:
$000
$44d
$aaf
$ac9
$777
$445
$539
$94e
$d3c
$c24
$701
$223
$484
$8e1
$cf4
$fff

--
Karri

#157 MrBland OFFLINE  

MrBland

    Dragonstomper

  • 714 posts
  • 474|2!
  • Location:Richmond, Va

Posted Wed Oct 24, 2012 9:47 AM

Here are the palettes on a Lynx II


I did pictures but the colors looked more washed out in the pics than in real life, in the video it looks more true to life.
Sorry about the background noise, it stays pretty busy around here :)

Edited by MrBland, Wed Oct 24, 2012 10:00 AM.


#158 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Wed Oct 24, 2012 11:57 AM

Here are the palettes on a Lynx II


Thank you for the pics. The 3rd, 4th and 15th colors look pretty much the same. I believe that we need to add saturation and drop luminance. Something like:

LynxPalette.png

to

Modified.png

It is also interesting to see that the white in the last color slot is darker than the 4th color. It means that the screen is not uniformly lit. The only way to measure the colors is to use full screen with one color at a time and measure from the same spot. I hope I can do it tomorrow in the evening.

Edited by karri, Wed Oct 24, 2012 12:33 PM.


#159 108 Stars OFFLINE  

108 Stars

    River Patroller

  • 2,275 posts
  • Location:Frankfurt, Germany

Posted Thu Oct 25, 2012 11:46 AM

@karri
your edit of the palette with higher saturation looks good. Like that it will probably appear somewhat like in Cammy's original version when displayed on the Lynx screen.

I'm just wondering... Lynxman has not posted here in a while. He is doing the contest, so in general we should hear what he has to say especially regarding rules, date etc.

Edited by 108 Stars, Thu Oct 25, 2012 11:46 AM.


#160 Lynxman OFFLINE  

Lynxman

    Moonsweeper

  • Topic Starter
  • 413 posts
  • Location:Germany Stuttgart

Posted Thu Oct 25, 2012 12:25 PM

Hi all,

i read every day the new postings. I want to know your ideas. Maybe the rules should be made from the coders.

I like to support the community in any way and if a contest is ready to start i will think about a prize etc.

Next week i have some days vacation and maybe i will get some ideas. :)

Lynxman

#161 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Thu Oct 25, 2012 1:23 PM

Now I got the Lynx measured. Here is the desired color space

Screenshot from 2012-10-25 22:19:42.png

here is what the Lynx can display

Screenshot from 2012-10-25 22:20:19.png

A bit of a challenge to make these meet...

#162 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Thu Oct 25, 2012 10:46 PM

The graph is CIE1931 Chromaticity diagram. So just plot the Lynx dots here.

CIE1931.gif

Edited by karri, Thu Oct 25, 2012 10:46 PM.


#163 Cammy OFFLINE  

Cammy

    Chopper Commander

  • 102 posts
  • Location:Gold Coast, Australia

Posted Fri Oct 26, 2012 2:06 AM

Thanks for the videos of the palettes, MrBland! I wonder, if I sent you some mockup screenshots from my game, could you take a video of how they look on the Lynx screen?

We need to remember the Lynx has 12bit colour, which is 4,096 colours, 16 shades instead of 256. Therefor the RGB values you use in any Lynx game should only be ones the Lynx can actually display. These values are: 0, 17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255. There is no need to translate the palette into code, display it in an emulator, then pick the values up again from a screenshot. These should be the exact colours Lynx developers used back in the 80s and 90s when they were developing their games on Amiga hardware which shared the same 4,096 colour 12bit palette. The only adjustments needed would be to lighten or darken some shades if they're not appearing on a real Lynx LCD screen properly due to the backlight, which we have attempted to correct now after seeing the videos and reading the posts here, and much experimentation with a bunch of sprites and tiles using our palette.

So the Lynx colour values of these numbers are:

0 = 0
1 = 17
2 = 34
3 = 51
4 = 68
5 = 85
6 = 102
7 = 119
8 = 136
9 = 153
A = 170
B = 187
C = 204
D = 221
E = 238
F = 255

My palette using Lynx GBR values (interesting that it's arranged this way instead of RGB) is:

$011
$34D
$9AF
$9B8
$777
$334
$448
$75E
$D5F
$C53
$822
$223
$5A6
$8E5
$CF5
$FFF

I have re-uploaded the original image using our adjusted palette now, and here it is again so there's no need to go to the previous page:

Posted Image

I'll try and whip up a tutorial image explaining the use of each pen in the palette for games so people can start using it for themselves if they want to.

Edited by Cammy, Fri Oct 26, 2012 2:49 AM.


#164 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Fri Oct 26, 2012 3:11 AM

Thanks Cammy, this palette is now the default palette in the cc65. Available tomorrow in the daily snapshots.

The names of the colors is:
#define COLOR_BLACK 0x00
#define COLOR_RED 0x01
#define COLOR_PINK 0x02
#define COLOR_LIGHTGREY 0x03
#define COLOR_GREY 0x04
#define COLOR_DARKGREY 0x05
#define COLOR_BROWN 0x06
#define COLOR_PEACH 0x07
#define COLOR_YELLOW 0x08
#define COLOR_LIGHTGREEN 0x09
#define COLOR_GREEN 0x0A
#define COLOR_DARKBROWN 0x0B
#define COLOR_VIOLET 0x0C
#define COLOR_BLUE 0x0D
#define COLOR_LIGHTBLUE 0x0E
#define COLOR_WHITE 0x0F

tgi_setcolor(COLOR_BLUE);
tgi_bar(0, 0, 159, 101);
tgi_updatedisplay();

If you want to set the palette from your own C-code.

static char Cammys_palette[] = {
0x011 >> 8,
0x34D >> 8,
0x9AF >> 8,
0x9B8 >> 8,
0x777 >> 8,
0x334 >> 8,
0x448 >> 8,
0x75E >> 8,
0xD5F >> 8,
0xC53 >> 8,
0x822 >> 8,
0x223 >> 8,
0x5A6 >> 8,
0x8E5 >> 8,
0xCF5 >> 8,
0xFFF >> 8,
0x011 & 0xFF,
0x34D & 0xFF,
0x9AF & 0xFF,
0x9B8 & 0xFF,
0x777 & 0xFF,
0x334 & 0xFF,
0x448 & 0xFF,
0x75E & 0xFF,
0xD5F & 0xFF,
0xC53 & 0xFF,
0x822 & 0xFF,
0x223 & 0xFF,
0x5A6 & 0xFF,
0x8E5 & 0xFF,
0xCF5 & 0xFF,
0xFFF & 0xFF
};

tgi_setpalette(Cammys_palette);

Edited by karri, Fri Oct 26, 2012 3:27 AM.


#165 Cammy OFFLINE  

Cammy

    Chopper Commander

  • 102 posts
  • Location:Gold Coast, Australia

Posted Fri Oct 26, 2012 3:24 AM

Hi Karri, I'm sorry but we have made an important last-minute adjustment. The palette should now be:


$011
$34D
$9AF
$9B8
$777
$335
$448
$75E
$D5F
$C53
$822
$223
$484
$8E5
$CF5
$FFF

I'll make an image to explain the use of this, sorry for the mucking about.

Edited by Cammy, Fri Oct 26, 2012 4:02 AM.


#166 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Fri Oct 26, 2012 4:19 AM

No problem. It is changed.

Visually it looks ok now.
Screenshot from 2012-10-26 13:44:32.png

Here is the Gimp palette from the new values Lynx.gpl:
GIMP Palette
Name: Lynx
Columns: 0
#
17   0  17	 Black
221  51  68	 Red
255 153 170	 Pink
136 153 187	 Lightgrey
119 119 119	 Grey
85  51  51	 Darkgrey
136  68  68	 Brown
238 119  85	 Peach
255 221  85	 Yellow
51 204  85	 Lightgreen
34 136  34	 Green
51  34  34	 Darkbrown
68  68 136	 Violet
85 136 238	 Blue
85 204 255	 Lightblue
255 255 255	 White
--
Karri

Edited by karri, Fri Oct 26, 2012 4:47 AM.


#167 Ninjabba OFFLINE  

Ninjabba

    Dragonstomper

  • 600 posts
  • Location:Lurking in the Darkness

Posted Fri Oct 26, 2012 5:43 AM

Great to see such a detailed discussion about the usage of palettes is taking place here; perhaps its an idea to move that part to the programming section so its easier to look up?

About a 2nd contest.. I'm curious about how many programmers feel like participating. Last time I believe I was the only person to actually submit half a game. This time around I'm much better prepared, so I could definitely do a full entry. However, it would be interesting to have an overview of the number of contestants if only to motivate some healthy competition.

#168 MrBland OFFLINE  

MrBland

    Dragonstomper

  • 714 posts
  • 474|2!
  • Location:Richmond, Va

Posted Fri Oct 26, 2012 7:38 AM

Thanks for the videos of the palettes, MrBland! I wonder, if I sent you some mockup screenshots from my game, could you take a video of how they look on the Lynx screen?


No problem, just make sure what ever you send me or post for me to test is in .lnx format like Karri's was. It makes it easier to put on the Flashcart.

#169 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Sun Oct 28, 2012 6:36 AM

Hi guys. I tried to convert the tree from one of the example files to Lynx colors. Looks nice.

Tree.png

It would be nice to have a tree, some flowers, a bird and a stone in the same style. From these it should be quite easy to build backgrounds to the game.

--
Karri

#170 karri OFFLINE  

karri

    River Patroller

  • 2,119 posts
  • Location:Espoo, Finland

Posted Sun Oct 28, 2012 7:13 AM

I am still pondering about what to write.

Somehow a game with streaming content appeals to me. Perhaps a graphics 3D adventure of some kind. The hero would be in the centre of the screen and he could move in all 8 directions that can be set by the joypad (no up/down). The view would be isometric and the objects would be sprites like the tree in the previous post. The world moves. Sprites don't scale but move relative to the hero.

The object of the game would be to fill the kettle with gold (very original, isn't it?)

So you walk around in the forest and solve minigames. A bit like WoW.

Perhaps you could even make a real-time MUD out of this over ComLynx.

Here is an idea of a hero character. I don't want to go into animating too much details.

Viking.png

Or perhaps the official Lynx mascot could be the hero?

lynxmascot.jpg
--
karri

Edited by karri, Sun Oct 28, 2012 7:39 AM.


#171 vince OFFLINE  

vince

    Star Raider

  • 69 posts
  • Location:PARIS (FRANCE)

Posted Sat Nov 24, 2012 7:41 AM

Last week, there was a speed coding contest at the AC2012

http://www.yaronet.c...?sl=72&s=146544

I made a little game (nyan cat http://devlynx.ti-fr...AC2012/nyan.lnx) : you are nyan cat, and you have to take stars when they explode, for each star you get, you win a color on the rainbow...


If you want to try coding another nyan cat music, here's the music source...
extern char nyan_main_droite[];
extern char nyan_main_gauche[];
extern char nyan_start[];
#asm
_nyan_start
		    dc.b "O2X4I1V65T5R40H2K3" 
		    dc.b "O2EFGzcFEFGcegagBcz GzEFGzc2dBcdfefcz"
		    dc.b 0 

_nyan_main_droite
		    dc.b "O2X4I1V65T5R40H2K3" 
		    dc.b "|:G2A2=EE2D=EDC2C2D2"
		    dc.b "=E2EDCDEGAEGDECDCE2G2AEGDEC=EE=EDCD=E2CDEGD=EDCD2C2D2"
		    dc.b "G2A2=EE2D=EDC2C2D2=E2EDCDEGAEGDECDCE2G2AEGDEC=EE=EDCD"
		    dc.b "=E2CDEGD=EDCD2C2C2C2O1GAc2GAcdecfefg c2c2GAcGfedcFEFG"
		    dc.b "c2GAc2GAccdecGAGc2cBcGAcfefgc2B2c2GAc2GAcdecfefg"
		    dc.b "c2c2GAcfedcFFc2GAc2GAccdecGAGc2cBcGAcfefgc2d2"
		    dc.b ":"
		    dc.b 0 
_nyan_main_gauche
		    dc.b "O4X4I1V65T5R40H2K3" 
		    dc.b "|:"
		    dc.b "F2f2G2g2E2e2A2a2D2d2G2g2CcC2D2E2"
		    dc.b ":"
		    dc.b 0 
#endasm

And the code to call it :
abcmusic(0,nyan_start); //l'intro
  for(i=0;i<340;i++) Vsync();
  silence(); 
  abcmusic(0,nyan_main_droite);
  abcmusic(1,nyan_main_gauche);


#172 LX.NET OFFLINE  

LX.NET

    Dragonstomper

  • 741 posts
  • Location:The Netherlands

Posted Sun Nov 25, 2012 7:14 AM

Cool stuff. PM sent

#173 vince OFFLINE  

vince

    Star Raider

  • 69 posts
  • Location:PARIS (FRANCE)

Posted Sun Nov 25, 2012 9:48 AM

LX.NET asked for it : here is the sourcecode http://devlynx.ti-fr.com/AC2012/nyan.c

/!\ Not for commercial use without my permission /!\

#174 108 Stars OFFLINE  

108 Stars

    River Patroller

  • 2,275 posts
  • Location:Frankfurt, Germany

Posted Sun Apr 7, 2013 8:09 PM

So, is the competition going or what?
obschan would have something neat ready in April I believe, but I get the feeling nobody really felt the competition was set.

Edited by 108 Stars, Sun Apr 7, 2013 8:10 PM.


#175 obschan OFFLINE  

obschan

    Chopper Commander

  • 168 posts
  • Location:Hong-Kong

Posted Mon Apr 8, 2013 5:37 AM

Yes, hopefully in a couple a weeks. Somebody is in ?




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users