« first day (3732 days earlier)      last day (1295 days later) » 

5:30 AM
Hello! Would you consider code that only works for one resolution good?
The question is more like why some people would consider such code bad
 
user92578
6:05 AM
@0x00004 Because it only works for one resolution?
 
user92578
It's not portable code, and assumedly relies on a magic number
 
6:25 AM
That doesnt always mean that code is bad since some parts of it could be used to reach desired needs.
 
user92578
Do you have a concretic piece of code to share or are we just theoretically making assumptions about some imaginary code?
 
6:42 AM
in theory
 
user92578
int gridWidth = floor(1920 / itemWidth);
 
user92578
Magic number, works only on resolutions where floor(R / itemWidth) == floor(1920 / itemWidth), and insanely trivial to write in a better way -> bad code.
 
i just saw how people write code in tdd
they first write code that meet one requirement and so on
i guess one would have to design solution first then split solution into modules?
i just came to conclusion that if code doesnt work for desired needs at first is not always bad
 
user92578
TDD is good at guaranteeing that the tests get written since you start with those :)
 
8:25 AM
- a game that only runs at a single resolution is considered bad nowadays. That is because there are are hundreds of different displays, grafics cards, etc and thus even more combinations.
- test-driven-development is about planning out a piece-of-work (e.g. an algorithm), then laying out steps for how it works, and defining measurements to ensure that these steps perform and produce, what is assumed to be, correct results. Then writing the code to produce these results.
- if code doesn't produce the results you need (desire) then it is bad/useless code. Code is a means to achieve a result,
 
 
4 hours later…
12:04 PM
If you write a pico 8 game, you'll likely consider inly one resolution.
But aside that kind of marginal game, yeah, all of the above.
 
what';s the lowest res you folks plan for usually?
 
I don't plan for any resolution. If I ever get to it, it will be a text based web game.
 
12:28 PM
@Vaillancourt def looking forward to that one. Will you indulge me and make it so i can dial-in via telnet?
 
12:54 PM
Yeah, I was going to say, I'd make an exception for pixel art or retro-style games. Those often need to lock-in a specific resolution that works for their aesthetics (though they should still support some form of upscaling to take the fixed-resolution output and display it in a window bigger than a postage stamp on modern screens).
Myself, I usually plan for 720p as the smallest, and target most of my development at 1080p. I don't have the hardware at home to test 4K, and at the studio that's someone else's job, so I haven't gotten experience with much larger resolutions.
I do have an extra-wide monitor I'll put my game on and stretch it into a silly aspect ratio, to make sure it doesn't break and all the UI stays in sensible alignment. 😉
 
i was just wondering how on earth i would go about the upscaling / downscaling part with a fixed ratio
 
1:43 PM
Flooring to the next-smaller integer multiple is about the best we can do if there's a fixed resolution under the hood.
 
@dot_Sp0T Ah, I by "text based web" I had more in mind like, HTML, and controls with no image. But nothing is done yet, so I'll see how it goes ;P
 
2:49 PM
Hello!
 
Hiya
 
I want to make a coop game. Not really complicated. Something like super bunny man but i know nothing about networking.
Im planning to use box2d and sfml since im familiar with those. Would sfml networking module would be enough for my needs?
 
Never tried the networking module.
 
I couldn't say. I don't know that module or your needs.
 
user92578
Looks like a basic socket wrapper, depends on how low-level you want to go
 
2:52 PM
I'm not sure of which technical aspect of a game scares me the most: multithreading, or networking...
 
user92578
I'm not familliar with any nice C++ frameworks for networking so sockets might make sense
 
@Tyyppi_77 you used that before?
 
user92578
No, just SDL_net which is another socket wrapper
 
Okay
 
user92578
The nice thing about coop games is that you don't necessarily have to be concerned about cheating
 
2:53 PM
so for starters can i make it like
i could control two character on my keyboard and implement coop later?
i know its kind of possible but im just confused a bit
 
user92578
Keyboards usually have a limit of active keys they report at once
 
user92578
Also be vary that networking can be really hard to shoehorn in later in the development, usually you are better off if you at least carefully plan for it
 
@DMGregory nothing complicated i guess. Like super bunny man game
 
Yep, if you plan on making it multiplayer, make it multiplayer right away.
 
No. Just a coop
 
2:57 PM
multiplayer -> more than one player.
Unless by coop you mean "the player cooperates with in-came AI"...
 
user92578
Okay let's clarify the terminology here: You want coop over internet? Or "couch coop" meaning the 2nd player is playing via for an example a game controller hooked up to the same PC?
 
Coop over internet.
 
(I mean: a coop game is a multiplayer game)
 
user92578
Then it's safe to use the term "multiplayer" which is usually assumed to mean multiple players over internet
 
2:59 PM
Should i better use game engine ?
or sfml networking would be fine to use?
 
user92578
If your goal is to release a game, then probably yes, unless you feel like you are much more productive in framework instead of an engine.
 
user92578
Unity's current networking status seems to be a bit of a mess but they seem to provide nice and helpful abstractions over sockets, like remote procedure calls and whatever one might like
 
user92578
If you've never programmed with sockets, it might be a good idea to get a feel for them by writing a simple chat application or something
 
@Tyyppi_77 im not planning more than two players being able to play together? Still would be hard?
 
user92578
Yes :)
 
user92578
3:02 PM
Not as hard as a MMO, but definitely harder than a singleplayer or a couch coop game
 
@Vaillancourt i dont like in game ai. So much work for nothing in most games i seen those ai
 
@0x00004 Yeah, nice AI is hard
Nice anything is hard...
3
 
user92578
Already something like NAT-punchthrough can be annoying if you want casual gamers to be able to play the game and you're not using an existing punchthrough solution (and you're going P2P)
 
@Vaillancourt the thing i dont like is that player will still eventually learn how that ai plays and then it gets boring
 
@0x00004 Learning to manage the AI is expected.
(On a game design point of view)
I feel very comfortable knowing how the AI will behave in games like Assassin's creed, FarCry, DeusEx, etc.
 
3:25 PM
Networking two players is significantly more difficult than handling two players on the same PC.
 
I think if you're writing "new code", handling two players or 4 players or more is a similar challenge. The cost comes from the UI, I think.
 
i mean in theory you can have your local player input go through the same pipeline as network stuff
that should make it significantly easier
 
Yep.
 
btw anyone got experience with rendering to off-screen buffers and then scaling that up pixelperfect?
 
I've got fresh experience with writing to off-screen buffers, but I did not scale it.
I copied pixel per pixel to a new bitmap. but no scaling
 
4:11 PM
@Vaillancourt The COOP AI in Lovers in a Dangerous Spacetime is pretty decent. It does what it's told, so predictability is good for that case. 🙂
@dot_Sp0T I think The Division works this way - even when you're in single-player, the game client you're interacting with is the same, and it just sends its inputs to a local "server" process that updates the simulation and replies back to the main game process the way a remote server/host would.
 
@DMGregory Yeah. I think in Army Of Two, you could play with an AI and tell it to do things. I don't know how it went as I only played coop couch mode.
This architecture dates back to quake days, I think.
 
@dot_Sp0T Like, going up by an integer multiple with point/nearest neighbour filtering? Did you run into a particular snag or artifact with it you're trying to solve?
 
Star Wars Republic Commando had sick AI
at least that's what i remember
@DMGregory just thinking about where to do that in my rendering pipeline
 
At the end? Sorry, that's not a super-useful answer, I just don't quite know where you need help.
 
don't think i need too much help yet^^
but my current dilemma: I got my engine set up so that games I write are injected into the engine sort of like a cartridge-ish. So the engine loads the game on startup instead of being a set of libraries. And it provides windows etc, on request.

I could e.g. extend my windowing system to...
- ...have a simple switch and parameters to define an offscreenbuffer that is then stretched to windowsize according to params
- ...introduce a 'virtual window' that has a linked texture-id which can be referred to from other windows then
so many choices
i think I'm going for the scene-level though
 
user92578
4:28 PM
I don't know the details of your setup but I'd suggest picking a layer where it doesn't constrain all of your rendering to happen at that resolution
 
user92578
This facilitates HD UI over a pixel art game etc.
 
@Tyyppi_77 that is a good point
i was considering having pixelart ui over pixelart game
so with my current paradigm that would have to happen in the views
hmmm
 
 
2 hours later…
6:12 PM
@DMGregory You beat me to it
What specific obstacle do you believe might prevent you from taking two GPS coordinates and computing the distance between them? Did anything go wrong when you tried it? Are you unclear what formula you need to use? — DMGregory ♦ 37 secs ago
 
Haha. Just happened to have my browser open while waiting for my data to patch. ;)
 
6:27 PM
:)
 

« first day (3732 days earlier)      last day (1295 days later) »