September 19, 2019, 09:06:51 am

News:

Juju thinks he's so clever by putting funny stuff here



Alternatively, join us on Discord.

[4x3 contest] Red! Green! Blue!

Started by LD Studios, April 29, 2015, 10:13:07 pm

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LD Studios

April 29, 2015, 10:13:07 pm Last Edit: April 30, 2015, 02:24:16 am by LD Studios
My entry for the 4x3, not done yet, but pretty far along.

Lets see if you can tell what it is from the screenshot.



Strontium

Ooh, I think I know what it is!

Shall I tell the world?

Unicorn

Grrrrrrrr. I cn't see it on my kindle. Could you link to the screenie?


Put it in a spoiler



??? ??? ??? ??? ???

LD Studios

Quote from: Strontium on April 29, 2015, 10:17:04 pm
Ooh, I think I know what it is!

Shall I tell the world?

If you want, I think it's pretty clear though

Quote from: Unicorn on April 29, 2015, 10:17:47 pm
Grrrrrrrr. I cn't see it on my kindle. Could you link to the screenie?

https://img.ourl.ca/bloggif_554156907455f.gif



Strontium

Gotta use the red, green, and blue pixels to get as close to the target color as possible :3

Juju

Quote from: Strontium on April 29, 2015, 10:19:05 pm
Gotta use the red, green, and blue pixels to get as close to the target color as possible :3
Looks like it, nice one.
Read Zarmina!
YUKI-CHAAAANNNN
In the beginning there was walrii. In the end there will be walrii. All hail our supreme leader :walrii: --Snektron



if you wanna throw money at me and/or CodeWalrus monthly it's here

DJ Omnimaga

Ooh, I think I know what it is. I assume you have to press enter as soon as the color contrast is identical to the final block?

You might want to remove the spaces between blocks, though :P (unless that's an emulator bug?)

Strontium

I sent him a message about that. We were using the same method to get the block size right. Here is the code we use (I hope this small snippet is okay to share :P)

pixelW = platform.window:width()/4
pixelH = platform.window:height()/3


Of course, when drawn, with this code:
gc:fillRect(x*pixelW, y*pixelH, pixelW, pixelH) the weird decimals you get after dividing the width and height draw things oddly.

The solution? Round the values!
pixelW = math.ceil(platform.window:width()/4)
pixelH = math.ceil(platform.window:height()/3)

DJ Omnimaga

Keep in mind that you must not use other people's code, as the rules says, though. I guess one tiny routine is fine since, after all, we allow people to use Doors CSE8 BASIC libs, which were written by Kerm, but just making sure that people won't fill their game with other people's code. I am unsure if such entry would be disqualified, but if it wins then it's possible that the other person that provided code for you would win the prize and the contest instead of you. :P

I would also avoid posting code if I was you.

Unicorn

tr1p1ea also wrote those libs right...



??? ??? ??? ??? ???

DJ Omnimaga

Yeah true and Iambian wrote some Celtic libraries IIRC.

Unicorn

I can't express how helpful those have become for me.  All my games would look like junk without them!



??? ??? ??? ??? ???

DJ Omnimaga

On the 83+ we don't need them thankfully, due to faster screen refreshing and dual-layer ASCII support, but on the CSE ASCII just looks weird without color IMHO.

LD Studios

(let's not get too off topic on my contest thread...) :P




Powered by EzPortal