Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Nov 2010
Offline Last Active Today, 12:24 AM

#4903405 Constructive Criticism

Posted by Postie on 16 January 2012 - 04:38 PM

I quite like the notion of "buying your freedom". Most games by beginners don't really have a well defined end goal.

A few quick thoughts:
  • On the face of it your entity class seems ok, but since your Weapons class inherits from Entity, you end up with weapons having properties like boughtFreedom and isAlive.
  • Since the hero is the only one who'd be buying their freedom, it would make more sense as an external variable.
  • The way you've implemented the different weapons is a little odd. You'd be better off creating a weapon class with the properties Identity/Name, Strength and Price, and then instantiating one of those for each of the 3 weapons you want to support. Then you'd assign the appropriate weapon to the entity.

#4903400 When planning to make a game, should I cover everything before actually start...

Posted by Postie on 16 January 2012 - 04:19 PM

On my current project, pre-production ran for a couple of years (on and off) before I thought the idea was solid enough to begin work on it. In the year of development I've put into the project since I've run into plenty of issues I didn't foresee in my planning, as well as come up with countless new ideas that I only thought of due to implementing my ideas and make them concrete. What I mean by that last line is that when an idea is just an idea it doesn't have to pass strict tests for correctness, its given some leeway for the details to be "fleshed out later". But when you come to implement the idea, you can't hide from the details, they have to be done. I find this is a good test for how good the idea is, and you have to be prepared to throw away ideas that you love but can't get to work.

To sum up, unless you're writing something simple that's a clone of another game I would argue that you can't possibly think of everything before you start. I've read design documents for some of the big games that clearly took months to write, and though they do cover the vast majority of the final game's mechanics, there are always differences, where the original idea simply didn't work in practise.

#4902601 Name for MMORPG

Posted by Postie on 14 January 2012 - 02:31 AM

Finding a good name is very difficult, but talking to others about your "untitled <insert genre> project" is a pain. I tackle this by assigning a codename until I have a proper name. This also gives me a lot of time to come up with a proper name I like. A friend of mine had a favourite saying that amounted to: "If you design the packaging before the project has started, the project will never be completed."

#4876998 [SlimDX - DX9] device.Reset returns error code

Posted by Postie on 25 October 2011 - 07:25 PM

Whenever this has happened to me, it's been because I've forgotten to free all resources before calling Device.Reset().

Try commenting out the creation of resources until the problem goes away, and then you've found the culprit.

#4870901 Precalculating values and storing them in variables, efficient?

Posted by Postie on 09 October 2011 - 05:27 PM

Based on my experience, the Pow() function can be slow for squaring. I find it's better to simply multiply the numbers together much like you've done in the first line of the formula.

In addition, Math.Sqrt(2*Math.PI) is a constant value, so you could get rid of the expensive square root by pre-calculating that somewhere else and passing in the value.

To address the issue of whether to have the calculation be done on the GPU or CPU, in general the GPU is going to have much faster, since its heavily optimised for crunching numbers, but it will depend on how utilised your CPU is. If you GPU is already grinding away on other shaders, but the CPU is mostly idle, it may be better to have the CPU do it instead.

The only way to know for sure is to try both approaches and see if there's a difference in frame rate. In short, benchmark! :)

#4863239 Books for SlimDX

Posted by Postie on 18 September 2011 - 11:30 PM

I've been working with SlimDX now for about 10 months, and I've noticed that there are few resources on SlimDX out there. That said, I've also noticed that despite not knowing a thing about DirectX before I started, I can now read and understand DirectX examples and translate them to SlimDX in a matter of minutes. I credit the designers of SlimDX for that. They've followed the DirectX API very closely.

I'm actually using directx 9 and shaders, so I bought a book on that topic, and despite all the code examples being written in c++, its very easy to translate directly to SlimDX.

#4863212 Prudence of Creating an Engine

Posted by Postie on 18 September 2011 - 08:27 PM

I've recently realised with the project I'm currently working on that a good portion of the 10 months so far has been in creating engine type stuff for the game, and very little has actually been spent on the gameplay itself. So if I'd gotten hold of an existing game framework and used that instead of trying to roll my own, I'd be much further along.

That said, I don't think it was wasted effort, nor do I think I'd change my mind if I could go back and start again.

I recently read a comment by one of the developers involved with Diablo 2, and I think its some of the best advice I've ever read re: creating games. I don't have the exact quote to hand, but the gist of it is that you should work to implement the core gameplay as soon as possible. Even if its really rough. Forget creating fancy UI's and highly optimised resource managers and amazing water shaders with caustics and refraction. If your game is about a guy walking around fighting things, make that as early as possible.

I spent 6 months doing all the wrong things and losing enthusiasm for the project since none of that engine crap makes the game "fun". I've since switched to just doing pure gameplay and am making a lot of progress and staying motivated, which is important if you're in a small team or going solo.

To address your question directly, you can't create a game without an engine. The reality is you're unlikely to be able to create an engine that anyone else will want to use, even if you provide it for free. There are much better ones out there written by highly skilled engine developers from big companies. If you're determined to create an engine, don't worry about creating an engine for everyone else, create an engine for your own game.

#4852715 Storing Game Data in Data File?

Posted by Postie on 23 August 2011 - 03:31 AM

Splinter of Chaos, the reason I didn't respond in a PM is that it wouldn't add anything to the discussion if it was behind closed doors. My post wasn't intended as a personal attack, I was merely stating my opinion on the matter and attempting to bring an alternate viewpoint to the table.

Hodgman, I'm not sure how it became so political either, however based on the OP's statement that they called him a DRM nazi when he raised the topic on IRC, it seems like a hot topic?

Re: the OP's question, there's always going to be an overhead associated with accessing files that are virtualised in an archive, as there's an index lookup, a possible decompression/decryption phase and the inevitable complexity if there needs to be a writeback mechanism (rewriting the index, adding additional filedata to the end). Though that said, compression/decryption is very fast these days, disk reads are also pretty speedy, so the overall impact is not going to be too severe unless you're using a lot of tiny files imho.

The best way to determine if there will be a performance issue though is to do some benchmarking.

#4834114 Grayscale Image Transitions Using SlimDX

Posted by Postie on 11 July 2011 - 09:23 PM

It could be that your desktop colour depth isn't 32 bit. This would cause the brightness values to jump instead of smoothly transition.

Have at look at the image on the following site : http://www.lagom.nl/...st/gradient.php. Does it appear smooth or is there banding?

#4824805 Where did you learn?

Posted by Postie on 18 June 2011 - 08:35 AM

Though I've been programming for 15+ years, I still use this link to find the answers I need.

#4820855 Grayscale Image Transitions Using SlimDX

Posted by Postie on 08 June 2011 - 03:41 AM

Can you please post a little bit of the main working code. I will be grateful to you

Are you familiar with HLSL and how to set that up on the CPU side? If not, it's too much to go into in a thread post. If you do know how- then obtaining your greyscale would be easy:

Color.rgb = (Color.r+Color.g+Color.b)/3.0f;

A better formula to use would be:

Color.rgb = (Color.r * 0.299f + Color.g * 0.587f + Color.b * 0.114f);

The reason is that in terms of luminance (which is what the grayscale value is a representation of), the three colour primaries are not equally weighted. Use of those coefficients is fairly standard in image processing.

#4806699 I'm new, why do I have to use this forum?

Posted by Postie on 04 May 2011 - 07:54 PM

What you're describing is essentially impossible and also illegal unless you get licensing agreements with all the IP owners. That is to say, importing code, graphics and sound assets from existing commercial games and mash them all together and have it work.

Producing a game from scratch, writing all the code, creating all the graphics and sound assets yourself that does what you're describing is possible, but you still have the issue with IP ownership.

#4798712 Easiest genre game to make?

Posted by Postie on 15 April 2011 - 03:24 AM

The thing that makes replicating the big games unattainable to the majority of us coders is the graphics. Once you strip away the prettiness, the underlying concepts are pretty much the same as any game from the same genre of the past 10 years. If it wasn't for the big names spending all their time constantly trying to out do each other with the best looking graphics that push your system to breaking point, they might be able to come up with some innovation and interesting game mechanics. Luckily we have the independent game makers to make games that are actually more than just eye candy.

That said, I cringe every time I hear someone say they're making a Minecraft clone. Minecraft is good, but why do we want 300 copies of it? Make something new! :)

#4791108 Engine Programming

Posted by Postie on 27 March 2011 - 04:37 PM

I can understand where you're coming from with the question you posed, however it is very hard to answer, which is the reason some of the responses haven't been to your liking it seems.

I'm a programmer in my day job (not games though), but in my spare time I have coded several games projects, and my advice to you is to go ahead and write the game and not dwell too much on trying to making an awesome engine to run it. You'll make mistakes, but that's the way we learn what works and what doesn't. It takes a great deal of talent and experience to build a reusable, extensible framework and it's not a realistic goal as a first project to be honest.

That said, the classes you've described sound ok to me. Once you get cracking on the project you'll find you need a whole bunch more classes you never even considered, but that's the nature of coding where the design is in your head, not specced out by a designer into a 200 page requirements document. :)

Re: Collisions, typically collision detection is done in the main game loop, once per frame. Modern hardware should be able to handle even fairly naive brute-force tests here, if performance is an issue there are plenty of optimisations you can do.

Good luck!

#4780802 How to Keep The GUI on Top of The Scene

Posted by Postie on 01 March 2011 - 08:06 PM

I use a very similar approach, and have partially transparent UI elements working. The trick I found was to disable the Z test, and perform the UI render call after the rest of the scene had been rendered.