My first game
Moderator: Moderators
My first game
Hi this is my fisrt game, its alfa version What do you think ?
- Attachments
-
- youareacube0.8.rar
- AD SPACE -moving
X -restart if you die
F- shield, if you pick - (277.65 KiB) Downloaded 941 times
Hi Csabalia,
Nice job! Good to see a project with designed ( instead of procedurally generated ) levels for a change
One major issue though. Apparently you've coded the game expecting a constant framerate of 60, but are actually using SyncedWithMonitor as App.FrameRateStyle. Since my monitor refresh rate is ( usually ) set much higher than 60, this made it impossible for me to jump onto the first floating platform. So i had to change the refresh rate of my monitor to 60 in order to play your game.
There are two ways to fix this. Either change App.FrameRateStyle into Fixed and set App.FixedFrameRate to 60, or incorporate App.DeltaTime into your calculations. For instance, i suspect you're using something as follows for gravity ..
But if you want to write a framerate independent game you need to use the following instead ..
Let us know when you need any help
K
Nice job! Good to see a project with designed ( instead of procedurally generated ) levels for a change
One major issue though. Apparently you've coded the game expecting a constant framerate of 60, but are actually using SyncedWithMonitor as App.FrameRateStyle. Since my monitor refresh rate is ( usually ) set much higher than 60, this made it impossible for me to jump onto the first floating platform. So i had to change the refresh rate of my monitor to 60 in order to play your game.
There are two ways to fix this. Either change App.FrameRateStyle into Fixed and set App.FixedFrameRate to 60, or incorporate App.DeltaTime into your calculations. For instance, i suspect you're using something as follows for gravity ..
Code: Select all
CurrentModel.Velocity.Y -= 1;
Code: Select all
CurrentModel.Velocity.Y -= 60*App.DeltaTime;
K
Hi Csabalia,
K
Not sure why this still isn't build-in, but it isn't unfortunately .. so you have to detect when a key has been released yourself. Here's a simple example of how to do this for a single key ( S in this case ).Csabalia wrote:I need one more help, delphi has OnKeyUp event, i want to implement this function on my app, so when i realese one key, the app will do one think, how can i do it?
Code: Select all
<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application">
<OnUpdate>
<ZExpression>
<Expression>
<![CDATA[Key[1] = Key[0]; // Cache current value
Key[0] = 0; // Reset current value]]>
</Expression>
</ZExpression>
<KeyPress Keys="S">
<OnPressed>
<ZExpression Expression="Key[0] = 1;"/>
</OnPressed>
</KeyPress>
<ZExpression Expression="Key[2] = Key[1] && !Key[0]; // Determine if key has been released"/>
</OnUpdate>
<OnRender>
<Condition Expression="return Key[2];">
<OnTrue>
<RenderSprite/>
</OnTrue>
</Condition>
</OnRender>
<Content>
<Array Name="Key" Type="4" SizeDim1="3"/>
</Content>
</ZApplication>
No worries, your English is fineCsabalia wrote:And sory for my english
K