• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ChristianFrantz

how to think like a programmer

12 posts in this topic

I'm going to be making my own game soon without using tutorials and just using what I know. What I'm having trouble coming up with is the logic of the game. Things like upgrading weapons and towers, how to make ai detect when theres something in their way, things like that. Are there any books or tutorials that help with this kind of thinking while making a game?

0

Share this post


Link to post
Share on other sites

Can you be more specific about where you're stuck then?

 

This sounds like analysis paralysis.

 

For AI there are a ton of resources available. It's more or less a decision table that randomly triggers predefined behaviors. More advanced AI just uses increasingly complex selection (by assigning weights to the choices) and simpler actions or a compound system that selects a strategy and then selects an action within that strategy.

Edited by Khatharr
0

Share this post


Link to post
Share on other sites

Well its really more the things like adding something to an inventory, knowing how to measure where a mouse clicks in 3d space, and things that dont really have a specific answer. Like if you had an inventory, do you use a class? do you use an array list? how do you tell what items are going in an out of your inventory? with a method? a for loop that loops through the inventory? There seem to be multiple solutions to most problems in 3d gaming but I want to learn how to actually apply what ive learned towards a game

0

Share this post


Link to post
Share on other sites

Well its really more the things like adding something to an inventory, knowing how to measure where a mouse clicks in 3d space, and things that dont really have a specific answer. Like if you had an inventory, do you use a class? do you use an array list? how do you tell what items are going in an out of your inventory? with a method? a for loop that loops through the inventory? There seem to be multiple solutions to most problems in 3d gaming but I want to learn how to actually apply what ive learned towards a game

 

In most cases like what you're talking about there's no right and wrong way, there's only different ways.  Some are better, some worse, but that analysis depends on the specific needs.  We cant help you with that, at least not with the information you've given us.  The best thing to do is write your game.  You'll learn with experience what works and generally how things fit together, so the next time you do it you will already start off with ideas on how to do these things. But the key is to start small.  That way you can finish the game, and finishing is what will give you the experience to do better next time.  Quitting or failing usually will only make you more discouraged.

 

As a more specific answer, and related to "thinking like a programmer", your best option is to do what programmers do for any problem... divide and conquer, simplify, and do general things before you get to the specifics.

 

For example, you want to make a game with lots of characters, lots of weapons, lots of maps, a bunch of different skills and items that can be picked up, etc.  Where to begin?  First you make a single map with no characters.  Then you put one character in it.  Then you give him one weapon.  Then you add one pickup item.  Then you give him one skill.  Then you add multiple skills, then multiple pickups, then multiple weapons, then multiple characters... get the picture?  Start with something simple, the add to it.  As you add code and features you will naturally need to change it, but that's just how it goes... especially when you're never done it before.  Once you'd gone through that several times you'll be able to start writing a new game already taking into account all those things, but for now you dont have the experience.  So, think like a programmer, do what I said above and you'll be fine.

Edited by 0r0d
1

Share this post


Link to post
Share on other sites

There seem to be multiple solutions to most problems in 3d gaming

 

and there you have it.

 

for almost anything you want to do in games, there are usually at least half a dozen ways, none of which is optimal for everything.

 

but there are definitely better and worse ways to go about things. much of which is usually game specific.

 

what you'll need to do, is select a game type, then learn how to do the bits and pieces specific to that game type.

 

general algos, approaches, and types of data structures will be recurring themes, but each implementation will be unique.

 

follow a methodology of incremental development. 

 

learn non-game programming skills as needed.

 

if you can't implement a static array flat file database in your sleep, learn to do so before you write an inventory database module.

 

muddling through is no way to run a railroad.

 

i wrote one of every type of app before i started on games. and you really need to know a lot about a lot to do games well.

 

be prepared for the fact that you'll constantly be learning new techniques.  i've been building PC games for 32 years, and still spend as much as 10% of my time in pure research on coding techniques.  if you don't like to learn, you shouldn't be building games.   constant sharpening of the saw is an integral part of the process.

Edited by Norman Barrows
1

Share this post


Link to post
Share on other sites

Well its really more the things like adding something to an inventory, knowing how to measure where a mouse clicks in 3d space, and things that dont really have a specific answer. Like if you had an inventory, do you use a class? do you use an array list? how do you tell what items are going in an out of your inventory? with a method? a for loop that loops through the inventory? There seem to be multiple solutions to most problems in 3d gaming but I want to learn how to actually apply what ive learned towards a game

 

 

adding something to an inventory is a simple database function.  you'll definitely want to learn how to implement relational databases in whatever data structure you prefer. they are the back end that drives games.

 

3d pick:  us the pickray example code in directx, combined with the ray / geometry intersection test of your choice (from some source). a strong background in 3d math will    help here.       this pattern occurs a lot in games. you need something that does A and B. there's info for doing A, and info for doing B, but you have to hook A up to B yourself.

 

an inventory is a list, IE a flat file database. a static array of structs is the fastest running, easiest to implement, and most memory leak proof way to do it. but some prefer objects.

 

you should already know whats going into and out of inventory, cause you're the one doing it (with code).

 

collision checks will depend on the type of data structures you choose to hold your "world map" info, with collision maps being the absolute fastest.

0

Share this post


Link to post
Share on other sites

It's just a matter of breaking things down into a series of small tasks then trying to apply what you know to each task.

 

For what it's worth, this is also exactly the same procedure I've used and seen used for any complex system that needs to be built.

 

Building a machine?  You do exactly this.  Your vacuum pump module doesn't know or care what the wheels the system rolls around on are doing, and vice versa.  When I make one, I don't care about the other.

 

Building a production line?  Hopefully the system designers were smart enough to design the system in distinct modules.  Then you simply create stations for building each separate module, or combine them when appropriate.  Sometimes you make sub-assembly stations that get combined into one assembly.  Still, the basic principle of breaking the problem down into digestible sub-components is always there.

 

Heck, even from taking classes, the instructors generally break down the subject matter into sub groups to make it easier to organize the teaching.  Night clubs that operate effectively break the bar into sub stations, and fine tune each employee to optimize their tasks to maximize the flow of alcohol.

 

It works pretty much everywhere, not just in programming.

0

Share this post


Link to post
Share on other sites

I'm going to be making my own game soon without using tutorials and just using what I know. What I'm having trouble coming up with is the logic of the game. Things like upgrading weapons and towers, how to make ai detect when theres something in their way, things like that. Are there any books or tutorials that help with this kind of thinking while making a game?

Hm well there are surely many ways how to plan out a game before starting, but my favorite one is surely the UML. You can use the UML to have a graphical view, of the class and actions in them. Point out of which classes you will need for your game. We use for example the Tower Defence, a  very loved game by many. Now what does a Tower Defence need? We surely need a Tower class since there are towers, surely enemies aka the waves that appear, and maybe a upgrade class for some upgrades the towers need. These are just the logical ones for the game you need, now for the needed ones. You need Initialize that handles all the loading of data, a event which handles all input events, loop which handles all the data updates, render which handles all the rendering of anything that  shows up on the screen and cleanup that simply cleans up any resources loaded. These needed ones, i got from the sdltutorials on how to make a tictactoe, if you wish to check out here you go: http://www.sdltutorials.com/sdl-tutorial-basics . Now next after you got all does things we use a Sequenzdiagramm. In there you will produce a graphical display on how the programm handles, like how does the application start? Which class will come first and so on. These are pretty much roughly said the main ones who are needed to think like a programmer while aiming for a game.

 

I do hope i could help you with my ideas and wish you a great day

 

Yours Truly

 

Your friendly programmer :)

2

Share this post


Link to post
Share on other sites

I'm going to be making my own game soon without using tutorials and just using what I know. What I'm having trouble coming up with is the logic of the game. Things like upgrading weapons and towers, how to make ai detect when theres something in their way, things like that. Are there any books or tutorials that help with this kind of thinking while making a game?

You can google search on the "ideas" and problems and solutions people ran into when they implemented a feature. The tutorials are out there- Youtube videos, websites, forums. There is a bunch. If you never made a game before but have background in programming experience, you can search for the ChernoProject on youtube. It is 2d game programming tutorials. No book or one tutorial by someone gets the job done. You most certainly need to search everywhere and put the pieces you need and found together.

 

How to think like a programmer. Grab a pencil and paper and start designing. A good design on paper is laid out nicely for the human mind to keep track of the pieces of a larger program and features. Design changes but write a small design, figure out what you know and apply. If you do not know just google search. Google is your friend.

 

If it is a bug in a feature. Read the last paragraph and trace through where the bug lies in the code. Question what, where, when, why and how is it happening. The 4 W's and 1 H does wonders.

 

Learn to not give up. You only improve if you persevere. Learn to finish a project and say "I am proud I completed what I wanted in the game."

Edited by warnexus
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0