Reset application

New releases and general discussions.

Post » Mon Oct 26, 2009 11:05 am

Is it possible to get a feature like this? Not just a 'go to layout' thing, but rather the game/application starts up fresh as if it were just being opened?
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Mon Oct 26, 2009 11:32 am

Why implement a feature that can be done by simply closing and then reopening the application?

You can opt to reset settings and variables to default and refresh everything, but that's about it. Is that what you are looking for?
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sat Nov 14, 2009 6:22 am

[quote="Mipey":hh5s58wo]Why implement a feature that can be done by simply closing and then reopening the application?[/quote:hh5s58wo]

That's not a good solution at all.

[quote="Mipey":hh5s58wo]You can opt to reset settings and variables to default and refresh everything, but that's about it. Is that what you are looking for?[/quote:hh5s58wo]

Yeah that be good, currently there's no way of resetting/refreshing anything (game, layout etc.) which is heart breaking.
When I go to different layouts that I've already been to etc. most things are broken, and manually resetting things doesn't always help as there is usually a load of random bugs flying around after that.


Either that or I just need to properly grasp how construct handles layouts and how to mentally handle that, I'm just use to changing to a layout and expecting everything to be reset and working as it should be.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Sat Nov 14, 2009 11:02 am

Typically one shouldn't leave things the way they are, if we don't intend them to stay that way. If you want to restart the layout as it was originally, then I'd suggest re-generating it using events (set sprites, objects and stuff to original settings, such as position, recreate if needed etc.). Yeah, would be nice to have a tickbox for layout whether to have it remember final state or forget everything and go fresh next time.

However, global objects and variables would still carry over. Don't leave everything to Construct runtime and control everything by yourself.

Nothing wrong with being a control freak :twisted:
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Mon Aug 09, 2010 8:44 am

Rebuilding the layout at runtime can be an annoyingly complex thing to do. Eg. If I have carefully placed all the multitudes of sprite objects used for specific detection, triggers etc. then having to handwrite all those x,y coordinates is too much of a task.

All we really need is a "reset private variables" action, and even "reset global variables" if we're being greedy.

Eg. I have a game that goes

Splash (sort of) -> Title -> Game -> (return to title)

It would save me a LOT of work and bug testing to simply reset variables in the layout on start.
B
2
G
2
Posts: 42
Reputation: 734

Post » Mon Aug 09, 2010 1:21 pm

A Reset action would be a nice addition. Writing code to work around the lack of a feature is fine to suggest, but then there are a lot of things you could script yourself (like writing 8direction movement out line by line), but would add a great deal of complexity that could be easily avoided by a relatively simple standardized action.

And if you need that kind of granular control over your system, then scripting it is still an option.
B
2
S
1
G
2
Posts: 35
Reputation: 870

Post » Tue Aug 10, 2010 3:53 pm

:idea: How about "save/load to disk"? On application startup create special save-file which will store the data in its original form, and then simply load it when you need reset app. :idea:
B
2
S
2
G
2
Posts: 158
Reputation: 1,366


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest