The game engine gets damn creaky about level 13, by 17 it's falling apart and level 21 blows it all to hell, what're your DMs houserules for making Epic playable? If we know them we can advise on what to build towards but at level 40 full caster you are more powerful than anything short of an overdeity.