linking games

Started by
20 comments, last by Drakkcon 18 years, 8 months ago
I've made a few games and I'm wantin to make a program where it has a menu and you can choose which game you want to play. I've tried to put them all in the same program but i had sum problems so is there a way to link different projects together and run them without puttin them in the same program?
Advertisement
You could put them in differnt folders and then in the parent folder put your "menu program" and use ShellExecute to run each one.
i didnt understand shellexecute
Well it's only for Windows.

ShellExecute(hWnd, "open", "game1/game1.exe", NULL, NULL, SW_SHOWNORMAL);

if you're using a console then try spawn() or exec() which I believe are in process.h
where at in my program do i put this. its pretty basic just so you know.
any1
when the user selects which game they want??
alternativly, WinExec("myprogram.exe", SW_NORMAL) and system("myprogram.exe") can be used.
As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.
do i put it under case 1, case 2(those are the only input things i know how to do)
yeah, if the user selects case 1 and the game for that option is "Pong: Revisited", then you use ShellExecute to run "pong_revisited.exe", etc and so forth.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
maybe he needs a coded example?

Beginner in Game Development?  Read here. And read here.

 

This topic is closed to new replies.

Advertisement