Hey Travler thanks for taking a look at it. There are currently NO Optimizations in place. Its quite litterally rendering everything every frame, so I'm impressed with 43 in windowed mode .
I've seen the same thing in full screen from time to time. Oddly enough it seems that SDL runs slower in full screen mode then in windowed mode (no idea as to why, maybe scaling).
The bullets in the walls is me forgetting to reset the position on collision . Ah well little things.
This is going to be a demo app for the engine when I'm done, not a true game. So some things will be left out. The real game will be CoF from the PGD Compo . Yep I plan on finishing it, just had to get the engine more stable in order to do it.
If you want to see the FPS in all screens you can open Game.lua and add font:TextOut(0, 0, 'FPS: '..FPS) at the end of the OnRender function. Case is important, so here is the actual change:
Code:
require('StateManager')
require('ClassSupport')
require('Graphics')
require('GameSprite')
require('Splash')
require('Fonts')
require('MenuHandler')
require('PlayGame')
-- We plan on running the game at 800x600 full 32bit graphics and by default in windowed mode
FullScreen = false
SetVideoMode( 800, 600, 32, FullScreen)
function TestKeys()
if IsKeyDown(KEY_ESCAPE) then
SetMainMenu()
end
end
-- Render the scene
function OnRender(FrameTime, FPS, Key)
SetCaption('JumpStart - Tank Brigade (FPS: '..FPS..')')
TestKeys()
if GameStates.CurrentState ~= nil then
GameStates.CurrentState(FrameTime, FPS, Key)
end
font:TextOut(0, 0, 'FPS: '..FPS)
end
Bookmarks