Help!

Can I run code from a point? Like if my program has 300 lines of code. And alot of them are like cout's, could I choose a point to run the program at line 245? I don't see how games with 10k+ code can be tested if you had to go through the whole program to see one little edit.


Thanks!
Oh, god. Let me guess. Your program is one 300-line function that mostly just outputs text. A text adventure, right? It has to be something like that.

Games more complex than Tetris have only a basic core written in the main language. The core does things like managing resources, displaying things on the screen, playing sounds, etc. It also provides a programmable interface in the form of a scripting language. For example, many graphical adventures by LucasArts in the 90s were based on the SCUMM.
This has the effect of separating the game logic from the program logic, so they can be debugged separately.
Now, how to test a specific feature depends heavily on the genre and what is being tested. An FPS might test gunfire by creating a special map and firing weapons there. In more narrative genres, it may be necessary to add a console that lets developers enter commands, one of which can be to jump directly to a specific chapter in the story. The idea is not to actually touch the code to test it.
Yeaa it is a adventure gamee... So there is no way for me to randomly select a line and run it? Aw /:
I reluctantly say "goto", but you're using the language in a way it wasn't meant to.
Topic archived. No new replies allowed.