Smooth Movement?
Moderator: PC Supremacists
-
- Chaos Rift Regular
- Posts: 198
- Joined: Thu Mar 26, 2009 8:42 pm
- Current Project: My Engine
- Programming Language of Choice: C++
Re: Smooth Movement?
@lalacomun I would absolutely LOVE to be using OpenGL BUT I couldn't figure that out when I tried it before.
And that was back when I had time to mess around with it.
And by the way bumping up the frame rate help ALOT so thank you SO much.
Now I can finally resume development.
Again thank you.
And that was back when I had time to mess around with it.
And by the way bumping up the frame rate help ALOT so thank you SO much.
Now I can finally resume development.
Again thank you.
My first game: http://donsvoice.com/randomdever/Duck%2 ... 01.0.0.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
- lalacomun
- VS Setup Wizard
- Posts: 114
- Joined: Wed Dec 28, 2011 10:18 pm
- Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
- Programming Language of Choice: C++
- Location: Argentina
- Contact:
Re: Smooth Movement?
Really glad i could help You anything else You need just ask,ill be glad to answer
- Light-Dark
- Dreamcast Developer
- Posts: 307
- Joined: Sun Mar 13, 2011 7:57 pm
- Current Project: 2D RPG & NES Platformer
- Favorite Gaming Platforms: NES,SNES,N64,Genesis,Dreamcast,PC,Xbox360
- Programming Language of Choice: C/++
- Location: Canada
Re: Smooth Movement?
Trufax, that is what i do for debugging mem leaks and crashes.k1net1k wrote:You need to narrow down your engine to the point where you can eliminate things causing it.
Start by removing textures, remove all characters, remove lighting, remove AI, slow down the game loop, use more debugging, etc. Keep going until you find the thing causing it, then drill down into that
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step
Re: Smooth Movement?
That is one option, and may work for small programs, and may even be the best option for beginners.Light-Dark wrote:Trufax, that is what i do for debugging mem leaks and crashes.k1net1k wrote:You need to narrow down your engine to the point where you can eliminate things causing it.
Start by removing textures, remove all characters, remove lighting, remove AI, slow down the game loop, use more debugging, etc. Keep going until you find the thing causing it, then drill down into that
However, there are a few problems with this approach.
1. This does not scale.
2. This does not tell you what the root cause is.
I suggest you use the IDE's debugger, and step through the program, look at why is crashing. This will teach you better habits, it will also make you a better programer. (it will also prepare you for a job as a programmer, if you choose to end up there, since debugging ends up being the vast majority of the work in a products lifecycle)
PS: I would even suggest to use windbg/gdb or whatever, and learn to use that. It has by far the biggest learning curve, but will teach you the most.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Dad, "Yea well I have a fan belt in street fighting"
-
- Chaos Rift Regular
- Posts: 198
- Joined: Thu Mar 26, 2009 8:42 pm
- Current Project: My Engine
- Programming Language of Choice: C++
Re: Smooth Movement?
Well besides running my game at 100 fps, is there an easy way to implement OpenGL into my 'engine' so I don't have to do that for future projects?
My first game: http://donsvoice.com/randomdever/Duck%2 ... 01.0.0.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
- lalacomun
- VS Setup Wizard
- Posts: 114
- Joined: Wed Dec 28, 2011 10:18 pm
- Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
- Programming Language of Choice: C++
- Location: Argentina
- Contact:
Re: Smooth Movement?
i think you could load an OpenGL Texture from your SDL Surfaces, here:RandomDever wrote:Well besides running my game at 100 fps, is there an easy way to implement OpenGL into my 'engine' so I don't have to do that for future projects?
http://content.gpwiki.org/index.php/SDL ... ith_OpenGL
But remember you will not be able to draw an openGL Texture with SDL_BlitSurface function
hope it helped
-
- Chaos Rift Regular
- Posts: 198
- Joined: Thu Mar 26, 2009 8:42 pm
- Current Project: My Engine
- Programming Language of Choice: C++
Re: Smooth Movement?
Well that's a start but is there like an all-inclusive beginner's guide for people retooling from SDL to OpenGL because I have attempted this before and OpenGL does not like text rendering.
My first game: http://donsvoice.com/randomdever/Duck%2 ... 01.0.0.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: Smooth Movement?
I think you can use SDL_ttf to generate a texture then render it with OpenGL, but usually you just use a bitmap font. I remember text in OpenGL being a pain as well.RandomDever wrote:Well that's a start but is there like an all-inclusive beginner's guide for people retooling from SDL to OpenGL because I have attempted this before and OpenGL does not like text rendering.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- lalacomun
- VS Setup Wizard
- Posts: 114
- Joined: Wed Dec 28, 2011 10:18 pm
- Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
- Programming Language of Choice: C++
- Location: Argentina
- Contact:
Re: Smooth Movement?
here you go:
http://www.sdltutorials.com/sdl-opengl-tutorial-basics
i havent read it all but it seems complete
http://www.sdltutorials.com/sdl-opengl-tutorial-basics
i havent read it all but it seems complete
- lalacomun
- VS Setup Wizard
- Posts: 114
- Joined: Wed Dec 28, 2011 10:18 pm
- Favorite Gaming Platforms: psx, nintendo ds, gameboy advance, xbox 360, ps2
- Programming Language of Choice: C++
- Location: Argentina
- Contact:
Re: Smooth Movement?
well as regarding to text rendering it may be a pain in the ass but here some tuts on text
rendering with OpenGL:
http://www.opentk.com/doc/graphics/how- ... ing-opengl
http://en.wikibooks.org/wiki/OpenGL_Pro ... ndering_01
hope it helped
rendering with OpenGL:
http://www.opentk.com/doc/graphics/how- ... ing-opengl
http://en.wikibooks.org/wiki/OpenGL_Pro ... ndering_01
hope it helped
-
- Chaos Rift Regular
- Posts: 198
- Joined: Thu Mar 26, 2009 8:42 pm
- Current Project: My Engine
- Programming Language of Choice: C++
Re: Smooth Movement?
Indeed it did. Thank you.
BTW do you have any good articles on level design theory?
Edit: Specifically 2d platform level design theory.
BTW do you have any good articles on level design theory?
Edit: Specifically 2d platform level design theory.
My first game: http://donsvoice.com/randomdever/Duck%2 ... 01.0.0.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip
My second game: http://donsvoice.com/randomdever/Space%20Invaders.zip
My third game: http://donsvoice.com/randomdever/BreakOut!.zip