Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Mug
Apr 26, 2005
How do you re-create that hardware "Mouse" feel where its just super responsive in your game engines? I have to draw the mouse cursor as part of my graphics routines when in full-screen because you can't see the windows cursor.

I've got the mouse calculating position rrrright before the wait-for-v-retrace happens then drawing directly to the back-buffer as the last thing it does but it still doesn't feel as real as the windows cursor.

I've tried drawing directly to the video buffer or at other parts of the rendering loop but I just can't get it right.

edit: I think I'm going to implement what I call the "Cannon Fodder mouse", where the mouse is an in-game entity that is affected by camera motion. I hope it's not too disorienting, but it seemed to work fine in cannon fodder; I've just never played anything that used that kind of movement since.

Mug fucked around with this message at 13:46 on Sep 17, 2012

Adbot
ADBOT LOVES YOU

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
What's your framerate? Doing a mouse that feels good, without 60fps, is quite hard.

Can you not turn on hardware cursor, though? Not entirely sure what you're building the game in.

Mug
Apr 26, 2005

Shalinor posted:

What's your framerate? Doing a mouse that feels good, without 60fps, is quite hard.

Can you not turn on hardware cursor, though? Not entirely sure what you're building the game in.

I can get hardware cursor straight from Windows when I'm in Windowed mode, but when I hit full screen, I have to handle everything myself. I don't know how to do a hardware call to pull the hardware mouse into my environment.

You can really tell this is the first time I've developed for anything >DOS sometimes. I can't believe how easy it is to use sound now.

edit: I can pull 60fps, but I think the hardware mouse usually polls and updates at like 120hz or more so it just doesn't quite cut it.

Mug fucked around with this message at 14:56 on Sep 17, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Mug posted:

edit: I can pull 60fps, but I think the hardware mouse usually polls and updates at like 120hz or more so it just doesn't quite cut it.
Yes, but usually 60fps is "ok" - anyways, yeah, what you're running into is why most people enable hardware mouse with a custom bitmap. If you were in DirectX, it's easy, but I recall you were using something a bit weird.

Your idea of a sort of in-game cursor is solid, though. It'll probably just add to the retro feel, and nicely hides the problem.

EDIT: I suppose it's been 10 years since I tried a non-hardware mouse, 60fps or no, so it is entirely possible that modern sensibilities have taken us beyond where those were kosher.

Shalinor fucked around with this message at 15:09 on Sep 17, 2012

Mug
Apr 26, 2005
Maybe 60fps is really just fine and I'm expecting too much. I'm totally rewriting the mouse behaviour at the moment anyway so I'll see how it ends up once it's all re-done.

edit: Hey, about to hit 5000 lines of code. Smashing.

Mug fucked around with this message at 15:08 on Sep 17, 2012

Oddx
Sep 9, 2005

Orzo posted:

This looks pretty cool, I like the style too. Here's a hint for placeholder music for the seasons: Spyro the Dragon 2 :)

https://www.youtube.com/watch?v=xE7rSc6__2M

This...is so good and fitting holy poo poo. I'll try to post some audio stuff this week. Here's a synth I'm thinking of using for our menu screen:

http://soundcloud.com/ko-op/test-synth

field balm posted:

This looks great, is the background pre-rendered? Is it a shader or hand colored? I really like the effect, reminds me of interstate 76.

Thanks. It's all in game, basically flat shaded polygons. The only thing that's faked in that screen is the reflections actually, but we're working on a shader for that.

Communist Bear
Oct 7, 2008

Unity's terrain editor uses height maps for its creation. Does that mean I could use a custom height map - ala from a real place - in order to create my terrain?

Ghost Head
Sep 16, 2008
I've been interested in text adventure games lately but some of the ideas I have don't seem possible using the Inform 7 game maker. Just simple things like playing a song in the background or having a different font or display. Is it difficult to learn to program text adventures for someone with no programming knowledge? I'm guessing the text parser might be difficult.

farfromsleep
Sep 16, 2012

space cat wannabe
You could try TADS or HUGO, those are the other two popular tools for developing IF and might be a better fit for you. I don't have much experience with any of them myself, other than finding Inform 7 a very odd system to get my head around when I wanted to try anything a little different, like you mentioned.

Base Emitter
Apr 1, 2012

?
^^^ e: Yes, Inform 7 is an oddball thanks to the wierd idea of writing a game in "natural" English, which, like all supposedly natural programming languages, is anything but. It's been a long time but I think Inform 6 and 7 both target the same execution environment, so you can use either with interpreters.

Ghost Head posted:

I've been interested in text adventure games lately but some of the ideas I have don't seem possible using the Inform 7 game maker. Just simple things like playing a song in the background or having a different font or display. Is it difficult to learn to program text adventures for someone with no programming knowledge? I'm guessing the text parser might be difficult.

I wrote a basic text adventure engine when I was younger. Basic command parsing is not that difficult if you're familiar with parsing in general, but I wouldn't take on the whole thing as a beginner project. It's not really a small project, and parsing influences a lot of the architecture, so a project really benefits from good up front design.

Domain specific languages (like Inform) for text adventures solve a lot of the challenges pretty well.

You might look around and see what interpreters support the formats Inform 7 generates; there are actually a lot beyond the one that comes with the tool, and some of them might have the features you're looking for. Many of them are open source, and you might have better luck adding those features to a client if you can't find one (although you'd lose the portability across many z-machine interpreters). Alternately you could look at some of the other IF engines, like TADS, to see if they have what you want.

There's probably a purist point of view that says TEXT adventures shouldn't need music or fancy fonts, but whatever.

Base Emitter fucked around with this message at 16:25 on Sep 17, 2012

minidracula
Dec 22, 2007

boo woo boo
Howdy fellow game makers, etc.,

I came across this earlier today via Reddit (yes, yes, I know) and thought people here might be interested. I haven't taken a deep look at it yet, but at a glance, it looks at least worth such a look, if not more.

Program Arcade Games -- Learn Computer Science

The course uses Python and Pygame, and has a complete YouTube playlist as well.

Check it out!

minidracula
Dec 22, 2007

boo woo boo

Ghost Head posted:

I've been interested in text adventure games lately but some of the ideas I have don't seem possible using the Inform 7 game maker. Just simple things like playing a song in the background or having a different font or display. Is it difficult to learn to program text adventures for someone with no programming knowledge? I'm guessing the text parser might be difficult.
You are probably going to want to start with TADS, or Hugo, or ADRIFT if you want different fonts and (especially) multimedia with sound. This may be possible with Inform, but I've never tried. I know different fonts are possible with TADS, especially if you end up using the HTML TADS interface for your games; sound is also possible, but again, I've not yet used it in my TADS games.

Disclaimer: I've used several versions of both Inform (including version 7, as well as 6 and earlier) and TADS, but I've never used Hugo or ADRIFT.

ADRIFT is for-pay software (possibly under a shareware license, I'm not sure; I know there are older freeware interpreters for ADRIFT games... check out the licensing details), and is probably the easiest for non-programmers to use (meant in the sense of drawing diagrams rather than learning any syntax).

Hugo is freeware, and is reportedly oriented more towards multimedia fiction than straight text adventures, so I'd recommend stating there perhaps.

TADS is the system that is most like other non-IF ("Interactive Fiction") programming languages in terms of syntax and in terms of expressive power (leading to some more end-user visible complexity in the language, esp. compared to Inform 7).

IF environments like all of these exist to make it comparatively simple to write your games compared to implementing your own text parser and library of nouns, verbs, phrases, etc. in some standard programming language, so you should find using one of them vastly more agreeable for writing IF than hand-rolling your own. You'll need to learn the conventions players expect though, and how to work in your own chosen system. All of the systems mentioned above come with tutorials. I can vouch for the quality of the TADS tutorials and documentation, as well as the Inform 7 tutorial and docs.

Also, the real benefit is they output game code that can run in an interpreter people already have (if they're IF fans/players), or can get for free, especially if you point them to one or distribute one. There are also some entirely web-based interpreters; check out Parchment (which can play Z-machine games) and the newest TADS version, which has a server-side option to make your games web available.

brian
Sep 11, 2001
I obtained this title through beard tax.

Hey so I was asked to make breakout for a programming test for a job at a local mobile developer and while I was doing this my friend Shane (Blinn on here) was making a super dramatic inceptiony song for his portfolio or something, so I put it in and make the game appropriately dramatic to fit with the theme.

You can download it here: http://www.billyfletcher.com/dg/breakout.rar
and the source is here if anyone wants to know how to do shoddy swept circle collision and inflexible sprite batching: http://www.billyfletcher.com/dg/DGBreakout_fixed.zip



It took about 5ish days in the end but it was totally worth it for me, if you're looking for work and you're getting a lot of these tests to do, always try to learn something new from them since you might not get or want the job so don't let it be a waste of time.

Mug
Apr 26, 2005
I mentioned it earlier in the old thread by I wanted to get some opinions here in the new thread.

If an indie game came out with minimum system requirements of
Core 2 Duo 2.5ghz
2GB RAM
GeForce 8600GT
Would you say that's unreasonable for a 2D game? Would you prefer a drop in video card requirements to Intel Integrated?

mnd posted:

Howdy fellow game makers, etc.,

I came across this earlier today via Reddit (yes, yes, I know) and thought people here might be interested. I haven't taken a deep look at it yet, but at a glance, it looks at least worth such a look, if not more.

Program Arcade Games -- Learn Computer Science

The course uses Python and Pygame, and has a complete YouTube playlist as well.

Check it out!

I've gone and added this to the OP after just a really quick look at it. Looks like a great resource for learning game development theory.

Juc66
Nov 20, 2005
Lord of The Pants

Mug posted:

I mentioned it earlier in the old thread by I wanted to get some opinions here in the new thread.

If an indie game came out with minimum system requirements of
Core 2 Duo 2.5ghz
2GB RAM
GeForce 8600GT
Would you say that's unreasonable for a 2D game? Would you prefer a drop in video card requirements to Intel Integrated?

The 8600 is pretty awful and most folks have better cards than that.
trying to support Intel integrated chips will drive you crazy. I'd recommend against it unless they changed a lot in the past year or so. Hardly anyone used Intel chips a while back except for laptop users and now there's much better chips for that stuff now. Both cheaper and faster.

Mug
Apr 26, 2005

Juc66 posted:

The 8600 is pretty awful and most folks have better cards than that.
trying to support Intel integrated chips will drive you crazy. I'd recommend against it unless they changed a lot in the past year or so. Hardly anyone used Intel chips a while back except for laptop users and now there's much better chips for that stuff now. Both cheaper and faster.

I know things are different now, but I don't wanna alienate the person with a fairly old laptop who is happy to just play little 2D games.

I have a MacBook with a GMA950 in it. I'll boot camp it and do some QA on it.

Serenade
Nov 5, 2011

"I should really learn to fucking read"
The Steam Hardware survey may be of some assistance here.

The model of card used is sorted by percent of use rather than power of the card, but there is vram for a quick comparison.

Mug
Apr 26, 2005
My concern is that the game is almost "unplayable (35 fps)" on the following specs, which I consider to still be a fairly okay PC.

Core Due (not Core 2 Duo) 2.0ghz
2GB RAM
GeForce 7900GTX

I consider this to be a pretty powerful machine, but the difference between the Core Duo 2.0 and the Core 2 Duo 2.6 seems to be the big deciding factor. The 7900GTX is way more powerful that then 8600GT, but it has no effect.

I think if you have a decent CPU, the video card really doesn't matter at all and I'll probably be able to target Intel cards.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
What kind of performance analysis have you done? Surely there is room for optimization if you're having framerate issues. Your game is pretty, but it doesn't look like it should be pushing the hardware that much. What language is it in again?

Oddx
Sep 9, 2005

Yeah if also depends on if the game is supposed to be super accessible gameplay wise, and if so it should also follow for the hardware too. I have a macbook air that I do most of my iOS dev on with intel integrated graphics and it does pretty okay for that, and I use it for most of my casual gaming.

Mug
Apr 26, 2005

Orzo posted:

What kind of performance analysis have you done? Surely there is room for optimization if you're having framerate issues. Your game is pretty, but it doesn't look like it should be pushing the hardware that much. What language is it in again?

The engine's got a ton of performance analysis tools in it; in some of my screenshots you can see a little graph in the bottom left of the screen. The game is slowed down by two things, the scaler that zooms everything to 2x all the time is handled by SDL and I can't touch it at all to make it go any faster. The next thing that slows it down is the zBuffer population, which pushes every "movable" entity onto the zbuffer for rendering every frame in order (it doesnt push blocks and walls because they never move). These two things are the biggest performance hitters.

Oddx posted:

Yeah if also depends on if the game is supposed to be super accessible gameplay wise, and if so it should also follow for the hardware too. I have a macbook air that I do most of my iOS dev on with intel integrated graphics and it does pretty okay for that, and I use it for most of my casual gaming.

My target audience probably has the hardware to run the game anyway, but I still feel bad saying "You need a computer made in the past 3 years to play this game that looks like it was made 10 years ago."

Juc66
Nov 20, 2005
Lord of The Pants

Mug posted:

My concern is that the game is almost "unplayable (35 fps)" on the following specs, which I consider to still be a fairly okay PC.

Core Due (not Core 2 Duo) 2.0ghz
2GB RAM
GeForce 7900GTX

I consider this to be a pretty powerful machine, but the difference between the Core Duo 2.0 and the Core 2 Duo 2.6 seems to be the big deciding factor. The 7900GTX is way more powerful that then 8600GT, but it has no effect.

I think if you have a decent CPU, the video card really doesn't matter at all and I'll probably be able to target Intel cards.

That machine is somewhere along 6 years past it's prime, it's no longer a powerful machine. Just to illulstrate how old it is, I've gone through 3 computers since that was in its prime, all of which were built on a massivly small budget.

Although they sound similar the difference betwen a Core Duo and a Core 2 Duo is pretty big, I think the core 2 duo you're listing there can do something like 80% more calculations per second than the core duo listed.


It looks like you really want to support these really old PCs though, so you need to do some performance analysis.
I'm guessing you have a CPU bottleneck, by the behaviour you described, but you should see if that's the case for certain, and fix any inneficiencies you have.

The most important thing to do would be to make sure you're calculating the bare minimum you need to at any given time.
The biggest culprit for killing performance I've found is someone adding some expensive code and having it run every frame. Collision detection can be a big one for that, especailly if you opted for per-pixel collision.

Juc66 fucked around with this message at 05:56 on Sep 18, 2012

Juc66
Nov 20, 2005
Lord of The Pants
I'm awful at posting some days.

Mug
Apr 26, 2005
I'm not too bad at performance analysis. Sometimes I'll dedicated an evening (5 hours) to running through my OptiSlots (which is my performance analysis nodes) and picking one to just work at like crazy to make it lower.

I'm getting there slowly but calculating vision cones and pathfinding are some big hitters.

At the end of the day, maybe you're right and I should just accept that a Core 2 Duo is a reasonable expectation.

Juc66
Nov 20, 2005
Lord of The Pants

Mug posted:

I'm not too bad at performance analysis. Sometimes I'll dedicated an evening (5 hours) to running through my OptiSlots (which is my performance analysis nodes) and picking one to just work at like crazy to make it lower.

I'm getting there slowly but calculating vision cones and pathfinding are some big hitters.

At the end of the day, maybe you're right and I should just accept that a Core 2 Duo is a reasonable expectation.

I'm honestly awful at optimization compared to the engine programmers I know so my advice might not be fantastic, but there's a number of tricks you can use to get performance better.

Use a "tick" system for various expensive things that seriously don't need to happen every frame.
Basically it's setting up one or more secondary loops to go through things that are happy to happen less often than every frame.

Pathfinding is a good example, Do things need to check their path every frame? Do they move slow enough that there's no way they could blow past the next node in their path in 1 frame, maybe having it every other frame or every 10 frames would work better.
If you can even just get it to every other frame, you can split the path calculation for 1/2 on even frames, the other half on odd frames, and that cuts down the burden for pathing by a bit.

Checking for objects to garbage collect is another, maybe you only need to check that once every other frame.


Knowing how to calculate the complexity of various algorithms is pretty useful too, at least for optimization.
There's usually several ways to do something, and knowing what'll be fastest for your particular needs is very handy.


also, think of ways you can "cheat" at making something happen that's not 100% accurate, but it's close enough for people to not really notice.
Being inaccurate isn't a big problem if it's still fun in the end of the day.
Not many people mind too much if things use collision boxes as opposed to per-pixel collision for example.


Well that's pretty much all I can think to say about that ... hopefully it's of some use.
If it's not all that great I can try to get my hands on one of the actually good programmers I know to provide some advice.

Mug
Apr 26, 2005
Because my game runs on isometric tiles with a global turn clock, its already got path finding only happening when people bump into a wall/person or when they're told to move to a new location that they can't actually see. All AI only happens when a creatures decision cool-down (related to their footstep speed) hits 0.

I try to make things only happen when needed, and things like vision cones are fairly inaccurate on a per-pixel level because it ends up as huge tiles in the end anyway.

Honestly, it's that 2x screen scaler that's the killer. The framerate jumps to 180fps when you turn it off.

Juc66
Nov 20, 2005
Lord of The Pants

Mug posted:

Because my game runs on isometric tiles with a global turn clock, its already got path finding only happening when people bump into a wall/person or when they're told to move to a new location that they can't actually see. All AI only happens when a creatures decision cool-down (related to their footstep speed) hits 0.

I try to make things only happen when needed, and things like vision cones are fairly inaccurate on a per-pixel level because it ends up as huge tiles in the end anyway.

Honestly, it's that 2x screen scaler that's the killer. The framerate jumps to 180fps when you turn it off.

The only things I can think of are to rescale everything once, keep it from memory and use those rescaled items when you need to draw.
OR
use openGL or directX to do the rescaling.

sorry I'm not much help *shrug* that's about all I can come up with.

Mug
Apr 26, 2005

Juc66 posted:

The only things I can think of are to rescale everything once, keep it from memory and use those rescaled items when you need to draw.
OR
use openGL or directX to do the rescaling.

sorry I'm not much help *shrug* that's about all I can come up with.

The "rescale once" is what I considered. My graphics buffers would double in size, but performance would improve MASSIVELY. The game would just require a much larger chunk of RAM, and I think my engine might hit a limit on memory usage if I try to do it. I've hit limits trying other things along the way with map size.

seiken
Feb 7, 2005

hah ha ha
If the biggest performance issue is the 2X SDL graphics scaler that would explain why better video cards don't seem to improve performance: as far as I know SDL isn't hardware-accelerated at all. If you could just switch that out to run in OpenGL or something I'm sure you'd be golden cause your game really doesn't look like it should be straining the hardware. I'm not sure if you have some limitations that are forcing you to use SDL though

Mug
Apr 26, 2005
Do you guys get pissed off if a windowed game captures your mouse pointer? I really like it because it stops you from accidentally clicking outside the window, but I wanna make sure it's not some kind of no-no.

Consider also that Alt-tab gives the mouse back to windows.

edit: holy gently caress I just spent like 4 hours building a relative mouse movement system and it turns out you can just loving do it using the windows API.

Well, that's good I guess, my hand made one was polling pretty slowly.

edit: holy poo poo that works way loving better. That's a huge load off my mind. I was really worried as to how I was gonna make relative mouse movement work with my pathetic poll speed. The windows API just blows all that poo poo away.

Mug fucked around with this message at 13:22 on Sep 18, 2012

Arghonautz
Oct 31, 2011
I have starting working on random/procedural dungeon generation for my roguelike side project in Unity. Decided to do a little blog and share notes and code, for two reasons. Firstly as i have only been programming for a few months, it gives me an easy way to share information if i get stuck, and secondly, a roguelike seems to be a reasonably popular game for a noob/hobby developer project, so I thought it might help other people new to programming go through the same learning process.

I threw together a website this evening and put up the first two parts (i will get comments happening on the website soon). Have all ready done enough development for another two parts... just need the time to put the articles together.

If you are interested, head over to http://www.reconditegames.com/

Senso
Nov 4, 2005

Always working

Mug posted:

Do you guys get pissed off if a windowed game captures your mouse pointer? I really like it because it stops you from accidentally clicking outside the window, but I wanna make sure it's not some kind of no-no.

Personally, when I play a windowed game, I want to be able to click elsewhere - it's usually why I play windowed: I'll have a chat window or work windows, etc.

EDIT: VVVV Thing is with alt-tab, sometimes it takes a few second for the resolution to revert, etc. and you can get problems when you alt-tab back in the game (in Fallout: New Vegas, every time I alt-tab back in, brightness is set to super low). Also, I like being able to see MSN/email windows live in the background while I play, so I know if I need to do something else. But that's just my two cents.

Senso fucked around with this message at 14:17 on Sep 18, 2012

Mug
Apr 26, 2005

Senso posted:

Personally, when I play a windowed game, I want to be able to click elsewhere - it's usually why I play windowed: I'll have a chat window or work windows, etc.

That's fair enough. I usually hit alt+tab to get out of a windowed game, personally, but I want to know if other people just instinctively expect to be allowed to just move their cursor out of the game window and click outside.

edit: Hey, my program just hit 5,000 lines of code. That's a thing.

Mug fucked around with this message at 13:34 on Sep 18, 2012

Red Mike
Jul 11, 2011

Mug posted:

That's fair enough. I usually hit alt+tab to get out of a windowed game, personally, but I want to know if other people just instinctively expect to be allowed to just move their cursor out of the game window and click outside.

edit: Hey, my program just hit 5,000 lines of code. That's a thing.

I don't mind it myself, but I've seen people go batshit over anything doing that. Making it an option shouldn't be difficult, I think?

I really need to get some sort of version control set up for my windows development. I used to have git setup with Visual Studio 2010, but the plugin right now seems to not be able to auth with Github any more.

Mug
Apr 26, 2005

Red Mike posted:

I don't mind it myself, but I've seen people go batshit over anything doing that. Making it an option shouldn't be difficult, I think?

I really need to get some sort of version control set up for my windows development. I used to have git setup with Visual Studio 2010, but the plugin right now seems to not be able to auth with Github any more.

I can't really make it an option because I don't use normal mouse control relative to the window.

If you move your mouse to the very top left of the playing field and then click, the camera slowly pans over to that patch of grass, and your mouse cursor stays upon that patch of grass, meaning the mouse cursor slowly drifts back towards the center of the window.

Because of this, if I let windows take back the mouse cursor, a second flick to the top left of the screen would cause the mouse cursor to fly outside the window way earlier than the user would expect. I tried using SDL's MouseMove to literally move the mouse cursor along the path that the user sees, but that caused the polling speed issues I mentioned before. So I just capture the mouse, lock it to the center of the window and make it invisible but track the mouse movements invisibly and draw a fake cursor on the game window.

I'll just have to get playtester opinions when the time comes.

farfromsleep
Sep 16, 2012

space cat wannabe

Mug posted:

My concern is that the game is almost "unplayable (35 fps)" on the following specs, which I consider to still be a fairly okay PC.

Core Due (not Core 2 Duo) 2.0ghz
2GB RAM
GeForce 7900GTX
Personally I like to target as low a spec as possible, I'd consider running well on a netbook (maybe not 60fps, but near as I can get) to be optimal for 2d games. But then a lot of my prototypes were turn-based, so it's easy to defer the vast majority of stuff until it's really needed, which makes life a lot easier.

It's worth keeping in mind that it's not just people with super-old PCs, but also secondary machines like those (or phones/tablets, if you're ever thinking of porting) that you're missing out on if you've got relatively steep specs.

Communist Bear
Oct 7, 2008

So after looking at a couple of video tutorials and learning the basics a bit more(Unity websites tutorials are useless. 3D Buzz is amazingly helpful) i've taken my first steps toward making my own map using Unity:



Not much at the moment mind. The empty sections to the left and right are going to contain building models (presuming I can find an apartment prefab) and the general middle area is where the player will go.

I'm referring to a map I drew with pencil and paper.

Bongo Bill
Jan 17, 2012

Appropriate mouse capture behavior in windowed games depends on how the game uses the mouse. If the mouse controls a cursor that moves around as normal, then the window should not capture it, because it's expected that the cursor should be able to move beyond the boundaries of the window. (An exception would be if the controls rely on having the cursor "stick" at the edges of the window, a UI paradigm that would be more appropriate to a fullscreen-only game.) If the mouse controls a UI element that doesn't function like an ordinary cursor - the crosshairs in an FPS, for instance, or the camera, or directly influencing some game element - then the window should capture the mouse, because the player doesn't expect that gameplay element to be able to function outside of the game.

If you've got a cursor while in menus and some other reason for having a mouse at other times, then capture the mouse when you close the menu and release it when you open it.

Nition
Feb 25, 2006

You really want to know?
Hey Mug, great OP, but one small thing:
It says Unity is "not-free" but only the "Pro" version costs money. The free version is still pretty full-featured.

Adbot
ADBOT LOVES YOU

Mug
Apr 26, 2005

Bongo Bill posted:

If you've got a cursor while in menus and some other reason for having a mouse at other times, then capture the mouse when you close the menu and release it when you open it.

I'm pretty sure I can do this, so I will.

My game is intended to be ran full-screen, but windowed is an option.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply