In a medium saucepan, combine sugar, vinegar, ketchup, and soy sauce.
Stir the mixture over medium heat until the sugar dissolves.
In a small bowl, mix cornstarch and water to create a slurry.
Once the sauce is simmering, add the cornstarch slurry.
Stir continuously until the sauce thickens (about 2-3 minutes).
Add garlic powder and onion powder, stirring to combine.
If desired, mix in pineapple juice for extra sweetness.
For a nutty flavor, add sesame oil.
Remove from heat and let cool slightly.
Store in an airtight container in the refrigerator.