Jump to content

  • Log In with Google      Sign In   
  • Create Account


slayemin

Member Since 23 Feb 2001
Offline Last Active Yesterday, 11:44 AM
-----

#4985372 Idea to prevent people from torrenting your singleplayer game

Posted by slayemin on 30 September 2012 - 09:27 AM

I'm in Afghanistan, were the internet connections are about as fast as a 56k dialup modem and about as stable as the occupants of a psych ward. I can't play games which require an internet connection to validate that the game is legit. It's a frustrating experience if you ever have the displeasure of going through it.

My philosophy on game dev: I make games for people like me. Right now "me" has no internet access in my room, so if I make a game for "me", then it can't require internet access for single player mode.


#4984757 I want to be an indie game developer, where do I start?

Posted by slayemin on 28 September 2012 - 10:08 AM


...


Thanks this is really helpful, I have been watching some c++ tutorials lately, is this a bad idea? So far I understand everything.

No, that's excellent. Treat the C++ tutorials as a teacher giving a lecture, then assign yourself homework to test your understanding of the tutorial content. However, don't forget that the point of following all of these tutorials is to learn how to build a game so that you'll build a game. There's a danger that you'll spend all of your time learning how to do things but won't ever actually build anything (a case of analysis paralysis). So, my advice is to start building stuff and when you run into a gap in your knowledge, then seek tutorials/references to fill that void :)
Start simple with a "Hello World" type program (get stuff on the screen!).
Then, look into what it takes to get multiple "Hello World" on the screen (like, 1000).
Then, try to put a graphical image onto the screen (may take some R&D)
Then, try to move that graphical image around on the screen (may take some R&D)
Then, try to move that graphical image around based on user input.
If you can do all this, you already have the necessary skills to build Pong.

Pong is an excellent game to start with. It's design is simple, the game is complete, and its attainable for newbies. You can focus on the structure of your game code and building a complete game framework. It's also a great introduction into concepts like AI, input, managing game states, graphics, game play, etc.


#4984439 I want to be an indie game developer, where do I start?

Posted by slayemin on 27 September 2012 - 12:24 PM

Step 0: Have vision.
Step 1: Design a game or have a game idea you want to make.
Step 2: Build the game according to your game design
Step 3: Test and revise your game over and over again until it's exactly what you want
Step 4: Market and release the game to the world

Naturally, step 2 is going to be the most difficult step to do because it's going to require a bunch of skills which you may not necessarily have at the moment. That's okay. This is where you teach yourself everything you need to know, or find people who have the skills you need and you can convince them to work on the project. You'll be learning the exact skills you need and you'll be building your project at the same time, so you get two birds with one stone. You'll go through some learning pains, you'll experience frustration, moments of glee and excitement, your project may succeed or fail, but if you stick with it, you'll learn a ton along the way, gain valuable experience, and possibly a marketable product to sell.

Bottom line: just do it.
An "Indie developer" is just a title which you can take upon yourself. It means nothing, really. What matters is what you create.

As for languages & platforms, I recommend Unity3D with C#, or C# with XNA.

As for producing your game, you're going to need programming, art, music and sound, and possibly writing.

The best advice I can give you is to keep your game simple enough for a single person and beginner to complete. A polished and completed yet simple game is infinitely more valuable than a complex but incomplete, unpolished game. Keep your features/requirements few! Think along the lines of old atari games, like "Pacman", "Breakout", "Tetris", "centipede", etc. and add your own small twist to the design. Then once you start, punch yourself in the face every time you think about wanting to add a new feature (its a project management thing, not a crutch on creativity).


#4984351 Final Year Project ideas :)

Posted by slayemin on 27 September 2012 - 08:02 AM

What do you want your final project to say about you?
"Hey, I can use the things I've been taught to create software!"
or
"Hey, I can teach myself new things or invent stuff nobody has done before and create software out of it!"

In my opinion, the size/scope of a project doesn't matter.
Student: "But, I wrote 10,000 lines of code and have X number of features! I deserve an A+!"
Prof: "...who cares?"

Learning things which are easy doesn't matter (example: Unity3d, HTML, javascript, etc).
Student: "I know we were only taught C/C++ and C#, but I went out and learned Java! Isn't that wonderful?!"
Prof: "By now, that's expected of you...so, who cares?"

The amount of work required doesn't matter.
Student: "I ported this C# project over to Java! It took hundreds of hours!"
Prof: "time spent is irrelevant...who cares?"

Breaking new ground is excellent.
Student: "I've invented this new technique to solve problem XYZ with an ABC boost in performance. Here, look at my scientifically collected metrics which prove it!"
Prof: "Wow, this is good stuff! We should share this! A+++ for you!"

Doing things which others thought was impossible is excellent:
Student: "These qualified experts have said that it is impossible to do XYZ! However, I disagreed and created a project which does exactly that! This is how I did it!"
Prof: "Whoa! that's incredibly impressive! A+++ for you!"


#4983564 Is this really Test Driven Development or am I barking up the wrong tree?

Posted by slayemin on 25 September 2012 - 07:27 AM

There's a subtle problem behind the philosophy of test driven development. It reminds me of set theory, so I'll use that to illustrate the issue.

Suppose you create a set of tests which your code needs to pass:

TDD = {A,B,C,D,E,F}

You write code which passes each of the tests in the set. However, the set was an incomplete set of tests. You also needed to add tests {G,H,I, J, ???}. Unfortunately, these tests are part of another set called the "unknowns" which will always exist (which is composed of the two sets "unknowable unknowns" and "knowable unknowns"). Sometimes, these "unknowns" are simply the result of a lack of imagination on the part of a single test writer. Getting multiple people to give inputs on possible test cases can mitigate this, but there can still be unimaginable test cases which occur in reality. The size of the unknown set and the contents of the set is a complete mystery.

So, the complete set of tests is a combination of sets:

Complete Set = {TDD set} + {??? set}

The result is that even if you religiously follow your TDD practice with perfectly writen test cases, it's not a guarantee that the developed software will be without errors. In practice, it yeilds good results and is a good methodology for generating quality code, but don't drink too deeply of the kool-aid.

Real world example: One of the space shuttles burned up in the atmosphere on re-entry because chunks of foam damaged the heat tiles during lift off. Nobody imagined that foam travelling at high velocities would have any effect on the shuttle chasis.


#4981732 Thoughts on double link list strings?

Posted by slayemin on 19 September 2012 - 10:19 AM

hey good people of GameDev, i've been toying with the idea of using a double link list to contain a character array for fast insertion/change/modification of text with a text editor.

currently my ui text entry input stores each line, and rebuilds the line when their's a change on a particular line, this is sufficient for my general needs, but i was thinking of using linked list's to store text, it'd also make cursor tracking much easier since it'd be just containing a pointer to the current char container.

so, any thoughts on the subject from anyone's who tried something similar?


Does what you're currently doing work?
Is this premature optimization?
Does the alternative add complexity or reduce complexity?
How maintainable is your alternative solution?
Whats the cost vs. benefit ratio for this effort?

I think I'm leaning towards "Don't fix it if it ain't broke!"


#4978637 Simple & Robust OOP vs Performance

Posted by slayemin on 10 September 2012 - 11:31 AM

On code design:
Rule #1: Keep it simple (you can always add complexity later).

There are two versions of a programmer: The one who writes the code and the one who has to maintain/update the code. Sometimes its the same programmer, sometimes its different programmers. Sometimes you'll come back to your code six months later and barely remember what you were doing and why you did it. This is where the power of simplicty and good comments will shine.

Simple algorithms are easier to understand and easier to troubleshoot. When you're inventing the solution to your problem, ask yourself "is this the simplest solution to solve the problem?" (sort of like Occams Razor).

Rule #2: Spend more time and effort trying to choose the best algorithms rather than trying to tweak little bits of code for performance gains.
Example: If you have an O(n^2) algorithm and you try to speed up its performance by tightening the inner execution code, your gains will be marginal compared to if you were able to find a O(log n) or O(1) algorithm.

Rule #3: (you should follow rules 1 & 2 first) Spend time optimizing your code when you're seeing actual optimization problems.
I've spent lots of time trying to solve problems that don't exist. It's generally a waste of time and can lead you down quite a rabbit hole. Don't do it. At the same time, don't take this as permission to start writing sloppy code.

Rule #4: Use empirical evidence to justify your optimization.
That means of course, that you have to gather the empircal evidence through a profiler, by counting CPU instruction counts, measuring CPU load, network bandwidth, etc.
Remember debugging 101: Identify, Replicate, Isolate, Solve, Review.

Rule #5: (or maybe rule #0) If you can avoid reinventing the wheel, then do so.
Has someone else done what you're trying to do? Did they use a better technique? Is there available code you can use? Is there a library you could use? A game engine which satisfies your requirements? A software app which already does what you're trying to do? (of course, this is completely ignoring the counter-productive legal BS)

Rule #6: Don't lose sight of your end users and what they care about.
All through university, I pushed myself to write the most technically complicated code. If an assignment asked for a 2D game, I'd go above and beyond and create a 3D game. If we had to find and write up a ray tracer feature, I'd find one that experts said was impossible and then try to do it. Then we'd demo our projects to our fellow students and claim bragging rights. Well, my games/apps were impressive in their own right, but in their technical complexity, they were buggy and unpolished. Other students spent more time refining and polishing their simpler apps/games. Guess who won? Not me. It turns out that nobody gives a shit about the backend technical implementation and its difficulty. It's ALL about functionality, usability, and presentation. It was a good, albeit hard lesson learned and worth remembering :)
(so, your end users won't care about how your OOP is ultimately designed, as long as your app is functional, usable and well presented.)


#4977600 Seniority, and how to get there

Posted by slayemin on 07 September 2012 - 06:35 AM

I'm considered a "senior" at my work place, but I don't know if I really embody the meaning of the title. Certainly, I'm no newbie to software development, but at the same time, I don't have the decades of hard earned experience which the title implies. My recommendation is to stop being concerned about titles (which are meaningless and can be given out like candy), and be more focused on developing a rich and deep skill set. Pretty much every software project goes through a software development life cycle and needs someone to take ownership of the project (usually project manager, but that sometimes falls on the developers shoulders). To be a "senior" developer, you'd have to demonstrate a mastery of each phase of the software development process (requirements gathering, architecture, design, construction, testing, deployment & integration, training and maintenance.). You'd also have to develop a habit of introspection. How is the project going? how am I doing with regards to the work on it? What can I do to work more efficiently? what can I learn from my past mistakes and what can I do to avoid them in the future? what methods and processes are others using effectively? can I incorporate those methods and processes into my own business practices?

My most recent project failure was a good source for learning and introspection. The project failed in post production because there wasn't an integration plan for how the organization would change business processes. We gathered the requirements, designed the solutions to meet the reqs, constructed the product and tested it, but because there wasn't a plan to actually get people to change their processes and migrate to the new system, it failed to launch. We should have started talking about this right away in the planning phase of the project and gotten some sign offs to build buy in from all the stake holders.

Anyways, experience != time. Experience == mistakes made and learned from.
The best thing you can do is encourage people to be introspective about what lead up to a mistake and try to learn from it. Make it an org culture value and build ways/means to share that knowledge within the org (forums, wikis, weekly email distro lists, etc). That way, everyone benefits from the mistake rather than an individual.

You've decided to make one of your staff members an associate producer rather than sponsoring university education. I think that's a good move since OJT is far more relevant and valuable. If your associate producer makes a $1,000 mistake, that's just the cost of training one person. However, if you disemminate the lessons learned from that mistake to 10 people on the team, then it lowers the training cost to $100 per head. Financially, it makes sense to share mistakes made.

Also, that brings up a very difficult problem to solve: Getting people to admit to making mistakes. That's going to be a organizational culture issue to solve. If people are discouraged from screwing up (to maintain an aura of professionalism & expertise in their field), then your org as a whole will suffer and probably pay $1,000/head for the same mistake. That'll amount to a nice $10,000 training cost in my previous example.


#4976006 Keeping parts of the engine separate

Posted by slayemin on 03 September 2012 - 04:31 AM

There's a subtle trap you may be at risk of falling into: Soft coding everything. It's at the opposite end of the spectrum of hard coding everything, but can be just as annoying.

Focus on creating your game to its specific requirements. You're going to have to get specific somewhere, eventually. If that means you have to create a fantasy character generator to make your game work, then that's what you'll have to do. If, in the distant future you find yourself building a futuristic version of your game, you can reuse most of your code and existing software architecture. It'll probably add unnecessary complexity if you want to generalize your character generator for any genre. Remember that software is software, which means it can change with changing requirements. It takes less effort to recompile and deploy a patch :)


#4975718 When am I qualified?

Posted by slayemin on 02 September 2012 - 07:12 AM

Employers have three main questions they're trying to answer about you:

1. Can you do the work required of you?
2. Would you be a good fit for the company and organizational culture?
3. Will you cause problems for the company?

Pretty much all relevant interview questions are trying to answer these three over-arching questions.

At the same time, remember that interviews are a two way street! you're also interviewing the company to see if its a place worth spending your time at. Here are the overarching questions I try to get answered as an interviewee:

1. What are working conditions like (environment, org culture, equipment, bosses, etc)?
2. Is the company stable? Does it have its shit together? (You want to get paid in full, on time and you don't want to get jerked around)
3. If I agree to work here, what are my costs going to be? (Time, money, energy, mental sanity, expertise, costs to quality of life, IP rights, freedoms etc.)
4. If I agree to work here, what can I expect to gain? (money, experience, perks, etc) Do the costs outweight the gains?
5. Why should I work here?

Note that you are an economic resource and the principle of supply and demand applies to you. The more rare and exceptional you are, the more leverage you have in negotiating to get what you want. I suspect that the biggest mistake entry level people make is undervaluing themselves.


#4975107 Updating the Player in a Quad Tree

Posted by slayemin on 31 August 2012 - 05:02 AM

I'd recommend putting a layer of abstraction between the input devices (mouse and keyboard in this case) and the game object. That way, the input devices are more interchangable and you don't have to worry about how the device is being used.

For example, suppose I have a space ship object. I want to give the play the ability to move the space ship object forward in the direction its facing, and to turn the direction of the space ship object.
W - Makes the space ship go forward
A - Turns the space ship to the left
D - Turns the space ship to the right
S - Slows the space ship down

If you bind the keys like this:
if(Key.Pressed(W))
{
   position += GetDirection() * speed;
}
if(Key.Pressed(A))
{
   Direction -= 1;
}
if(Key.Pressed(D))
{
   Direction += 1;
}
etc...

Instead, do this:
if(Key.Pressed(W))
{
    Spaceship.Thrust();
}
if(Key.Pressed(A))
{
    Spaceship.Turn(-1);
}
if(Key.Pressed(D))
{
    Spaceship.Turn(1);
}

By calling the methods for the objects to manipulate the objects instead of manipulating the objects directly, lets other entities control the object -- like an AI controller. So, both the player and an AI call Spaceship.Thrust(), and can be interchanged with very little code rewriting.

When you're using the quad tree to handle collision detection and any update code (AI), you shouldn't care about what is controlling the entity. All you care about is where the object is located spatially and how you want to update the object with respect to nearby objects.


#4972624 Digging

Posted by slayemin on 23 August 2012 - 10:09 AM

I can't point you towards any specific articles, but I can give you some guidance on how I'd approach this conceptually...

Rule #1: Try to understand the simplest form of the solution. We can always make things more complicated later.

Abiding by this rule, let's try to subtract a volume from a 2D rectangle using another 2D rectangle. If you have a rect with the lower left oriented at 0,0 with a height & width of 2, and then subtract a 1x1 rectangle from it, can we figure out how to do it on paper? What result should we try to get? Do we want a polygon, or do we want to create a bunch of rects? What's the easiest to work with? What if we subtract the 1x1 rect from an arbitrary location somewhere on or around the 2x2 rect?

I think ideally, we'd want to recreate the geometry by rebuilding it with new verticies. The new rect would certainly contain the verticies which are contained within its bounding area. We'd also be interested in the lines of the verticies which are within the bounding area since the new region will have to place its adjusted verts on that line.
Example:
Original rect verticies: {(0,0),(0,2),(2,2),(2,0)}
Subtraction rect verts: {(1,1),(1,3),(3,3),(3,1)}

Result should contain five verts:
{(0,0),(0,2),(1,2),(1,1),(2,1),(2,0)}
Note: (1,1) was the bounding vert but it was connected to (1,3) and (3,1). So, how do we get the resulting verts (1,2) and (2,1)? We do a line intersection test! Since we know that there is a vert contained within another vert, we MUST have intersecting lines. Although this is a math & physics forum, I'm going to leave the line intersection test mathematics out -- it's pretty simple; start with the "y = mx + b" equations and don't forget to account for floating point precision errors!!!!!!! Set a minimum epsilon and use testing to adjust its accuracy. Test this thoroughly since you don't want floating point precision errors to randomly creep up on you. (A more scientific approach would be to know exactly how large your epsilon tolerance needs to be for different parts of the float scale)

Anyways, once you've got this solved for integers in two dimensional space, you can add additional complexity by adding in additional verticies at arbitrary positions, the z-coordinate, and eventually rebuilding complex meshes (such as rebuilding a section of terrain to simulate a crater after an artillery shell impacted it).

If you get stuck on something, back up a step to its more simple form and make sure that its working as expected.

On a slightly more abstract/philosophical note, you may be able to avoid doing any of this all together if you can find a clever way to eliminate this requirement from your game play or simulate its effect (some games will use precalculated shattered meshes to simulate something like wood splintering). If this is vital to your game play (such as with mining out a tunnel), you may be able to get away with carving out blocks (like minecraft or terraria) instead of recreating meshes. Anyway, its something to keep in mind. If you spend an hour trying to think of a clever solution, it may be more cost effective than spending ten hours or more implementing a less clever solution.


#4971772 Composition heavy OOP vs pure entity component systems?

Posted by slayemin on 21 August 2012 - 04:42 AM

One other advantage to the Entity-component system is that it lends itself very well towards parallelism. When you've got processors with multiple cores, multiple processors, or multiple networked computers each with their own processors, it only makes sense to distribute the processor work load to make use of the available resources (if it provides a performance boost). I've successfully implemented an entity-component system which distributes the components across multiple cores, but haven't spent a lot of time and effort to see if it works over networked computers. It's mostly been a proof of concept and I've been meaning to flesh it out and do a thorough write up with code samples.

One downside of the entity-component system is that it incurrs a significant overhead cost in terms of programmer time (at least it does in mine since I'm using a message passing system). Every get/set accessor function has to be a message which can be passed between entities and components. This can start to cost 70% of your time every time you create new component classes, and adding this extra code can become rather tedious after you've done it a lot.

The big win with the entity-component systems though is that NO game objects are defined in your code. I define every entity within an XML file. When the game loads, it parses the XML file for entities, reads in the templated components which compose the entity, and then instantiates the entity based off of a "blue print" (or whatever term you want to use). The dynamicism for game objects depends entirely on how flexible the components are and how capable they are of supporting whatever you want to build. Creating new objects in a game is thus, much like combining lego bricks together in new and interesting ways.


#4954555 Where to start learn x86 assembly

Posted by slayemin on 01 July 2012 - 09:50 AM

The Art of Assembly Language:
http://maven.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html

The Author (Randal Hyde) has been nice enough to make his book freely available online. It's probably the best way to learn x86 ASM.

I learned ASM by using the Easy68k emulator for the 6800 processor. It's a bit easier for beginners to pick up than the x86 processor.


#4954542 College advice?

Posted by slayemin on 01 July 2012 - 09:15 AM

Now why would I write this? Well for instance this website has plenty of people who took the save road(a CS degree) and they did NOT ended up doing games. In fact many of them are too tired after a 40-60 hours week to even touch game development(you guessed it they do not work in the game industry). And the little spare time they have left goes for their kids and wife / husbands.

The chance that some other industry drag you into their fold is very high and you will end up with a fine salary and perhaps even a life with quality. BUT... BUT if you only wish to develop games you might start finding that some of the stuff some CS programs offer you is rather dull or perhaps not but still a waste of time(However some classes are really useful, but I have still not used my Turing machine knowledge ). And even your life become rather borrowing after some time in this very safe job position after graduation.


I'm one of those people who went into computer science to become a game developer but ended up doing a completely different job (military computer scientist). "Game Dev" is like the gateway drug into other development jobs. But, game dev certainly isn't the most interesting dev job of all the available jobs (from an engineering perspective). There's just SO many fascinating jobs out there!!! You've got cryptography, virtual machines, distributed computing, artificial intelligence, database systems, low level assembly code for hardware platforms, operating systems, fractals, scientific simulations and modeling, network coding, robotics, mobile devices, etc. Development is like having a big pile of legos in front of you, waiting to be built into all sorts of interesting contraptions. The field of game dev is certainly interesting, but it's like spending all of your time building space ships out of legos (which is cool!) but there are lots of other very interesting things to build too!!! You might like legos and you might like space ships, but if you go to a school which shows you only how to build lego space ships, you're doing yourself a disservice by missing out on all of the other cool things you could build. A good CS program can introduce you to all of the other possibilities available and arm you with the basics to get started (95% of your post-CS education is learned on the job).




PARTNERS