Jump to content
  • Advertisement

BrainSlugs83

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

103 Neutral

About BrainSlugs83

  • Rank
    Newbie

Personal Information

  • Interests
    Art
    Audio
    Design
    DevOps
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Out of frustration I just wrote my own and threw it up in Azure on their free tier using web sockets (their free tier is really free, and not a 1-year trial... and I just hit deploy in Visual Studio and it's live on the net in like 15 seconds... πŸ˜‰) Good point about UPnP punching -- and good info on STUN / TURN, I was not aware of those protocols... It is now on my TODO list to learn more about them... πŸ‘ For now I will just add validation on the server to check if the client listing their game actually has the port open or not; it's for a free hobby project, so hopefully that will be enough for most of us (UPnP seems pretty ubiquitous these days, in my experience, but I've noted your objection and will look into the STUN / TURN stuff if I have issues 😎). If there's any demand, I may open the source the code (might do it anyway eventually, it's C# and ridiculously simple, super ugly, but simple)... for now I'm just screwing around with it though. 😁
  2. I think you misunderstood my question. I'm well aware of hosting options. -- I'm specifically trying to AVOID hosting my own service. This is like a common game thing that every game does that eats up like almost no CPU or bandwidth, so I'd be quite surprised if there really aren't any matchmaking services out there... I know Steam has one in their API that they host for you, but I have no idea how to get into the steam platform -- especially with a hobby game that I don't plan to sell on Steam. XD I could imagine writing one that was an IRC channel... but that would be super sketchy and hacky... I guess I'll probably just throw up a quick ASP.NET SignalR repeater on the Azure free tier. πŸ™„
  3. I'm writing a silly open / free game in MonoGame, and I've got LAN broadcasting in for broadcasting open game lobbies that a player could join via local network; but I'd like to also support something similar via the internet. It's a simple client / server model action game using UDP, nothing super complicated going on. The library I'm using supports punching holes in NAT via UPNP so, that's not a big deal for me. -- I'm just wondering if there's any free services out there (maybe something with an HTTP based REST API) that I could use to post open games to, so that players could connect and join to them. (I don't mind writing my own and throwing it up in Azure but I'd rather not waste my time and money if there's something free out there.)
  4. BrainSlugs83

    c# drawing sprites

    @kseh is correct. If you want to stop drawing something, then just stop drawing it. You do not need to ever draw a black sprite to Erase something, because you're clearing the window on the first line anyway. He's is also correct in noting that you should not be calling Invalidate in the paint function (that will cause the CPU usage to be very high, in my experience). -- You should instead be calling "this.Invalidate(true);" in your timer method (you do have to call it somewhere, or else the window won't repaint -- so you need to call it every tick). His logic also sounds correct for what you are describing. -- If you want something to happen for a bit, then start a counter, and only draw the thing you want to draw while that counter is in a given range of values, and then just stop drawing it after that.
  5. BrainSlugs83

    c# drawing sprites

    That's because your logic tells it to. Remove the part that draws the black box and it will work. Long term though, I think you need to start over from scratch because there's a lot of nonsense in your draw method. Just blit the sprite you want to see. Obviously if you immediately draw a black box over it, or only draw it every 4th frame, you're going to have a bad time.
  6. BrainSlugs83

    c# drawing sprites

    Dude just look at your logic... You draw when draw_flag is true... and it's only true every fourth tick... That is, right now, it will be off, off, off, on, off, off, off, on, etc. You are forcing it to blink. I'm not sure if you're having trouble with understanding how basic animation works or if you don't understand basic coding, but this thread is painful to read... Maybe Google how to make a flip book... If you only draw on every fourth page, it's going to look like it's blinking... But, look man... Just remove the code that you put that makes it blink... replace the entire timer code with "draw_flag = true;" -- and then it will just be true every frame (i.e. If you don't want it to blink, draw it on every page of your flip book, stop skipping pages!). Also you're totally murdering c# casing conventions. In simplified terms, you should be using TitleCase for class level variables, and camelCase for method level variables... (It's not going to make your code work any different, it's just a matter of established conventions... You don't have to change it, it's just annoying to see.)
  • Advertisement
Γ—

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net isΒ your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!