1
Updates / Re: Menu Standardization
« on: April 21, 2015, 09:07:19 am »Border on the links in the goron theme isn't quite right o:
protected override void Update(GameTime gameTime)
{
gamedata.input.Update();
gamedata.writer.Update(gamedata);
gamedata.cam.Update(gamedata.input.p_up, gamedata.input.p_left);
gamedata.screens[gamedata.current_screen].Update(gamedata);
base.Update(gameTime);
}
protected override void Draw(GameTime gameTime)
{
GraphicsDevice.Viewport = new Viewport(
0,
(graphics.PreferredBackBufferHeight / 2) - ((graphics.PreferredBackBufferWidth / (int)gamedata.resolution.X) * (int)gamedata.resolution.Y) / 2,
graphics.PreferredBackBufferWidth,
(graphics.PreferredBackBufferWidth / (int)gamedata.resolution.X) * (int)gamedata.resolution.Y
);
GraphicsDevice.Clear(Color.Black);
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null, null, gamedata.cam.GetTransform() * Matrix.CreateScale(new Vector3((float)graphics.PreferredBackBufferWidth / gamedata.game_width, (float)graphics.PreferredBackBufferWidth / gamedata.game_width, 1.0f)));
gamedata.screens[gamedata.current_screen].Draw(spriteBatch, textures, gamedata);
gamedata.writer.Draw(spriteBatch, textures[7], new Vector2(0,0), gamedata);
base.Draw(gameTime);
}
The problem with it was, I don't even know how to do that. What could I have been doing wrong? I couldn't find any tutorials on it at the time either. Basically the way I saw it was, it's not working as I'm programming it and C# apparently doesn't require memory management, so I'd rather use that and it work.Someone told me that it might be lack of memory management and variables getting rewritten, or something. Idk. That frustrated me and made me quit.I'm sorry, because I'm about to sound like a bit of a !@#$%. If learning how to manage memory is "frustrating" enough to make you quit, then maybe you should find something else to do because programming clearly isn't going to be a great choice.
you're a bit of a fireball aren't youI, personally, would take advantage of the simplicity that SFML offers. I would drop the GameCore class and the Program.cs file tight butthole, and just use a simple int main() function to store all that stuff in. Not sure if this is good practice or not, but if you're cut loose from the ties of XNA, it'd be worth trying.No, it is not a good practice. In fact, it's a very, very bad one. Properly structuring your code is one of the most important things you can do if you want to actually be able to complete a project any more complex than "Hello, World!".
If you actually want to learn to program, whether it's games, software, websites, whatever then you really should learn to do it properly. Otherwise, just use RPG Maker or some other tool that does everything for you.
ZFGC is Dead Long Live ZFGC
not dead.... But UNdead *wink*