Join us on Discord!
You can help CodeWalrus stay online by donating here.
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Snektron

#1
Quote from: c4ooo on August 17, 2017, 02:15:48 PM
Quote from: Juju on August 17, 2017, 05:22:51 AM
Depending of the language you use, it is possible to check if your integer is an integer. As in, you can cast your float into an int, if it didn't lost information it's an integer.
Yep. In a float, the first byte is almost always a signed exponent, so as long as it is >=0 its an integer (unless I got something mixed up). This should be useful if someone does the challenge in assembly.

thats not true, because the mantissa (other part of the float) is a fraction part: (1/16 + 1/8)*2^3 is 1.5, but it still has a positive exponent.
Instead you could check if the mantissa is clone enough to zero: if its smaller than 0.00001 for example is probably an integer. I think most is_integer() functions will work this way.

My solution actually uses this:
#define mainImage(O, U)O+=sign(fract(length(U-.5)))
O is the output color, U is the input coodinate plus 0.5. length() is just sqrt(U.x*U.x + U.y*U.y).
fract takes the fraction part of the float (the mantissa). Sign(x) returns -1 if x < 0, 0 if x == 0 and 1 if x >0. I think the sign function internally also compares x to some small value.
#2
you havent updated the standings yet, juju
#3

#define mainImage(O, U)O+=sign(fract(length(U-.5)))

50 chars / 51 bytes
view live on ShaderToy
its bigger than 64x96 though so you'll just have to resize your browser.
#4
Other / Re: Your post/coding Milestones!
August 16, 2017, 11:07:23 AM
hes onto me :ninja:
#5
Really starting to shape up! nice work ;)
Does the project builder support non-ez80 / non-ti targets too? just wondering.

Also, an idea might be integration to some kind of versioning like overleaf does. (You can edit LaTeX and host the project on github.)
#6
I actually got everything from the SDK to work, even the tool that converted a folder structure into a knightos filesystem. It took a damn amount of research to find out how to tell if a folder is a symlink in windows <_<. I dont think i ever pushed it though...
#7
Quote from: Streetwalrus on June 28, 2017, 08:59:00 PM
Quote from: _iPhoenix_ on June 28, 2017, 04:44:17 PM
I use GIMP, it's very nice, overly powerful, super redundant, and just plain overcomplicated (for what I use it for, at least) in an awesome way.
I second this. GIMP is WAY beyond overkill for simple sprites but I still like using it.
I dont. Its learning curve is way too high to use it for small edits to images i usually make.
#8
I like digital copies more because
1) i can get games instantly
2) i can pirate games
3) some games aren't even sold physically
4) how do they even get 40 GB games on disks nowadays? im not really in the mood for using 8 installation disks
5) also i feel like they tend to be cheaper.
#9
That backend finally works? Sweet...
#10
Reminds me of the stuff i did during school. My calculator would often get confiscated by my physics teacher, which resulted in me talking with other students instead of minding my own calculator business. Not a smart move on her part ;D
#11
Wans't there a walrii 3d model? that seems like a good main character  ;)
#12
Quote from: DJ Omnimaga on May 03, 2017, 04:40:20 AM

In addition to that, I've kind of transitioned to a new social life over the years and the transition shall be complete in a not so distant future

Will you come out of your cocoon and emerge as a majestic butterfly?
#13
There should be some whay that points automatically replenish. Also maybe some way to encourage giving points? (its not like the karma system is really used which is basically the same thing)
#14
if you still run 32-bit you must have not upgraded since 2007
#15
Using wabbitemu's debugger i found this disassembly:


ld a, l
bcall(_HomeUp)
ld a,h
bcall(_ClrScrnFull)
ld hl, 0x88B0
ret


Powered by EzPortal