Last Login:
August 17, 2017


User Profile

Hits: 10,659
Joined April 03, 2014
Games (4)

Crab Food
July 27, 2014
July 27, 2014
Nopy's Demo
November 09, 2014
China Tunneling
April 02, 2015
Favorite Users

And the Iron Trophy goes to....
Posted on October 03, 2016 at 15:35

Congratulate HER very much everyone!

2nd place
SpectreNectar! Congratulate him a little bit.

Split 3rd place
Aistarin and Jani Nykänen. Honorable attempts, but bronze is not iron.

Dead last
StevenOBrien. He had the most points, by far, for a while. ~(1<<31) or 2147483647, maximum 32-bit signed integer. But then someone gave him another point, causing overflow and flipping the sign bit, resulting in -2147483648. Much sad, many pepe's for him. ;-;

Incredibly, just like last time, no one ended up with 0 points.

Iryno4Digits - September 21- October 1
Posted on September 21, 2016 at 10:59

Ironic Art Compo

Vote by sending me a pm with 3, 2 and 1 points distributed over your three favorites. Vote now!!!111

The theme is Irony. Interpret as you wish. Make ironic art in any way you can.

Yes. The winner will be congratulated. The winner may boast about having won the compo for an entire week. The winner will be pressured to arrange the next compo after this one.

Write an unlisted blog post about your artwork, then link to it in the comments (in this thread), or pm me.

~1st October, 23:59:59, your local time, late submissions will be accepted.

Good luck!

StevenOBrien (Show)

Jani_Nykanen (Show)

ShinseiOnnen (Show)

S3xySeele (Show)

Zuurix (Show)

Aistarin (Show)

SpectreNectar (Show)

Nopy's entry
Posted on September 10, 2016 at 18:03

I streamed the entire process yesterday, but Twitch the bitch didn't save the video. WTF? You have to check a box for that to happen nowadays. Back in the day, we didn't have to bother with that crap... **mumble** **grrrr**.

*It should have been Dr. Mario, not regular Mario, for Science. But under the immense pressure of live-streaming I didn't think of that. I also felt I had to keep painting even If I didn't know what I was doing. Usually, I have a plan when I draw stuff. Had no plan to paint mario at all when I started the stream. At least there are mushrooms.

Software Renderer over and done with
Posted on August 01, 2016 at 20:39

Maybe this will turn out to be a premature postmortem blog, but at least my Jani Frequency pretty low since I don't write that often. Well, in this moment, I believe I will shelf the project. Might dig it up for a micro jam-game or something. Or take if off the shelf I mean. Anyhow.

fat gif (Show)

It's about the software renderer I started for Goofy4Digits. I was thinking I could do something else with it after the compo, but now I'm dropping it. I decided I should blog about it. Droppin'n'Bloggin. If you count only the code-base, the project started with the compo, but I've been interested in software rendering for a long time and experimented with it now and then since last year. I've been itching to write a renderer in C.

I decided to not use floats. Not <math.h> either because it uses floats. I wanted to play around with integers and bit fiddling, I seldom get to do that. And it would be more true to the retro vibe. A lot of stuff like this:


//let 4096 (or 1<<12) represent 1.0
//a * b would be
a * b >> 12 
//for division
(a << 12 ) / b 

But this is not a real deal DOS game or anything. I use win32 + openGL for scaling up the framebuffer to fullscreen. 320x200 gets annoyingly small on a modern display. Nor am I using asm, which would probably be necessary for making it fast enough for a 90s PC.

^ Exquisite texture work.

The greffix pipeline goes like this
1. Have a triangle, three vertices of some kind. {x,y,z, u,v, r,g,b}
2. Transform verts by inverse camera matrix, do lighting calcs per vertex.
3. Clip triangle by frustum planes.
4. Perspective divide.
4.5 (optional) Store primitive (type info, texture id, verts) in a z-ordered list and draw later.

5.a Rasterize. It's different from the method I used in MAG64 where I tested each pixel inside the rectangle
formed around the triangle. This time the triangle edges are traced, and for each scan line, you get two new vertices which are mixed versions of the top and bottom verts on each edge. For perspective correctness, their depth difference must be taken into account.
5.b The same thing goes on each pixel on the scan line (between the two new verts), t must be adjusted.


    //PSUEDO, pretend everything is float for readability 

    //how far we've come on the scanline between two verts
    t = current_pixel / (end - start); // unadjusted, some number between 0. and 1.

    //divide t on both sides of the pixel by z
    w0 = (1.-t) / A.z;
    w1 = t / B.z;

    t = w1 / ( w0 + w1 );
    //depth correct interpolated vertex values ( uv's, rgb's)
    vertex = interpolate ( A, B, t );               
    //our "shader program"        
    framebuffer[ current pixel ] = sample_texture( vertex.s, vertex.t );

I'm not going to write more detailed than this. I'll upload the src to github if anyone is interested.

16-bit color framebuffer, RGBA_5551. The alpha bit is used as a mask when drawing the "sky-box".
PS1-style matrix dithering.
4 function shading modes:
Solid color. The fastest.
Gouraud. Interpolate colors between vertices in linearly 2D.
Perspective correct Gouraud. Interpolate colors between vertices, with regards to depth of each vertex.
Perspective correct Gouraud Textured. As above, but with texture sampling. (With only one hard coded texture available to choose from and no system for multiple texture of any sort.)

Oh god, oh god, I spent a month on this??? This could have been made in Unity in one hour. But, I'm not feeling too bad. I've spent a good time of the evenings and weekends away from the computer enjoying the summer. :)

It would've been possible to take one or two days and just make a goofy little game like a simple space shooter or frogger or something by the end of the compo. The engine was good enough at that point (terrible, but capable). Tho, I'd risk that feared second place.

I'm feeling pretty happy about leaving this thing now. I've done enough to see what the fuzz is about, I can happily go back to more practical things. Like gl. Or maybe something entirely different. I'm a little sick of programming atm. Maybe do more art. Or watch watch 700 episodes of One Piece. (YOU decide in the comments!!)

Inspiration: Mechwarrior 2, Star Fox, Doom, and the usual PS1 stuff.

MAG64 write-up
Posted on November 13, 2015 at 18:31

Remember that flight game I tried to make for MAG? If not, scroll down to my previous blog entry.

I wanted to turn it into an actual game before writing more about it, but since I haven't spent a single day of October or November working on it, I'll kill the project now with this techno-babble.

The last thing I did, at the time of the MAG deadline:.

I turned it into a Wipeout like jet fighter racer. It only looks like the game is working on the gif, in reality nothing is stopping you from flying through the walls. I have the functions to perform ray triangle collision, but I'm only putting them to use for bullets, and only for on segment of the track. But enough about the game.

No depth buffer
My JS-renderer does not use a depth buffer. Surfaces are instead rendered
back to front (painter's algorithm), and many of the pixels are overwritten over and over. To achieve this the triangles are sorted by their distance to the camera. I will not
go into detail about this. I use a bucket list. A max-heap might work well, or just quick
sorting or whatever. I guess it depends on what suits your data.

So you have a bunch of 3D-triangles you want to render form a certain view, at a certain scale and rotation. These things are achieved with matrices as you know. It's just like you've seen in a hello world glsl vertex program like this one...

out = projection*view*model*in_vertex;

...except I use js, and I bake all matrices into one before processing the vertices.

//combine matrices
var matrix=matrix4_mul(  projection, matrix4_mul( view, model)  ) ;

//transform vertices
for each vertex
     tvertex=matrix4_mul_vec4( matrix, vertex);

//JS-psuedo, in real practice there are more things to keep in mind.

I don't. I should. The step that removes everything outside the frustum. In my engine, I only skip triangles that are completely behind the near plane, behind the camera or too far away. If a triangle has one vertex in, my engine pushes the other two in. This causes close triangles to look funny sometimes as the triangle is compressed. If I were to skip the entire triangle just because one of the vertices happened to be behind your feet, there would be holes in the ground.

Proper clipping would be the best way of course. Spoiled openGL users think they are oppressed, but they haven't felt the real struggle yet.

This step converts the still-3D vertices into screen space 2D. Another thing GL does for you.

In my code, I do something like:

screen_vertex.x=( tvertex.x/tvertex.z*.5+.5 ) * render_width;
screen_vertex.y=( tvertex.y/tvertex.z*.5+.5 ) * render_height;

//screen space is 2D, but I use z for perspective correction later.

First, xy are divided by z. This causes things that are far a away (large z) to be smaller.

The coordinates are also offset and scaled to fit the screen. In the 3D-world, [0,0] is at the center, and the screen covers -1 to 1. In 2D, we want it from 0 to width and 0 to height.

Now we have a bunch of screen space triangles that needs to be filled in.

Obviously done by openGL, and at great speed too. Some say GL is a rasterization library only. But I disagree, as openGL does more than that.

In no way can I explain this better than Fabian Giesen of Farbrausch fame.
(also check out his previous blog for the theory)

for each triangle
for each pixel in the min-max rectangle surrounding the triangle
check if inside the triangle
put pixel

I don't do it exactly like the code on his blog, but pretty much. In my engine, the entire "fragment shader" resides inside the loop, so it's a monster of a function.

Additionally to what's in the Ryg blog; remember that z I saved in the previous step? My rasterizer function divides each barycentric vertex weight by the z of that vertex. This gives you perspective correct results, something the PS1 could NOT do. It only had x and y to work with when rasterizing. In order for things not to look like shit, polygons (almost always quads) had to be subdivided to ease the ugliness. This is where those PS1 zic-zac textures comes from.

The sky
Oops, almost forgot about this. Basic version.

Each screen pixel is converted to a ray. The ray is tested against spheres (sphere ray intersection) . On hit, we draw a pixel of a planet, the sun and so on. Otherwise, the ray vector determines the color of the sky.

I also project the ray onto a plane for the cloud belt, the cloud intensity is just perlin_noise ( hit_point.x, hit_point.y).

I didn't mention the texture sampling. It's a single function, + the texture data ofc, similar to the wiki one:

The game
My real code is pretty unreadable. It was written to be small (js13k) not pretty. If you really really want to nerd out, here's the game in the state I left it at.

All code is there and you can open game/index.html to run it

Controls for the game:
TAB -> "autopilot" off
R -> switch between 320*240 and 160*240
U -> Ultra Rapid
BACKSPACE-> Change Camera
SHIFT-> throttle
Arrows -> Pitch and Roll
Alt + Left/Right -> Yaw
H -> Glitch Out


Posted on September 23, 2015 at 17:09

I'm working on a flight game in javascript. So far, I have terrain, sky, a Nighthawk F-117 (maybe I should have a shoe instead...) and some wonky plane physics.

I'm not sure where the design should go. The hawk was made mostly as a placeholder, because it takes like 10 polys to model it. With that and the sky and the infinite terrain there (both making use of usual perlin noise), the game looks like it would play like Ace Combat. When I started working, I was thinking something more star-foxxy, more space exotica. Not sure where to take it next.

The game uses a software renderer that I wrote earlier this month to participate in JS13K with. It was going to be an awesome FPS and dreams and stuff, but ofc. I didn't have a game made in time for the 13th. :( JS13K is a compo where the challenge is to use max 13k of JS and data in a zipped folder.

The renderer itself uses HTML5 for the canvas and the function putImageData(array_of_pixels). The rest is my code manipulating the pixel array. Beware, JS rasterization of triangles is not very fast (ofc, my code could surely be a lot more efficient). :P The original idea was that I would save bytes using a tiny software renderer instead of WebGL, but now with no space restrictions, I'm using it for no good reason.

I could go on about the graphics engine, but instead I'm going to cut here. I'll just say that, technically, the graphics are closer to N64 than PS1. Please ask if you wonder anything!

S4D -First hours of work.
Posted on September 20, 2014 at 08:13

I want to make smaller but more frequent updates this time around, instead of writing giant blog posts at the end of every few week (month). Maybe every 48h or so. I've been working on a tile editor and a tile sheet. Will not disclose more information. Until the next update!

Space Funeral is great and imma buy Halo.
Posted on August 10, 2014 at 07:30

I played Space Funeral this morning and it's great. Play it. Crapbeats anything Square Enix has made in a long time.

I care about the olden Halo games. I don't care for a new Halo and I didn't care about Halo 4. I probably wouldn't care about it even if it bungie made it. AAA-companies tend to drop in personality and style over time, just releasing well polished and advanced products, but without soul. Square Enix doesn't really make personal and inspired RPGs anymore, do they? Anime Barbie Dressup XIII.

Halo:CE and Halo 2 (MP!!!) are on my top ten. A bit below you will find ODST, Halo 3 and Reach. I even liked the Library level in Halo CE, despite not being supposed to. My favourite level is Assault on the Control Room, which is complete magic to me, despite just being a marathon of corridors->field->bridge->corridor->field.... It's just pure halo-mood-marathon with great music. Things does not have to be variated and innovative to be appreciated.

But I said to a friend: "-I'll buy it when it's cheap!". ~$20 is cheap enough.

Edit: Embarrassing misspellings, and I made a new low res type.

Post Jam Post
Posted on July 22, 2014 at 20:39

No More Sweden is an annually held game-jam at different locations in Sweden (ironically). There are a lot of finnish and italian persons there, other than natives, so we use english.

It started out with some talks about indie development and such, which was interesting. But best of all was just out just chatting with lots of dudes. It's really cool to hear passionate people talk about what they do. You can tell that they really are into it, words coming from the heart. And there were some really talented people there.

There were not much sleep. I was pretty dead by Sunday-afternoon and didn't talk much during the presentation. There were some really cool ideas showcased by others.

And the result of the jam:
I'm pretty happy with it, for the time spent. Although I didn't manage to get audio to work in time for presentation.

Really lucky to have been a part of it.

#64DSC Hysterical Anamma
Posted on April 29, 2014 at 04:20

My ultimate goal and meaning in life is to make the best game there ever was. The concept of time is not present in my mind when designing games. The idea of the game I've spent the last two weeks making, was a bit too cloudy for me to execute efficiently. It's an idea then needs more sun before it's ready. Also, I'm just the shittiest most unrealistic planner in the universe.

The hard work I put in has not been in vain. My private library is extended with a lot of new code that I'm very happy with, but in order to have something to show for the compo, I will go back to my original idea and backup-plan. I will code in C++(11, the speediest tool for me), using openGL in order to make a 2D space game. Sprites must be drawn, code must be written. Hopefully, I can get some piece and silence (I'm sensitive to noise) in my place too.

You are welcome to watch me do it at this channel:

Prev Page | Next Page

Recent Activity
Active Users (0)