The question “How do you know which in-game item a user has clicked on?“ has surprisingly many answers. It’s not a particularly difficult question to answer, but there are several “correct“ answers out there in textbooks and tutorials. Each of them is supposed to be for 3D games, but they all can be made to work in 2D, for obvious reasons.
Render To Buffer
In order to determine which item a user has clicked on, you render the 3D scene to a special buffer, with special colours and without shading. Every object has its own unique colour (maybe you give each clickable object a unique 24-bit or 32-bit ID) that can be looked up somewhere. Objects that aren’t clickable are just 0x000000.
Now you can look up the position of the mouse cursor in that buffer, look up the colour in your look-up table, et voilà, you get the object the user has clicked on.
Render To Pixel
Rendering the whole 3D scene again with false colours is actually rather wasteful. How about instead of rendering a whole buffer the size of the window, you just render a 1x1 pixel buffer, and set up the camera/view frustum/projection matrix so that the perspective of that pixel is the same as the perspective of the corresponding pixel on the screen? The maths here should be simplified if the reticle is in the centre of the screen. If your engine has view frustum culling, this could even be highly performant.
Draw-And-Pick
Do you enjoy living dangerously? Do you hate your colleagues? Your future self?
Just do drawing and picking in one pass. What could possibly go wrong? Inside your drawing code, just check if the pixel you are currently drawing is under the mouse. This only really works if you are doing software rendering, and it will come back to bite you sooner or later, but it saves you from implementing a separate picking step. So who can say if this is really wrong?
Geometry
This is the most boring answer. In Unity, there is an option to do a ray-cast on the collision data. Sometimes this method is not pixel-perfect, because some objects have hitboxes that are smaller than their render geometry, some have hitboxes that are simple shapes circumscribed around their geometry, and some don’t have collision geometry at all, so the mouse click goes right through them.
All in all, having your level geometry in a data structure you can query easily for continuous collision detection is a pretty good deal. If you can, take this deal!
Physics
This is the most fun answer. Just spawn an object, launch it into the direction of the cursor, and trigger an action when it hits something.
Logo of Pixomatic Rendering Technology. This is software renderer. The Sims 2 uses it.
Here's a note about its features:
RAD Launches Pixomatic -- New Software Renderer
RAD has released Pixomatic, a new software renderer for games developed by Michael Abrash and Mike Sartain. According to the company, the features and peformance that Pixomatic delivers is "roughly equivalent to a DX6-class graphics accelerator (with a few more modern features like stencil and dot3 lighting)". Well aware that game developers try to leverage the power of graphics hardware -- not code around it -- RAD takes pains to explain the rationale behind the launch of its software renderer. The company touts the fact that it lets developers write one set of graphics code for many different PC graphics configurations and obviates concerns about buggy 3D drivers, misconfigured 3D APIs, and whether 3D hardware even exists on the client. Features:
Two-texture multitexture
Gouraud, specular, fog, alpha blending
16- and 24-bit z buffers
Stencil, bilinear filtering, texture transforms, and dot3 per-pixel lighting
Handles transformation, clipping, and projection of trilists, tristrips, trifans, quadlists, polygons, and pointsprites, drawn through begin/end primitives or indexed or non-indexed streams
Performs perspective-correct rasterization, with per-polygon mipmapping, subpixel and subtexel accuracy, and 32-bit color depth
The pixel-shading pipeline is optimized MMX code, compiled on the fly
Geometry and vertex-shading pipelines are MMX, SSE, and 3DNow optimized
SSE and 3DNow are automatically used if present, but are not required
RAD says it runs Quake II at 27 FPS on a Pentium III/733 and 60 FPS on a Pentium 4. Licensing the Pixomatic SDK for one PC game costs $10,000.
Oh man I'm just exploring some clip art cds from Internet Archive, found a real gem this time. Its 3DColorClipArt, it has a bunch of weird old early 3d art I thought I would share! There also seems to be some 3d model programs on here but I would have to try a VM to get them to work I think
Just a few randomly selected screenshots from various Windows (Maybe one exception for the Amiga) 3D Software/Games/Explorer GUI Aesthetic.
(source: DiscMaster)
The CRT1-M-69 is a perfect addition to your home life and your work life alike. Unlike older computers CRT1-M-69 is equipped with an integrated graphics interface (no more pesky lines of code), our CiCi PC Virtual Assistant, and 'round the clock support!
Vincent van Gogh, “Café Terrace at Night” on the Place du Forum, Arles (1888).
All animations were created without AI, but making use of various 3D software through careful texturing, modeling and conversion of two-dimensional images. The result is a realistic-looking reproduction perceptible as three-dimensional, thanks to the accurate calculation of perspective and the addition of colors, lights and shadows.
Hello~ I'm working on a game with Ebitengine, a 2D game framework and working on a 3D renderer written largely from scratch, Tetra3D. I just recently added the ability to alter the depth of triangles as they render, which allows me to fix billboarded sprites so they don't cut into the world around them. Neat!
What's your favorite thing to draw in art? Like poses, body parts, clothing, etc?
obvious and cliché first answer out of the way: love to draw a nose, for obvious and horny reasons. love rendering blush/red noses/etc (equally obvious reasons, lmfao). designing outfits. fluffy hair (not necessarily long hair, but more long = more fluff so i'm biased). LINEART !! i used to hate lineart but i changed to a different brush last year and ever since then lineart and me have been best friends. uhhhhhh stupid meme redraws. probably half a dozen other things i can't think of at this time! man i love art.