XNA Game Development Forums
2012/05/21 21:02:53
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Calendar
Login
Register
XNA Game Development Forums
>
Hazy Discussion
>
Hazy Mind XNA Engine
>
Application of the engine
Pages: [
1
]
« previous
next »
Print
Author
Topic: Application of the engine (Read 1085 times)
marshdabeachy
Newbie
Offline
Posts: 1
Application of the engine
«
on:
2010/01/04 08:32:57 »
Hey all,
I stumbled across this engine while I was looking to improve my own. My engines always turn into spaghetti code, because I always get lazy and try to do stuff the fastest way possible, which of course is never the right way. Long story short, the development of my game is on hold while I basically revamp my engine to function similar to the Hazy Mind engine.
Anyway, I went through all the tutorials and got everything set up. I even expanded on it a bit by adding my own State Manager, so I can do things like a Menu state and a Game state. But right now I'm struggling with the application of making an actual game out of the engine. In the tutorials, there's a sample driver where everything gets loaded and set up before the game is actually run. This works out all well and good, since Initialize and LoadContent are all called properly on everything.
But in an actual game, it's not realistic to just list out every single object you're going to load in Main. When you begin creating objects AFTER the game has started, Initialize and LoadContent are no longer called on those objects. Am I missing something here? Should I be putting this stuff in the constructor now? Or am I going to have to find a way to explicitly start calling Initialize and LoadContent on these newly created objects?
Thanks!
Marshall
Logged
mikeschuld
Administrator
Sr. Member
Offline
Posts: 389
Re: Application of the engine
«
Reply #1 on:
2010/01/04 11:37:29 »
What you are talking about sounds like something best handled by your state manager. Each game state could have it's own object manager with lists of assets (instead of the main game class having it) and could call the needed methods when the states are loaded, unloaded, etc.
This is probably something that will be added to the tutorial engine eventually, but there has been a lot of back and forth between a few long tutorials that have been taking up most of the time lately so I don't really have a guess at when this type of functionality would be added to the main engine.
Let me know if you need any more detail on how I would do this within the state manager. It should be a pretty quick change though.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Hazy Discussion
-----------------------------
=> General Discussion
=> Hazy Mind XNA Engine
===> Tutorial Discussion
=> Show Off Board
-----------------------------
Hazy Requests
-----------------------------
=> Hazy Mind XNA Engine Requests
=> Forum Requests
-----------------------------
Hazy Mind 3D Engine (Old Discussion)
-----------------------------
=> Hazy Mind 3D Engine
=> Hazy Mind Scene Editor
=> Hazy Mind 3D Engine Requests
=> Hazy Mind Scene Editor Requests
Related Topics
Subject
Started by
Replies
Views
Last post
Hazy Mind 3D Engine
Hazy Mind 3D Engine
mikeschuld
0
2174
2006/07/22 15:02:05
by
mikeschuld
rewriting the engine
Hazy Mind 3D Engine
endre
5
3323
2006/08/08 01:59:44
by
Chr0n1x
how could i create a game engine?
General Discussion
saAction
7
3810
2006/08/25 01:45:22
by
Kolo
If people want, can visit ;) nearly great and developing engine...
Show Off Board
satsatsat
0
2543
2006/10/27 04:18:12
by
satsatsat
3d Engine-- Tutorial 2 problem.
Hazy Mind 3D Engine
ZebraHDH
4
2203
2006/12/03 14:20:43
by
tuxdalinux
Engine Source Code
Hazy Mind 3D Engine
Nemo Krad
5
3012
2006/12/20 01:55:15
by
Nemo Krad
Some thoughts on the engine...
Hazy Mind XNA Engine
letsrock
2
1701
2007/01/27 12:36:45
by
mikeschuld
New Engine Architecture method
Hazy Mind XNA Engine
mikeschuld
3
1805
2007/03/11 21:09:17
by
Chr0n1x
Crytek Engine 2 level editor
General Discussion
Cdy7e
7
2651
2007/03/15 18:55:36
by
Chr0n1x
XNA ENgine sources/pdf
General Discussion
Maverick
3
2657
2008/04/17 01:59:11
by
Maverick
Engine's performances
General Discussion
new.proger
2
2234
2008/12/24 00:58:36
by
Nemo Krad
Have a few questions about the Component Exception in the Engine
Hazy Mind XNA Engine
ckslayer22
2
1557
2009/08/06 20:13:19
by
InstrallFer
Loading...