Jump to content

  • Log In with Google      Sign In   
  • Create Account


Josh Petrie

Member Since 11 Jun 2003
Offline Last Active Private
-----

#4991148 What to choose?

Posted by Josh Petrie on 17 October 2012 - 10:13 AM

And between SlimDX and normal DirectX with C# what would you recommend?


DirectX is a set of native COM-like libraries, but most of them are not well-behaved COM and so cannot be used via COM interop in C#. Direct3D in particular, which is what you're really asking about.

In other words, there is no "normal DirectX" for C#, you only have options that are wrappers (XNA is a very high level wrapper around D3D, as was Microsoft's MDX which is now deprecated and their CodePack which is now effectively abandoned). Your only sane choices are SlimDX or SharpDX, both of which will work fine.


#4990802 What makes Debug different from Release?

Posted by Josh Petrie on 16 October 2012 - 11:12 AM

The difference between Debug and Release is whatever you define it to be.

"Debug" and "Release" are idioms of Visual Studio (and many other IDEs) -- they are the names of default build configurations generated for a solution/project/whatever-your-IDE-calls-it. Generally, the "debug" configuration does no optimization and enables a bunch of extra sanity checking and safety mechanisms that are not present in the "release" configuration (which also enables optimizations). Almost all of the options in the configuration correspond directly to parameters that can be given to the compiler and linker and any other tools used to actually build your project.

Every major IDE that supports these kinds of configurations also allows you to modify them as you need to, and usually to define additional ones as well.


#4968530 Best way to follow up a tutorial?

Posted by Josh Petrie on 11 August 2012 - 04:40 PM

No. Read the tutorial and try to internalize the concepts it's conveying. Implement them yourself -- don't just copy the code, even if you think you "understand" it, that's a sure way to disaster. If you do understand the concepts and the code you'll have no trouble reimplementing the thing on your own.

Be aware that many tutorials are downright terrible and shouldn't be trusted on their own.


#4968426 To DirectInput or Not to DirectInput

Posted by Josh Petrie on 11 August 2012 - 09:37 AM

Through C++/CX for the .NET side of things. I'm entirely sure it's all possible yet, but I'm working on that side of it ATM and it seems to be going fairly smoothly... Is that not going to work?

No.

C++/CX is C++ with some extensions to support accessing the new Windows Runtime (WinRT); it is primarily syntactic sugar for COM support. C++/CX produces native code as WinRT is a native code framework. You cannot mix managed and native code in a C++/CX project, so you cannot even combine it with C++/CLI. Using C++/CX -- like using C++ -- gives you a 100% native binary.

C++/CLI looks the same as C++/CX because Microsoft basically lifted the syntax. C++/CLI would let you produce managed code, but it isn't C++ -- it's a managed language, so at that point you may as well just be using C#. There is no point to ever using C++/CLI unless you are writing an interop library to expose a native API to managed code or the other way around.

I might not be using the proper term here and may actually be referring to WInRT. But it all looks very similar to .NET to me... I wouldn't want to use a wrapper here either, I would want to interface directly with the library where at all possible for the clearest picture of what's going on.

Yeah, you're not. WinRT isn't .NET, it's not related to the CLR or managed code at all. Furthermore, you can't even use DirectInput for Metro apps in WinRT.

It sounds like all of your plans are based around an assumption of compatibility, when in fact the technologies you're all talking about are quite incompatible at varying levels. You should probably revisit your plan by determining what platform you want to target or what language you want to use and then doing some research into what is possible with that platform -- MSDN is an excellent resource, you should start there.


#4968220 Best language to make 2d games

Posted by Josh Petrie on 10 August 2012 - 04:22 PM

Well this got off-topic fast, didn't it?

I have stripped the topic of the irrelevant and off-course discussion concerning cx_freeze and Python, etc etc. Take it to some other forum, please.


#4967879 To DirectInput or Not to DirectInput

Posted by Josh Petrie on 09 August 2012 - 01:24 PM

So creating a game I hope to be able to compile and run as both Win32 and .Net 4.5,

To use Win32, you need C or C++ (or other native language). To use .NET 4.5 you need C#. How exactly do you expect to do this?

I'm considering using DirectInput to handle all user input as it'll basically be unchanged across both.

The code will have to change rather drastically in fact as the C or C++ interface to DirectInput (via COM) is superficially very different from the available managed wrappers that support DirectInput (SlimDX and SharpDX). The code won't directly compile at all.

I have a feeling you don't quite understand the distinction between Win32 and .NET. Win32 is a native C API, .NET is an implementation of the CLR. They are not equivalent technologies.

Could anyone elucidate why this might be the recommendation?

DirectInput is deprecated and just sits on top of Win32 messages or RawInput, depending. So it's generally better just to use Win32 messages or RawInput. The only thing you'd really need DirectInput for is joystick support.


#4967037 is C# an alternative to C++?

Posted by Josh Petrie on 07 August 2012 - 09:16 AM

This does not appear to be constructive at all.


#4956007 HELP!

Posted by Josh Petrie on 05 July 2012 - 09:31 AM

Please don't go so overboard tagging your post (for example, there is no need to tag your post with variations of your own username or variations of the word "programming" that are spelled incorrectly or different capitalizations of various APIs).

I have removed most of the tags.


#4950998 Looking to start programming, where to start?

Posted by Josh Petrie on 20 June 2012 - 09:35 AM

I would recommend you start with C# or Python. Learn the basics of the language with simple, text-based programs. You can graduate to simple text-based games (tic-tac-toe or hangman or the like) relatively quickly and keep working on those until you feel accomplished and comfortable enough with the environment to move on to something larger. Practice is key.

Isnt C# a subsidiary of C/C++?

No. C# is an entirely distinct language, although it has some syntactical similarities to other C-like languages.

I wanted to start out using Visual Basic, but read its outdated, would C# or Python be good starting languages?

C# or Python are both probably better choices. However, a newer version of Visual Basic (VB .Net) would be suitable as well, it's just sort of an ugly language with (in general) poor toolchain support for games. A lot of libraries and APIs that work in Visual Basic do so primarily because VB .Net is a managed CLR language like C#, so things "work" but they don't quite end up feeling right.

If I can learn to program one language, are most of them basically the same? (I know theyre all different, but theyre all programming languages so they have similarities right)?

Learning any language of one paradigm (imperative, functional, et cetera) would make learning other languages of that paradigm easier, and to some extent even make learning new programming paradigms easier, yes.


#4947146 Creating graphics for a full screen game? What dimensions?

Posted by Josh Petrie on 07 June 2012 - 01:27 PM

You don't own this thread and have no authority to attempt to dictate it's course. This is a discussion forum. The only people who have that authority are the moderators, and I am the moderator of this forum. Do not attempt to play rules-lawyer with me.

Now then.

I think that was pretty harsh, and quite frankly unnecessary. A game design doc can be one of the most helpful things when making a game if it's done right, and I don't know why you would accuse someone of making mistakes outright like that.

Yes, it was harsh. But I did not say that a game design document is a bad thing, I said that trying to do all the design work up front is bullshit, and quoted the term GDD to express some skepticism at the idea of specific pixel sizes being relevant to the design of the game. It's an implementation detail, and potentially one that belongs more in a technical specification if anything. As for mistakes? Anybody who believes they've never made any is a fool, or as Ravyne suggests, has never developed anything particular complex. All software has bugs in it, all designs have errors or omissions or exploits or loopholes. We make mistakes, probably more often than we made things correctly, and that's good because we learn from them. That's why we iterate.


The pre-development phase is free since I'm the one doing it.


The more important details I can include in the GDD that I give out to the team later the smoother and faster development will be = cost less money.


So It's just much smarter if I already know what sizes the images should be and even have them ready = saves lots of time because the programmer can just puzzle the pieces together instead of discussing and planning with me = cost more money.


Opportunity cost is relevant and needs to be considered. Especially if you going to hand off your design to a third party to actually get it implemented, you cannot expect to actually get anything produced without any kind of back and forth dialog and iteration. It is just impractical, it doesn't work that way. You will invariably have forgotten something that your developer will need to ask you about. You're only human.

Worrying about specific image resolutions isn't something you need in the GDD. What you want to call out is, as Ravyne suggested, that you want scalable resolution support. Your developer will be able to translate that into the technical details he needs to produce the implementation you desire.


#4947083 Knowing where to arrive

Posted by Josh Petrie on 07 June 2012 - 10:17 AM

I would suggest you start with a language other than C++, but you already knew that and don't really want to hear it, so why I should I waste my time dispensing more advice that you might have arbitrarily predetermined you don't want to hear because you think you know better?


#4947082 Creating graphics for a full screen game? What dimensions?

Posted by Josh Petrie on 07 June 2012 - 10:15 AM

My GDD is getting near completion so it's time to make it even more detailed...

I would venture to suggest that your next step should be to actually start making your game, instead of trying to do all this design and "GDD" bullshit up front. You're putting the cart before the horse, and if you spend too much time going too far in-depth with your design and pre-producing your art assets and all that you run the risk of having to throw away a ton of that time when it becomes apparent during iteration that something isn't going to work.

You've already made mistakes in your design and content production, so start iterating on something practical so you can expose those mistakes and correct them sooner rather than later.


#4947077 Need C++ Roguelike Tutorial

Posted by Josh Petrie on 07 June 2012 - 10:07 AM

There's RogueBasin, which evolved from Dungeondweller (which I mention for posterity only, as most of its information is likely extremely outmoded these days). You may also want to check out Amaranth.


#4932510 Need Help : error: syntax error before `*' token

Posted by Josh Petrie on 18 April 2012 - 10:38 AM

You forgoet a ";" from first line of code.

This is correct. Your first bit of code is:

//music
Mix_Music *music = NULL
You're missing the semicolon after the NULL.

Sometimes, when you see an error from a compiler and it points to a line that looks okay -- in this case, it's probably indicating the line
Mix_Chunk *muks = NULL;
which looks fine, you should take a look at the line (or the code) above the error. The C++ compiler processes code from the top down and certain errors confuse the parse enough that it cannot pinpoint the source of the error with complete accuracy.


#4907533 Slimdx Xinput - Exception Error - A short Code Provided

Posted by Josh Petrie on 29 January 2012 - 11:13 PM

None of those calls block, and there is no loop keeping the program alive. It's doing exactly what you wrote: determines if the controller is connected, prints one line, and exits immediately.




PARTNERS