Jump to content

  • Log In with Google      Sign In   
  • Create Account

Josh Petrie

Member Since 11 Jun 2003
Online Last Active Today, 12:21 PM

#5292512 Best gaming platform in the future with marketing perspective.

Posted by Josh Petrie on 19 May 2016 - 10:27 AM

I think this discussion of the pros and cons of various Microsoft products, services and strategic decisions is veering a little too far off-topic at this point.

#5292391 how can i use the CreateTimerQueueTimer()?

Posted by Josh Petrie on 18 May 2016 - 07:01 PM

i must use the CreateTimerQueueTimerWT_SET_MAX_THREADPOOL_THREADS() or i will get errors on lValue, like i said before.



That's because the macro is intended to modify the flags value given as the first parameter. It's not a function, its a textual substitution of an expression that performs and |= on the flags value. Don't treat it like a function. Call it like Wyrframe does in the above post.

#5292312 how can i use the CreateTimerQueueTimer()?

Posted by Josh Petrie on 18 May 2016 - 11:53 AM

only these function give me several problems.

and the macro is wrong:


because don't return the result... so i did:


The macro is not wrong. Macros are not functions, they don't need to "return" their results. They are textually-substituted into your source code. Use the macro, don't write your own function to replicate the macro because all you're doing is creating a future bug for yourself when the macro changes but your function didn't.

#5292304 Building a Portfolio

Posted by Josh Petrie on 18 May 2016 - 10:31 AM

As a programmer, the value of your portfolio comes from the challenges you face completing those projects, and specifically from the interest technical conversations you are able to have about how you approached those challenges. One-versus-many projects is less important than one-versus-many challenges, although all else being equal I'd focus on one project instead of many because you'll be able to produce something more complete, cohesive and polished. "Fitting everything together" like you need to in a finished project is an important skill, and one that doesn't get exercised as much when you make many smaller projects, as you'll just skimp on that aspect.


I'd caution against a story-driven RPG though. "Story driven" implies a lot of time building content, and when you apply as a programmer the focus is not going to be on your storytelling skills or your ability to design a bunch of interesting dungeons. These may be advantages, yes, but you have to consider how you want to spend the time on the project. More time solving interesting technical challenges, which you can then discuss at an interview to show off your problem-solving ability and approach to handling new things, is probably better.


Most importantly, make something you want to make. Don't make something explicitly to be a "portfolio piece." It will show.

#5292293 New to Game Development, and don't know where to start.

Posted by Josh Petrie on 18 May 2016 - 09:36 AM

One option is to pick a programming language and start learning it. Python or C# are good choices for first languages.


Another option is to pick up a tool like Game Maker, or a high level engine like Unity or Unreal, and start learning that.


Learning to program will take longer, and you'll spend more time focusing on the basics of programming by building text-based console mode games. In contrast, learning something like Unity or Unreal will let you get started much faster building fairly complicated graphical games. But you will ultimately need to learn some sort of programming or programming-like logic thinking in order to really customize and tailor what you can do with those engines.


It will largely be a matter of how much instant gratification you need to satisfy your creative interest. I would personally recommend you dedicate a few days to trying to learn Python and making a simple text-based game like "guess the number" or hangman. Then switch gears and spend a few days trying to build something simple in Unreal or Game Maker. Think about which you enjoyed more and go from there.

#5292182 Need mentorship from a veteran programmer

Posted by Josh Petrie on 17 May 2016 - 06:36 PM

...in one or two short paragraphs, talk about your challenges while developing, talk about bottlenecks and how you solved it, talk about the late nights. Talk about a few "eureka" moments you had and how elated you felt when you had your current break throughs and the challenges you are still working on. Talk about what you expect for the future and your vision as a programmer if you were given the chance to join that great company. Talk about your ability to work well in a team (try to keep it short though so your resume would still be of reasonable size)



It's a good idea to note what was challenging or interesting in the point-by-point breakdown of what you did on a project, but what you're describing here sounds more like what would be on a cover letter in the US, not on the resume itself.

#5291968 What does a C++ Programmer need to get the job?

Posted by Josh Petrie on 16 May 2016 - 05:01 PM

While age discrimination certainly exists, it's not a widespread problem in the industry. What I'm trying to get at is really the futility of trying to generalize too much, you can find people with pretty much every view (positive or negative) of every fact about a candidate. Thus, trying to bend over backward to make some fact true or false about yourself in the hopes to achieve better results in an interview isn't always worth it. It can be a gamble.

What somebody sees as a risk will be different from person to person and situation to situation. An "uneducated" 25 year old may be a risk because he or she may not know what they're doing (too junior for the position in question). Somebody starting a career later or making a transition from another career (that is, somebody older) may be a risk because they have higher salary expectations than the budget can afford. Et cetera

#5291948 timeSetEvent(): can i change the timers limit?

Posted by Josh Petrie on 16 May 2016 - 03:23 PM

- the interval between frames(animated gif's) can be diferent;


You can trivially account for this if you build your own timer callback system. Also, you really should not be using this to trigger frame switches for animated pictures and the like; it doesn't really scale. Cursory investigation around the internet suggests the limit you're running into is something like 12 to 16 active timer events.
- i can't use CreateTimeQueueTimer , because i can't put it to work... only errors or don't starts:(


You absolutely can use it; what you mean to say is that you don't know how or can't figure it out, because you get errors. Perhaps if you asked that question and provided those errors somebody could help.


- the timeEndPeriod() is always called, depending on timerid value.



You're right, I didn't see it the first time through. This is still a very unusual use of the pair, since you call it for every timer, but really you only need to call it once. Windows always uses the highest resolution (lowest value) provided to it through this call. You're not setting resolutions on a per-instance basis here.
i don't know use WT_SET_MAX_THREADPOOL_THREAD. what i know is that it's a const, nothing more i know


The documentation linked for CreateTimeQueueTimer explains how to use it. It's a macro, not a const variable. And it only works with CreateTimeQueueTimer, since it evaluates to a value you pass to that function's flags parameter.

#5291943 What does a C++ Programmer need to get the job?

Posted by Josh Petrie on 16 May 2016 - 03:17 PM

3. A bigger company means there are more people to learn from, what to and not to do which depends on how many of them are talented in their roles. Also potentially higher job security with a company that is fiscally secure. I was laid off from a company last year that had less than 15 employees because they couldn't afford to keep me. When I get laid off I like to know it is because the position is no longer needed, not that they are broke as fuck cause their games bring in very little money. So when I am making a name for myself, yea I'd like to start as a face in a crowd.




This isn't always true though. It's good that you know what you want, but don't make the mistake of thinking that it's only a big company that can provide these things. For example, it's also common for large companies to suffer more from silo effects, where each team is kept rather isolated. This means even though the company has hundreds of thousands of employees you're practically or actually limited to interacting with five or ten on a regular basis anyhow. Similarly, larger does tend to mean more financially stable... but that doesn't mean financial stability for you. In a larger company, it can also be easier to lay off entire swathes of people. Including you.




4. Okay. Although to me it is more a matter of me wanting to lower the perceived risk associated to me from an employer's point of view.

You see I would much rather attend university to learn about earth sciences, physics, and mathematics. In my opinion I could just as easily learn CS on the job from others and through simple practice of my craft, as I could learn by going several more tens of thousands of dollars into debt.



You can get a job without a degree. At 28, you're basically "screwed" either way, risk-wise. Somebody will look at you and say "he's a risk, he's 28 and has no degree." The next person will look at you when you get done another four year degree and say "he's a risk, he's 32 and looking for entry-level work." So go back to school if you want to, but I'd recommend against doing it just because you think it's going to improve your job prospects in four years.


Companies that relocate any and all full-time employees do exist (larger companies, which you seem to want, are especially more likely to be able to do this). You can usually find out pretty early on in the interview process, so it does not really hurt you to try to start applying to places you want to work on the west coast now and see what happens.

#5291940 timeSetEvent(): can i change the timers limit?

Posted by Josh Petrie on 16 May 2016 - 03:05 PM

You probably should not be using timeSetEvent for this. Not only is it deprecated, it's got limitations like you're running up against that are hard to control. The function that replaces it is CreateTimeQueueTimer. It's possible timeSetEvent is running into the same threadpool worker limit described therein, in which case you can perhaps adjust it by using WT_SET_MAX_THREADPOOL_THREAD, but this has potentially significant implications and probably isn't the best idea.


You may be better off driving your timer system off a custom implementation based on your game's high resolution update timer, as it will be more flexible.


Note that you also have several bugs in this code related to concurrency potential (your timer count update is unguarded and your timer ID assignment is based on it, both of which can cause bugs such as incorrect counts or duplicate timer IDs) and use of the time* APIs (you call timeBeginPeriod every time a timer starts, potentially overriding the previously set global resolution if its lower, and you never call timeEndPeriod. You must match each begin call with an end call that provides the same period value, per the documentation.

#5291919 Display jpeg on a form with SharpDX

Posted by Josh Petrie on 16 May 2016 - 01:01 PM

...such as?


The (potential) reason you're getting no responses is because you're basically saying "Hey, help me do something." The barrier to entry into your actual problem context is thus, quite high. If you lower the barrier to entry, by providing more information, more specifics about what you've tried, what you've got working, anything like that, you increase the chance that you'll get useful replies. It shows that you are respecting the time of (potential) respondents and in turn they'll be more likely to respect you and provide some assistance. 


This sample should display a simple, colored triangle. Can you get this to work? Can you replicate this in your own code? Can you then take that triangle and add a second triangle elsewhere? And then can you arrange them to form a square?

#5291901 Display jpeg on a form with SharpDX

Posted by Josh Petrie on 16 May 2016 - 11:48 AM

It could be because it sounds like you're just asking people to write code for you. What have you tried already? Can you draw a blank quad already? Can you draw a blank triangle? Anything? There are plenty of tutorials and indeed probably even some samples that come with SharpDX on setting up basic rendering and trying a colored triangle, which you can adapt to drawing a texture triangle and thus a quad eventually.

#5291874 Game servers?

Posted by Josh Petrie on 16 May 2016 - 10:40 AM

I could search this on google but I prefer automated multiple answers hehe.



This is, for reference, quite rude.

#5291871 Best gaming platform in the future with marketing perspective.

Posted by Josh Petrie on 16 May 2016 - 10:33 AM

To change my question a bit, well, which are the platforms which earn most revenue, today?


It doesn't matter. The revenue earned by the platform is the revenue earned by the platform vendor (e.g., Sony, Microsoft, Nintendo). You are not thinking about making a platform, you're thinking about making a game for a platform. 
The platform you pick will not determine how much revenue you'll bring in; the quality and success of the game you make is the key factor there. And unfortunately, there's no mathematical formula or flowchart to arrive at how to make a quality, successful game or we'd all be rich already. The only real factor the platform choice will have are market share and demographic related, and those aren't likely to matter to you because the ceiling of even the lowest-market-share platform is several orders of magnitude beyond what you're likely to attract as a customer base right now. Even if, by some miracle, you hit that saturation point, at that point you'd have the money and popularity to easily get your game ported to other platforms and continue your runaway success.
You're thinking about the wrong things; think instead about the kind of game you are excited to make on the platforms you have available to you and know how to develop for right now. If you just want to make money, go get a job writing financial software.

#5291864 Difference Between 2D Images And Textures?

Posted by Josh Petrie on 16 May 2016 - 10:14 AM

Generally they are the same thing.


In some contexts, such as that of a specific API, a "2D image" may be a different thing (as in, a different language type or for a different purpose) than a "texture," but in general both are just picture data. The most common difference will likely be that that things called "textures" generally may have multiple mip levels (which are, effectively, successfully lower-detail smaller versions of the picture) associated with them, whereas a "2d image" is usually just the one image.