   Workflow for coding a game....
  Hello gamedev community. I am making a 3D Adventure RPG called "Whats Bugging You!?" and I have a few questions as to weather or not my approach to some of the things I am doing are good ideas or not.First of all, here is a pic of the game and a video link to gameplay on youtube...http://i445.photobucket.com/albums/qq177/serversushi/WhatsBugginYou2.jpg?t=1270783510Ok now...what I am trying to do is finish implementing all of the features for the first level. Like ladder climbing, opening treasure chests etc. And then resuse that same code for all of the following levels to come. Sort of like a copy and paste type method. I have never really completed a full game but have made numerous small demos before. I have a simple class functionality for my enemies in game for them to attack, chase player and what not. But what my concern is.... when making numerous levels, do most people just make one game level with all the functionality they need and then just copy most of their code over to all of the levels to follow? Or what is a method that most people use?   
  You should never have to c&p code around like that...If you put the logic for climbing a ladder into it's own function/class/module/whatever, then you can reuse that code in multiple places without duplicating it.Also it sounds like your levels are created by code, not by data, is that right?   ;  Well you see I have a lot of states in my game, sort of like......if this happens then state = this etc. And when state = "blah" then call the function every frame, and the function may be a variable to animate something or have an enemy to chase plyr etc.  So basically all the copy and paste I will be doing is when I initialize between leves in the main game loop im assuming?  I am still learning a lot about how to properly program. And I guess my game is being created by data because I am using a game engine?   ;  Perhaps an example is best.  By data means your level data is encoded as easy to read data files.  In your dungeon crawler example here is an example of a level file:For the level file below this is what the symbols mean:# = wallX = chestD = doorM = monsterS = Player spawn pointP = Entrance to next levellevel1.txt:########################S # X ##  # P  MMM ##  #   ##  ######   ##  D M X#   ##  #################D###  D   MMM D########################So you would just create levels in a text editor.  Make walls, monsters whatever where you want to.  Your "engine" then does something like:#define MAX_LEVEL = 5;char *levels[MAX_LEVEL] ={    "level1.txt",    "level2.txt",    "level3.txt",    "level4.txt",    "level5.txt"};int currentLevel = 0;while (currentLevel < MAX_LEVEL){    loadAndPlayLevel(levels[currentLevel]);    //blah blah blah    if ( player get to Entrance to next level )    {    currentLevel += 1;    }}where loadAndPlayLevel is all the logic you currently have to play a level as well as the code necessary to open the level file, parse it's content and generate the level in memory.In a "real" professional game you don't layout levels in a text file like that but in a game editor where you can move around and place 3D objects.  Those levels are exported to some binary format, but the gist is the same: there is data which is not code, that is loaded by your code to create objects and classes in memory upon which your code logic operates-me   ;  thank you both kindly, this does answer my questions...   