Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 153 154 [155] 156 157 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 902515 times)

anzki4

  • Bay Watcher
  • On the wings of maybe
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2310 on: April 28, 2012, 07:32:15 am »

Apparently in curses mvinch takes the co-ordinates as y and x, not x and y.
*Facepalm*
It worked. Thanks for pointing that out.
Logged

Willfor

  • Bay Watcher
  • The great magmaman adventurer. I do it for hugs.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2311 on: April 28, 2012, 10:56:15 pm »

I haven't done a whole lot of work on my platformer, but after having to completely rewrite the way I started doing the stages I have a plain box stopping on a platform, moving left and right, and jumping. Unfortunately, not as well as I would like it to be. I'm going to have to do a lot more work on the physics aspect. Or, rather, the lack of physics besides gravity aspect.
Logged
In the wells of livestock vans with shells and garden sands /
Iron mixed with oxygen as per the laws of chemistry and chance /
A shape was roughly human, it was only roughly human /
Apparition eyes / Apparition eyes / Knock, apparition, knock / Eyes, apparition eyes /

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2312 on: April 30, 2012, 11:37:35 am »

So I've been working on my starship game.

Right now it doesn't have any starships in it.  What it does have is a puzzle that I'm going to use for doctor-related duties (curing crew, curing planetary diseases on missions, doing research in your spare time).
Spoiler (click to show/hide)
I started working on the 3d stuff to put it on a starship bridge, then quickly remembered that 3d is hard, especially when you are working in a very strict MVC framework that's implemented on client and server.  I did it once before a few years ago, but it's hard to even take previously-good code and make it work again, let alone rework it into a different framework.

Oh yeah, and the medicine puzzle plays over the internet, or at least sends a low-bandwidth version of its moves to the server and lets it validate them while other people watch in realtime.

BTW, that play is about to be a 2x combo.  You're trying to clear 2x2 blocks of a single color, and when you do, all touching pieces of that same color will also clear.  It's harder to lose than Dr.Mario, but the focus is on combos anyway.
« Last Edit: April 30, 2012, 11:39:58 am by Sowelu »
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

Stargrasper

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2313 on: April 30, 2012, 04:40:20 pm »

Apparently in curses mvinch takes the co-ordinates as y and x, not x and y.
*Facepalm*
It worked. Thanks for pointing that out.

Just as a rule of thumb with curses, most, if not all, functions that necessitate coordinates take the y coordinate first.  It was a design decision made early on.  I'm guessing that they chose to do it that way because when placing stuff on a console, you normally consider the vertical position before the horizontal position.  Simply put, in the vast majority of applications using curses, the y coordinate is more important.  Might be worth mentioning that games weren't what they had in mind when they wrote curses.  It's a cursor library, not a game library.

I haven't done a whole lot of work on my platformer, but after having to completely rewrite the way I started doing the stages I have a plain box stopping on a platform, moving left and right, and jumping. Unfortunately, not as well as I would like it to be. I'm going to have to do a lot more work on the physics aspect. Or, rather, the lack of physics besides gravity aspect.

What do you want it to do that it currently isn't?  Regardless, it's physics...that means that it's almost surely something to do with your collision detection code.  Collision detection is a lot harder than it sounds when you don't have defined grid.

So I've been working on my starship game.

Right now it doesn't have any starships in it.  What it does have is a puzzle that I'm going to use for doctor-related duties (curing crew, curing planetary diseases on missions, doing research in your spare time).
Spoiler (click to show/hide)
I started working on the 3d stuff to put it on a starship bridge, then quickly remembered that 3d is hard, especially when you are working in a very strict MVC framework that's implemented on client and server.  I did it once before a few years ago, but it's hard to even take previously-good code and make it work again, let alone rework it into a different framework.

Oh yeah, and the medicine puzzle plays over the internet, or at least sends a low-bandwidth version of its moves to the server and lets it validate them while other people watch in realtime.

BTW, that play is about to be a 2x combo.  You're trying to clear 2x2 blocks of a single color, and when you do, all touching pieces of that same color will also clear.  It's harder to lose than Dr.Mario, but the focus is on combos anyway.

Interesting...what happens to the poor sap you're treating if you fail the game a few times?  And is all of that online stuff really practical?  Sounds a bit server-crushing to me.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2314 on: April 30, 2012, 05:12:17 pm »

Interesting...what happens to the poor sap you're treating if you fail the game a few times?  And is all of that online stuff really practical?  Sounds a bit server-crushing to me.

Not 100% sure if there will even be player injuries, but they wouldn't be serious in any case.  Might be (redshirt) NPC ones, in which case I guess someone might die, or it might just be a "wait a while before starting again" thing.  Of course the cash and fame stuff you get from completing a mission is based on your performance, in some way that I'm nowhere near determining yet, but surely more combos will be better.

As for the online stuff being practical--Each move that you make is roughly 15 bytes, without much attempt to compress it.  I think I could get this particular puzzle down to 6 bytes per move if I really tried, including all the normal communication headers.  It's client-authoritative, to a certain extent...if you say "I'm moving this piece left", it attaches the fact that it's currently at position 4,6, and the server validates that you didn't move it into a wall, and that this piece isn't a higher Y value than your last move, etc.  The server doesn't keep track of the fact that it slowly falls over time; if you let a piece drop and don't touch it, then you only send the server one move as it locks into place.  (The RNG is synced per-puzzle between client and server, and given a new seed every rolling 20 moves or so while retaining a small buffer; therefore, it's lag-free for the client, and has very low bandwidth to update it.)  Now, this is all echoed back to all other clients within possible viewing range of your puzzle console, and they each run client prediction from there for things like piece drop.  So if we assume that a very good player sustains an amazing five moves per second, and that ten other players are watching, while I've fully optimized the network protocol:  The server handles 30b/s down and 300b/s up.  If five godlike players are puzzling in the same room at that rate, while six other players watch, the server handles 150b/s down and 1500b/s up, while each individual player recieves 150b/s down to watch.  Yes, it's designed for low bandwidth requirements and operates quite nicely in a high latency environment.

I'm planning a Tetris Attack style competitive game on this engine (maybe under the auspices of a pugle-stick sparring arena).  The latency should be more than forgiving enough to play it properly.  Hell, for all the players can tell, they might as well be sitting on the couch together if they've even got anything as good as a second of ping on a 4800 baud modem.
« Last Edit: April 30, 2012, 05:16:49 pm by Sowelu »
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #2315 on: April 30, 2012, 09:06:34 pm »

very interesting sowelu! I am thinking of adding a network ability to my Battleship game. Do you house your own server for this or are you paying space and bandwidth usage from someone else's server(s)?
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2316 on: April 30, 2012, 10:18:24 pm »

very interesting sowelu! I am thinking of adding a network ability to my Battleship game. Do you house your own server for this or are you paying space and bandwidth usage from someone else's server(s)?
Thanks!  Right now, I host my own server on localhost  ;D  It's not at the point of testing with other players yet.

If I ever made this a real thing... I dunno.  I'd probably start out on my own machine, then move to a virtual server at a hosting place.  It wouldn't be cheap (a few tens of dollars per month, as much as a hundred bucks), but it would most certainly serve all my needs.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #2317 on: April 30, 2012, 10:24:17 pm »

you might be able to create a virtual server on one of those free-website hosting sites if they allow the right programs to be used. Even if it doesn't work out in the long term it might be a good platform for beta-testing with other players. Since you are programming it to use minimal bandwidth you can probably get a good amount of testing data from a month or so of usage.
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Mego

  • Bay Watcher
  • [PREFSTRING:MADNESS]
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2318 on: May 01, 2012, 12:34:38 am »

you might be able to create a virtual server on one of those free-website hosting sites if they allow the right programs to be used. Even if it doesn't work out in the long term it might be a good platform for beta-testing with other players. Since you are programming it to use minimal bandwidth you can probably get a good amount of testing data from a month or so of usage.

This might be of interest for the project. I've used it very minimally once or twice in the past, but it should do the trick.

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: if self.isCoder(): post() #Programming Thread
« Reply #2319 on: May 01, 2012, 12:53:54 am »

Thank-you Mego :D This will be extremely useful in the future when I start playing with non-local network p2p gameplay :D
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2320 on: May 01, 2012, 03:22:18 am »

Google's AppEngine only lets you use their technologies (or Java stuff, I guess).  You can't just say "I want to run a C# program on here, and open arbitrary ports".

Website hosting places usually don't let you run programs on the server, either.  It's website only, and you don't even get your own port 80; you share an IP with all their other things.  If you want your machine to be YOUR machine, well, there's a reason web hosting is cheaper than a VM.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2321 on: May 01, 2012, 03:35:52 am »

Somehow despite posting it elsewhere on these forums, I haven't yet posted a really handy resource here: http://vterrain.org/
It's a great website for all sorts of things relating to procedural terrain generation, with a very large number  of links to academic research papers on the subjects (probably at least 100 papers). This quarter for an independent study, I'm implementing an erosion system similar to the one found in this paper I found on vterrain's Water subsection: http://www2.tech.purdue.edu/cgt/Facstaff/bbenes/private/papers/Stava08SCA.pdf

So if you need terrain related references from which to build a system or just feel like screwing around with some interesting terrain generation stuff, check out that site.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2322 on: May 01, 2012, 03:39:15 am »

http://vterrain.org/
I love you forever.  Once I get to planets, this is going to be my best friend.
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2323 on: May 01, 2012, 04:49:22 am »

Logged

Siquo

  • Bay Watcher
  • Procedurally generated
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #2324 on: May 01, 2012, 05:11:45 am »

Somehow despite posting it elsewhere on these forums, I haven't yet posted a really handy resource here: http://vterrain.org/
Thanks for that, I guess about 50% of this thread's readers is has a project with terrain in some form :)
Logged

This one thread is mine. MIIIIINE!!! And it will remain a happy, friendly, encouraging place, whether you lot like it or not. 
will rena,eme sique to sique sxds-- siquo if sucessufil
(cant spel siqou a. every speling looks wroing (hate this))
Pages: 1 ... 153 154 [155] 156 157 ... 796