Jump to content
IGNORED

Lynx coding contest


Lynxman

Recommended Posts

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.

 

QuakQuak.png

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

post-2099-0-81123100-1351059154.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.

 

post-2099-0-71061900-1351059427.gif

 

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

 

--

Karri

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Here are the palettes on a Lynx II

http://www.youtube.com/watch?v=8SGxeTSJRHc&feature=player_detailpage

http://www.youtube.com/watch?v=wbLcLAIeEEM&feature=player_detailpage

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
Link to comment
Share on other sites

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:

 

post-2099-0-42534300-1351101410.png

 

to

 

post-2099-0-97970400-1351101434.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
Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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:

 

12Bit16ColorPalette.png

 

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

No problem. It is changed.

 

Visually it looks ok now.

post-2099-0-92476200-1351248399.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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

post-2099-0-16461300-1351427595.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

Link to comment
Share on other sites

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.

 

post-2099-0-46677100-1351431159.png

 

Or perhaps the official Lynx mascot could be the hero?

 

post-2099-0-09074600-1351431552_thumb.jpg

--

karri

Edited by karri
Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 4 months later...

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