  We present the methods and preparatory work for our study of the collisional
runaway scenario to form a very massive star (VMS, M > 400 Msun) at the centre
of a young, compact stellar cluster. In the first phase of the process, a very
dense central core of massive stars (M =~ 30-120 Msun) forms through mass
segregation and gravothermal collapse. This leads to a collisional stage,
likely to result in the formation of a VMS (itself a possible progenitor for an
intermediate-mass black hole) through a runaway sequence of mergers between the
massive stars. In this paper we present the runaway scenario in a general
astrophysical context. We then explain the numerical method used to investigate
it. Our approach is based on a Monte Carlo code to simulate the stellar
dynamics of spherical star clusters using a very large number of particles (a
few 1e5 to several 1e6). Finally, we report on test computations carried out to
ensure that our implementation of the important physics is sound. In a second
paper, we present results from more than 100 cluster simulations realized to
determine the conditions leading to the collisional formation of a VMS and the
characteristics of the runaway sequences.
