Floating structures have raised interest in the recent years for different applications, from living and farming at sea to renewable energy production. To support the logistics on the floating structures, floating cranes are necessary and their designs are constantly improved. Increasing developments in the automation industry paved the way for automated crane operations. In this work, motion control of a smart crane is presented with particular attention to the performance under wave motion. In this research, a scaled down, two-dimensional mathematical model of a gantry crane is derived using Lagrangian mechanics and DC motors dynamics. This results in a nonlinear system that is capable of simultaneous traversing and hoisting a container. The system is simulated in MATLAB Simulink environment and a proportional-derivative control and a state feedback control are designed and implemented. Their robustness is explored by modelling sensor behavior, external disturbances and floating platform dynamics. Both control strategies were able to keep stability in a disturbed system. During simulation, the sway angles never exceed 10°. Smaller oscillations occurred using the state feedback control. Therefore, it creates a smoother response compared to the proportional derivative control, which ultimately translates to increased safety, turnover rate and durability of the crane.