Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

luksamuk

Members
  • Posts

    1,594
  • Joined

  • Last visited

  • Days Won

    12

Posts posted by luksamuk

  1. You need trigonometry.

    It's not that much hard for common platformer games.

    In Genesis, they are given by collision masks. Basically bytes showing the height of the first point and the height of the last point. And then, for full 360°, there are four modes which the player can assume - which I'm not gonna get into, but it's basically a rotation of all sensors, depending on Sonic's position, limits and etc. So imagine a platformer like Mario or Megaman for now, which are less complicated about that.

    What you can imagine is that you have two lines: one a few in front of the player, other a few pixels behind the player.

    The code checks for the height of the mask on the corresponding X coordinate of each line (notice that I'm not telling you here how it recognizes which tile is on the player's feet position, but I'm already assuming the engine knows!).

    The player's Y position will assume the biggest height both masks. If there's only one, set it to this only one. If there's none, set angle to 0.

    In Sonic games, Sonic has three speeds, which are X Speed, Y Speed and Ground Speed. Ground Speed changes directly X Speed and Y Speed (This doesn't happen in Sonic Worlds Engine), but this is a feature of the 360°ness.

    You can take a sneak peek on Sonic Retro Physics Guide to understand it a bit more.

    Now, about ANGLES: for a common platformer, the angle is given by the arctan of the DIVISION between the DIFERENCES of the two Y values and the two X values. You'll also need to convert it to radians, if necessary.

    In pseudocode:

    deltaX = pointBack.X - pointFront.X;
    deltaY = pointBack.Y - pointFront.Y;
    
    angle = arctan(deltaY / deltaX);
    
    angleInRadians = angle * (180 / PI);

    If you're using a programming language like C, C++ or Java, there might be an atan2(deltaY, deltaX) function that does the job of arctan(deltaY / deltaX) for you.

    If I'm not mistaken, MMF2 has arctan.

    EDIT: Stay sharp with null quotients -- meaning: deltaX. It will most likely not happen, but if you overlap the back sensor with the front sensor, you might get and undefined result on your calculation.

  2. Does the whole background move as one or each part moves separately or...?

    I like it, although the colors don't seem to fit in some way. They seem to call other color or something. Perharps you should consider putting an outlined logo or something on the black part.

    Also, I don't wanna be a jackass, but your game name seems to be

    deleted!

    :D cool.

    (Will delete this once you see it)

  3. I believe I fixed it. It may seem weird because I'm rendering all of them on a line. Later I'll try to make something like LiBi posted.

    paltest.png

    This is only normal mode rendered, though. Shadow mode also seems OK, but highlight mode is still getting on my nerves. I'm afraid I'll have to make the algorythm myself.

    Dumb myself forgot to put MASKTOBYTE(x) on every time you get a color...

    If anyone there is interested in C programming, here's my code.

    void renderpalette(palette* pal)
    {
    	int i;
    	float colorpsize = (float)WIN_WIDTH / (float)pal->numcolors;
    
    	for(i = 0; i < pal->numcolors; i++)
    	{
    		float icoord = (float)i * colorpsize;
    		color c = pal->data[i];
    		if(currentmode == 0)      c = SHADOWCOLOR(c);
    		else if(currentmode == 2) c = HIGHLIGHTCOLOR(c);
    
    		glColor3b(MASKTOBYTE(GETRCOLOR(c)),
    			      MASKTOBYTE(GETGCOLOR(c)),
    			      MASKTOBYTE(GETBCOLOR(c)));
    		glBegin(GL_QUADS);
    				glVertex2f(icoord, 0.0f);
    				glVertex2f(icoord + colorpsize, 0.0f);
    				glVertex2f(icoord + colorpsize, colorpsize * 50);
    				glVertex2f(icoord, colorpsize * 50);
    		glEnd();
    
    	}
    }

    EDIT: Just noticed that I mustn't sort them by hue... using a much likely not-well-implemented quicksort.

    The result is...

    paltest-1.png

    EDIT 2:

    I'm done.

    paltest-2.png

    The full code is here.

  4. Need some help on this.

    539691_503129629761928_118633135_n.jpg

    This is supposed to be a replica of the Genesis system palette, rendered through SDL and OpenGL.

    The palette is essentially a matrix, with colors sorted by hue.

    All colors are stored in the SAME Genesis format (16-bit, 0x0RGB).

    This is in normal mode, and there also is Highlight and Shadow mode, but my concern is that the colors are too dark, or that not all colors seem to be there (ignore the cornflower blue background).

    Can any of the artists here give me a 512 colors palette reference or tell me if my impressions are right or wrong?

    Sorry for bad image quality.

  5. It just happens to have low progress.

    I've been over a year outside fangaming scene - and I still don't know if I'll ever come back.

    Kes is responsible for a lot of stuff right now as I partially left the project.

    I really wish I was helping him right now, but as I lost most part of my interest on fangaming, I'd end up misleading this project more than helping.

    But keep up your good work. This project needs an urgent bump, and if Kes ever needs help with programming and inserting new levels, I'd happily help.

    Show us more interesting stuff :D

  6. Is it true that they're shutting off internet access across the whole country? Cuz they sure know how to keep a man down if that's the case.

    Happily that's NOT TRUE. They didn't come to this point, but in counterpart, there's a bastard in congress who suggested a law in which any protest during the Confederations Cup/World Cup would be considered terrorism.

    Some things like that seem so absurd that we're almost sure it won't be approved, BUT, we can't trust that anymore:

    Currently, occupying the position of the Commission of Human Rights and Minorities, there's this congressman called Marco Feliciano, who is also admitelly racist and homophobic, having said things like "The Africans are descendant from the cursed part of Noah's family tree" and "Don't worry folks, I'll treat homosexuals and black people as if they were real persons."

    Now, if there's not enough WTFs, currently, in the middle of the turbulence of protests that's been going on, this man just approved a law project that guarantees what he calls a "gay cure".

    The law project is actually a correction in one of the laws of the Federal Council of Psychology, which forbids a psychologist to refer to homosexualism, and also forces the psychology professional to literally help someone stop being gay.

    TL;DR: We couldn't stop a nazi reaching the head of the Commision of Human Rights and Minorities, and now it just approved a gay cure law project.

  7. attachment.php?attachmentid=1633&stc=1&d=1371099088

    Unfortunately I wanted to show everything I did these days to you guys, but I'm afraid most part of it is code. But turns out everything's going good, I ended up making some kind of framework I can re-use for any game I make D:

    Currently I'm wandering around physics programming... and I decided to reach the toughest spot: vectorial collision, just like LIMBO and Braid did, so I can give the artists a better way to build levels and worry less about tiles and fitting them into mosaics like Sonic games do.

    Here's a quick shot from the prototype interface of my level creator. It's meant to be simple; features will include importing graphical sections of the level, regardless of the tile size, and positioning them. Collision will be handled mathematically according to what the level designer does there. You can make a slope by simply making a line from one point to another, or put a solid rectangle somewhere, or using Bezier curves.

    post-1782-138639765382_thumb.jpg

  8. It looks pretty okay, but you need seriously to change those colors, make it brighter.

    Also, the sun should not be visible when the sky turns to purple/dark blue (aka night) like it happens around 0:30 in the vid.

    Other than that, pretty nice. :3

    Hm, I was actually aiming for dessaturated sprites... the project I'm working on will feature it. But that's ok, my team's been making some tweaks on it, it's getting better (:

    I'm not sure if I'll post here the newest work of my team's artist, but here's an example of the new sun I made myself:

    WARNING: Image is 1920x1080

    859041_434698069938418_1239598525_o.jpg

    At least it looks a bit more beautiful, I think...?

    EDIT: Come to think of it, it looks better in motion.

    EDIT 2: This is a controller, pause, debugger and quick command line test, ran on Windows

    BGl0xeGCAAASU0F.png:large

    And this is a cellphone shot of an older DEBUG version of it, running on my server's Ubuntu 12.10:

    BGZjfKICMAA3h8H.jpg:large

  9. O hai

    Let me just pop out of nowhere and drop this

    I'd like some feedback here. There's nothing special here; not even pixel shaders. Also ignore the bad things in the scenario (such as the horrible sun setting between mountains and the outline problems).

    also, should any brazilian be interested in fully Portuguese MonoGame tutorials,

  10. Can I share information as well?

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque at augue at neque dictum convallis. Mauris sit amet dignissim arcu. Pellentesque congue bibendum mauris, sed aliquet justo sagittis a. Quisque congue lorem id lacus luctus laoreet. Aliquam erat volutpat. In ut ligula est, vitae tincidunt arcu. Fusce a libero elit. Aenean in mauris sit amet nibh porta eleifend. Proin et purus in turpis bibendum sodales sed mattis leo.

    Quisque congue, magna quis mattis condimentum, nisl lacus rhoncus odio, non tincidunt felis nulla eu nisi. Pellentesque eget ipsum justo, id dictum nisi. Phasellus eget est nibh. In augue lectus, semper vitae tempus quis, pharetra vitae est. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras feugiat magna ac purus molestie eu volutpat nunc egestas. Suspendisse potenti. Aenean egestas, velit vitae accumsan bibendum, dolor orci pulvinar magna, in convallis velit dui ut erat. Vivamus posuere vulputate velit, vel auctor lectus pharetra eu. Vivamus sit amet justo erat. Vestibulum venenatis pellentesque libero, vel scelerisque risus vestibulum quis.

    Nam massa enim, eleifend et rutrum nec, faucibus quis libero. Fusce mollis euismod metus, non molestie neque commodo ultrices. Nullam condimentum porttitor nibh, sed tempus magna tincidunt eleifend. Integer mollis, magna ac vehicula pharetra, odio erat condimentum nisl, in feugiat sem nisl ut odio. Vestibulum vulputate, neque non placerat ultricies, ipsum orci molestie ipsum, non volutpat enim tortor eu est. Ut ultrices vulputate ante id molestie. Suspendisse metus enim, hendrerit eu congue vitae, dapibus in felis. Duis id aliquet sapien.

    Duis tristique diam a ipsum bibendum hendrerit. Nullam urna nulla, feugiat consequat ullamcorper id, tristique nec augue. Nunc eu urna elit, quis tempor nisl. Nunc ullamcorper nisi at ipsum imperdiet semper. Integer lacinia aliquet fringilla. Praesent et quam vitae mauris molestie tempor et consequat libero. Quisque posuere eleifend feugiat.

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus in neque vel tortor interdum adipiscing. Proin gravida dignissim metus. Duis tincidunt rutrum odio, non suscipit tortor tempus vitae. Maecenas ipsum sapien, vulputate eget posuere sed, elementum sed nulla. Duis pulvinar porta mollis. Ut dignissim enim quis neque malesuada sit amet bibendum tortor egestas. Vivamus placerat ipsum sed est placerat id varius eros placerat. Pellentesque eleifend euismod lacus convallis venenatis. In mi ligula, interdum eget pretium non, vulputate sed mauris. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam viverra libero ut orci laoreet varius. Nunc commodo fringilla tortor, sit amet tincidunt lorem auctor in. Donec mattis mollis massa, id facilisis turpis tristique convallis. Vestibulum sed est in leo egestas lobortis. Integer molestie erat vitae urna varius dignissim.

  11. *Pops out of nowhere again*

    I'm pleased to know that I'm not the only one interested on those concepts.

    Anyways, although the place was pretty much deserted, it is actually a valuable piece of the community. A place to start brainstorming, even by only reading what the others say.

    Also it could be a nice tool for a new rep system

  12. It's called the "internet."

    Yes, by default your media player connects to the internet to try and identify what music you're playing so it can label the tracks for you. It's a brave new world...

    =Smidge=

    This ^

    Mainly, Media Player, Zune and even Winamp do it unless the ID3 tag fields are already filled.

    With the CDDAs, WMP stores it on the PC's database; with MP3 (and FLAC & APE, with some additional plugins), WMP stores in the file itself.

    A good solution for this is either deactivate the auto-collection of data on files missing tags (you can do this via the options window). If you wish to have the right tags, you can right-click the CD cover either on the ripping screen or your library and choose "Find data" (something like that), so you can search through the online database.

    If you don't find anything, though, it's up to you to rename the song names, change their order, artist, album name, genre and year, and then copy an image containing the CD's cover, right-clicking it on your library and selecting "Paste album cover" >:

    I usually have to do this so my Last.fm scrobbling doesn't get raped.

×
×
  • Create New...