Jump to content

  • Log In with Google      Sign In   
  • Create Account

Josh Petrie

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

#5275966 Pointers: "type* var" versus "type *var"

Posted by Josh Petrie on 16 February 2016 - 10:25 AM

Unencumbered by other surrounding standards, I prefer spaces on either side of the * or &, so "T * pointer" or "T & reference"



My eyes are practically bleeding from all the interchanged uses\




The sooner you get used to this the better; in the grand scheme of things this is yet another one of those pointless decisions that only matters because it's important to make a decision and stick to it.

#5275965 Pointers: "type* var" versus "type *var"

Posted by Josh Petrie on 16 February 2016 - 10:23 AM

Not really sure this is a beginner-relevant topic, moving to general programming.

#5275775 Game Dev.

Posted by Josh Petrie on 15 February 2016 - 10:43 AM

The "perfect language" is the one you already know. 


If you don't already know a language, pick one to learn. C# or Python are good choices to start.

#5275287 C#, what is the size?

Posted by Josh Petrie on 11 February 2016 - 10:29 AM

What will be the byte size of class B? Will it be three pointers, or, three times the size of class A?.


It depends. The effective size of an instance of B will scale in proportion to the size the CLR requires for a reference, since A is a reference type and B contains three of them. It will be roughly 3R + O, where "R" is the size required for a reference and O represents some instance-specific overhead which may be zero. Basically this is not information that is provided to you outside of specific implementation internals.

More importantly, why does this matter to you? What are you actually trying to solve?



If you want to know how much unmanaged memory a class or struct will take up if you need to interop, you can use Marshal.SizeOf().


It's probably worth noting that Marshal.SizeOf() cannot be use on either of the two type presented by the OP, as they cannot be marshalled as an unmanaged structure. Marshal.SizeOf can't be used on any arbitrary type.

#5275010 Simple Open-Source Projects To Contribute To?

Posted by Josh Petrie on 09 February 2016 - 11:27 AM

Rather than look for "small projects to contribute to," contribute to projects you use.


Because you use them, you'll already have an understanding of them, which will make it easier to contribute. You don't have to actually tackle things that are official issues, you can create pull requests for minor additions or to fix smaller problems you may have noticed yourself while using it that aren't fully-documented yet. It's a much better way to get involved, I think, than just finding some random project looking for help that you're not otherwise invested in.

#5274473 Conferences

Posted by Josh Petrie on 05 February 2016 - 10:37 AM

I wouldn't call "programming" "business, marketing and PR," but yes. It happens.

#5274318 My introduction and also a question

Posted by Josh Petrie on 04 February 2016 - 02:24 PM

What is the most efficient way to learn game programming, given the limited time I have?



Make games. It will be far more useful to you; you'll learn how to do the thing you want to do, and you'll have some games to show off when you try to get a job as a gameplay programmer somewhere.

#5274289 SDL or windows.h

Posted by Josh Petrie on 04 February 2016 - 11:41 AM

You asked the question in a way that leads to a more nuanced answer than you probably wanted.


The short answer is "yes and no."



The long answer is that you can't make a Windows application without using the Windows SDK and API in some fashion. In particular, Direct3D is part of the Windows SDK and depends on some Windows API basic types. And you also need to use the Windows API to create an actual window, et cetera.


However, you can make one without you yourself manually including the Windows.h header. You can use libraries like SDL or whatnot to create windows and manage all of that, and other APIs that wrap direct use of Direct3D, et cetera. Or you can write a game using just the C++ standard input and output stuff (in a console window) and let the C++ runtime create your console window for you, et cetera.



If you're just getting started and you've already moved on from creating simple text-based games, SDL is a good way to go.

#5273233 I want to make a game based on a book series, that also have a film made. Whi...

Posted by Josh Petrie on 29 January 2016 - 12:54 PM

So you're suggesting that I should do more of a general request, such as:


,, Could I make a non-commercial videogame based on Starblade Chronicles, featuring a new story set in the same universe ? "



I am suggesting you simply ask for what you actually want, rather than try to wordsmith your request to try and ask for what you think will be best received, because what will be "best received" is almost entirely up to the person being asked the question.

#5273009 I want to make a game based on a book series, that also have a film made. Whi...

Posted by Josh Petrie on 28 January 2016 - 10:36 AM

Which people should I ask ? The author himself, UK book publisher, US book publisher or Universal movie studios ? Also, I don't know what deal the author made with Universal...if he sold his rights to them or not...



You should probably start by contacting the author's agent. The specifics will depend on what you want to license and what licenses have already been granted by the author to other parties, and what rights those licenses give all parties involved. You'll probably want a lawyer involved as well.


Practically speaking there's a very slim chance this will work out favorably for you.

#5273007 Help Improve My Pixel Creature

Posted by Josh Petrie on 28 January 2016 - 10:33 AM

The width of the character in proportion to the size of the legs makes his walk cycle look non-human, but it doesn't look bad. It almost gives me the sense that he moves by rotating his legs a full 360 out of phase with eachother, rather than swing them back and forth.

#5272887 Are design patterns crucial for game development at the beginning?

Posted by Josh Petrie on 27 January 2016 - 03:48 PM

Are they crucial for a beginner in game development area or not?


They aren't crucial at all, and in fact focusing your learning on them too early can misguide you.


Design patterns are useful as a way to establish a common language for speaking about problems and solutions. They're useful so that when I talk about a "factory-like" approach to a problem with other developers, those other developers know I mean some kind of solution that involves creating new objects (at runtime) from some kind of key (at runtime) and we don't have to rehash the basic fundamentals of the problem.


For fostering communication, design patterns are great. By they aren't specific solutions to specific problems you are having. If you fall into the trap of looking at them as ready-made implementations to apply to a problem, you fall into the same trap that involves every problem looking like a nail because you have a shiny new hammer. There isn't one way to solve a problem using a "factory;" it's just a pattern, not a drop-in silver bullet. Don't think of them as such or you will unnecessarily limit your ability to solve problems effectively by (potentially) trying to shoehorn in some preconceived implementation.

#5272846 Beginner-friendly language implementations with great portability, performanc...

Posted by Josh Petrie on 27 January 2016 - 10:30 AM

I understand if this is the wrong forum to ask, though.



It's not the wrong forum to ask, per se, but unless you're going to actually respond to the questions about your actual use cases and the details of the shortcomings you've found in the languages already suggested, there's nothing else to really discuss. The one post you made referencing the "Microsoft patent promise" was far from illuminating.

#5272747 Buying a Code Kit for a NBA Jam/Hangtime Type of Game

Posted by Josh Petrie on 26 January 2016 - 12:45 PM

Buying a "code kit" is an excellent way to waste your money unless you have programmers/developers on staff already who can evaluate the kit and determine if it's something they can use or extend to build this game. Chances are you'd be better off starting with some existing engine like Unreal or Unity.


If you do have programmers already, get them to evaluate the products you're thinking of buying since they're the ones who will be using them.


If you don't have programmers or people who can build the game via existing tools like Unreal, etc, find them. The classifeds section is a good place for that here.

#5272736 Setting Fonts and size in a Win32 API "EDIT" window (edit box)

Posted by Josh Petrie on 26 January 2016 - 11:13 AM

Please don't revive decade-old threads.