When your game is in final stages of completion...

Started by NRJ, October 07, 2017, 07:47:04

Previous topic - Next topic

NRJ

I want to know what things we have to keep in mind when your game is in the last stages of completion, so that it will run without any problem on all pc without any issues and other things like memory management(BlitzMax), protecting game data, compatibility etc..
IF YOU CAN DREAM IT,  YOU CAN DO IT...

http://www.nksoftgames.blogspot.com


TomToad

Quote from: therevills on October 07, 2017, 08:54:00
Cross your fingers!  :P
Is that enough?  I'd think there would need to be a blood sacrifice somewhere. :D

Seriously though, no matter what you do, you will never run on all PCs.  No matter how careful you are, there will be someone with that odd graphics card, or odd network adapter that will throw a monkey wrench in the works.  Best you can do is get as many people testing your software as you can, and address any problems that come up.
------------------------------------------------
8 rabbits equals 1 rabbyte.

RonTek

You could test your installation on other machines, better if it's today's average if you have access or probably conduct a beta similar on what they do on app stores or crowdfunding.

NRJ

It looks like testing my game on different pc, by distributing it to my friends is the only way to check that it will run fine on all systems...
IF YOU CAN DREAM IT,  YOU CAN DO IT...

http://www.nksoftgames.blogspot.com

Steve Elliott

I think something that is very important when considering running your game on systems other than your own, is the system you've used to ensure your game plays at the same speed no matter the speed of CPU, GPU and monitor refresh rate.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

NRJ

Quotethe system you've used to ensure your game plays at the same speed no matter the speed of CPU, GPU and monitor refresh rate.

Point noted.  ;D
IF YOU CAN DREAM IT,  YOU CAN DO IT...

http://www.nksoftgames.blogspot.com

Matty

The things you have mentioned are all mid-stage development issues.

Testing compatibility and so on should be done after you've got your initial game concept developed but well before you are nearing shipping.

What I find are the final-stage development issues are ironing out the little kinks here and there and finishing polish touches.

At the final stages of development everything should work on every target machine you want it to run on, run well, have no bugs, and have been tested and found easy to use and accessible by as many users as you need.

Really in the final stages all you are really looking for is little bits of polish, maybe some slight tweaks to placement of some gui items, or adjusting the balance of some of the stats of your elements.

RemiD

#8
I would say :

->make sure that the speed of the turns/moves/animations is the same whatever the FPS (and therefore whatever the complexity of the scene and the hardware of the computer), (i have posted a code example on how to do that)

->make sure that the program will write/read files in a directory where it is allowed (an easy approach is to write/read files only in the directory (or child directories) of the game and to tell the user to put your game in c:/ (what gog.com does...) )

->make sure to not use graphics commands which have shown to cause problems...

->make sure to include libraries/fonts which may be installed on your computer, but not necessarily on others computers...

good luck !

NRJ

@Matty

Quotethe final-stage development issues are ironing out the little kinks here and there and finishing polish touches.


Giving your game the finishing polish touches really takes a lot of time.

the ninety-ninety rule by — Tom Cargill, Bell Labs
QuoteThe first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.

The 90-90 rule is very true, I have experienced the same when I had completed the first game.

IF YOU CAN DREAM IT,  YOU CAN DO IT...

http://www.nksoftgames.blogspot.com

NRJ

@RemiD

Thanks RemiD for your valuable advice. 


Quote->make sure that the speed of the turns/moves/animations is the same whatever the FPS 

That's the most important,the speed of the animations should have to be same on all the systems. 

I will keep in mind all the points that you have described.

IF YOU CAN DREAM IT,  YOU CAN DO IT...

http://www.nksoftgames.blogspot.com

RemiD

#11
see the attached bb file to see how i did that, which worked well on most computers, as long as the fps is above 10fps... (it can be playable with less than that, but there will be inaccuracies)

;Speed of the turns/moves/animations automatically adjusted to appear constant whatever the FPS
;
;This code shows a way to have an automatic adjustment of the speed of the turns/moves/animations
;so that the program appears to run at the same speed, whatever the FPS, whatever is drawn on screen, whatever the hardware of the computer/graphics card.
;The variable SpeedCoeff# must be applied to all turns/moves/animations. See the example.
;I have tested this code on several computers with different hardwares and os and it seems to work as expected.
;There may be inaccuracies if there is less than 10fps but overall it works well.

Global ProgramState%
Const CStart% = 1
Const CUpdate% = 2
Const CEnd% = 3

ProgramState = CStart

Graphics3D(800,600,32,2)     
   
HidePointer() 

SeedRnd(MilliSecs())

Global Origine = CreateCube()
ScaleMesh(Origine,0.1/2,0.1/2,0.1/2)
EntityColor(Origine,125,000,125)
EntityAlpha(Origine,0.5)
EntityFX(Origine,1)
PositionEntity(Origine,0,0,0,True)

Global Target = CreateCube()
ScaleMesh(Target,0.1/2,100.0,0.1/2)
EntityColor(Target,250,000,250)
EntityAlpha(Target,0.5)
EntityFX(Target,1)
PositionEntity(Target,0,0,128.0,True)

GroundMesh = CreatePlane()     
EntityColor(GroundMesh,125,125,125)
PositionEntity(GroundMesh,0,0,0)           
     
Global Camera = CreateCamera()   
CameraRange(Camera,0.1,1000)
CameraViewport(Camera,0,0,GraphicsWidth(),GraphicsHeight())     
CameraClsColor(Camera,000,000,000)

XCharacterMesh = CreateCube()
ScaleMesh(XCharacterMesh,0.5/2,1.75/2,0.25/2)
PositionMesh(XCharacterMesh,0,1.75/2,0)
HideEntity(XCharacterMesh)

Global PlayerFeet = CreatePivot()
Global PlayerEyes = CreatePivot()
MoveEntity(PlayerEyes,0,1.65,0)
EntityParent(PlayerEyes,PlayerFeet,True)
Global PlayerMesh = CopyEntity(XCharacterMesh)
EntityColor(PlayerMesh,000,000,250)
EntityParent(PlayerMesh,PlayerFeet,True)

Global BotsCount% = 0
Dim BotFeet(10000)
Dim BotMesh(10000)

For n% = 1 To 2000 ;change this value to 1 or 10 or 100 or 1000 or more
BotsCount = BotsCount + 1
I% = BotsCount
BotFeet(I) = CreatePivot()
BotMesh(I) = CopyEntity(XCharacterMesh)
EntityColor(BotMesh(I),Rand(025,250),Rand(025,250),Rand(025,250))
EntityParent(BotMesh(I),BotFeet(I),True)
PositionEntity(BotFeet(I),Rnd(-30,30),0,Rnd(10,90),True)
RotateEntity(BotFeet(I),0,Rnd(-180,180),0,True)
Next

DLight = CreateLight(1)
LightColor(DLight,255,255,255) 
PositionEntity(DLight,0,1000,-1000,True)
RotateEntity(DLight,45,0,0,True)

AmbientLight(064,064,064)

TurnEntity(PlayerEyes,22.5,0,0)

;to count the millitime it takes for player to from the start point to the target point
Global TravelMilliStart% = MilliSecs()
Global TravelMilliTime%

;to count the millitime a mainloop takes
Global MainLoopMilliStart%
Global MainLoopMilliTime%

;to lock the FPS at 30fps maximum
Global MainLoopTimer = CreateTimer(30)

;to count the number of frames per second
Global FPS%

;the value to apply to all turns/moves/animations so that the speed of the turns/moves/animations appear constant whatever the FPS, whetever is drawn on the screen
Global SpeedCoeff# = 1.0   
   
ProgramState = CUpdate

Main()

EndGraphics()

End()

Function Main()

Repeat   

  MainLoopMilliStart = MilliSecs()     
         
  UpdateBots()

  UpdatePlayer()

  If( EntityZ(PlayerFeet,True) >= EntityZ(Target,True) )
   ClsColor(000,000,000) : Cls()
   Locate(0,0)
   Print("Total time passed during the travel = "+Int(Float(TravelMilliTime)/1000)+"seconds")
   FlushKeys()
   WaitKey()
   ProgramState = CEnd
EndIf

TravelMilliTime = MilliSecs() - TravelMilliStart

;position/rotate the camera before the rendering of the scene
PositionEntity(Camera,EntityX(PlayerEyes,True),EntityY(PlayerEyes,True),EntityZ(PlayerEyes,True))
RotateEntity(Camera,EntityPitch(PlayerEyes,True),EntityYaw(PlayerEyes,True),EntityRoll(PlayerEyes,True))
MoveEntity(Camera,0,0,-1.5)

CameraViewport(Camera,0,0,GraphicsWidth(),GraphicsHeight())     
CameraClsColor(Camera,000,000,000)
SetBuffer(BackBuffer())

RenderWorld()     

For n% = 1 To 100 Step 1 ;change this value to 1 or 10 or 100 or more
  PWidth% = Rand(25,100) : PHeight% = Rand(16*1,16*10)
  PX% = Rand(0+1,GraphicsWidth()-PWidth-1) : PY% = Rand(0+1,GraphicsHeight()-PHeight-1)
  Color(Rand(025,255),Rand(025,255),Rand(025,255)) : Rect(PX,PY,PWidth,PHeight,True)
Next
   
Color(255,255,255)      
Text(0,0,"Triangles = "+TrisRendered())   
Text(0,16,"MainLoopMilliTime = "+MainLoopMilliTime)   
Text(0,32,"FPS = "+FPS)   
Text(0,48,"SpeedCoeff = "+SpeedCoeff)
Text(0,64,"Current time of the travel = "+Int(Float(TravelMilliTime)/1000)+"seconds")   
Text(0,80,"See how the speed of the turns/moves/animations are automatically adjusted so that ")
Text(0,96,"it appears to run at the same speed, whatever the FPS, whatever is drawn on screen.")

;Flip(true)
WaitTimer(MainLoopTimer)
VWait():Flip(False)

MainLoopMilliTime = MilliSecs() - MainLoopMilliStart
If(MainLoopMilliTime < 1)
  MainLoopMilliTime = 1
EndIf  
   
SpeedCoeff = Float(30) / 1000 * MainLoopMilliTime

FPS% = 1000.0/MainLoopMilliTime

Until( KeyDown(1)=1 Or ProgramState = CEnd )

End Function

Function UpdatePlayer()

MoveEntity(PlayerFeet,0,0,0.2*SpeedCoeff)

End Function

Function UpdateBots()

For BId% = 1 To BotsCount

  TurnEntity(BotFeet(BId),0,2.0*SpeedCoeff,0)
  MoveEntity(BotFeet(BId),0,0,0.2*SpeedCoeff)

Next

End Function


edit : updated code example (26/01/2018)

Xerra

Quote
The 90-90 rule is very true, I have experienced the same when I had completed the first game.

I'd concur. A very true statement. I've got a remake of Boulderdash that's been around 95% complete here for the last three months. And I'm still beavering away.

The first 90% took me around 3 weeks.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Scaremonger

I write non-games software mostly, depending on what my clients require, but the approach will be similar.

On Linux:
I run up a clean VM under Mint and Ubuntu and make sure I understand any dependencies that the application needs. I have got caught out by this a few times because my dev laptop has lots of additional libraries installed.

On Windows
I try the application on Windows 7, Windows 8 (only if I really have to) and Windows 10. If possible I try it on the clients "build" too.
I add an application Icon and author a resource file which I include into the code. This populates the Windows "Company Name", "Product Name" and "Version" fields (etc.) in Windows Explorer.

On both platforms
I check that the application is not hogging the CPU (Using 'top' under Linux and resource monitor in Windows) and make sure that it connects to my website for check-in (Where I have enabled this).

If your installation procedure, or setup program needs administrative permissions make sure you document them and check that this is compatible with your target audience. Be careful where you write temporary files, configuration and save state (SaveGame) data as these may well be in a locations that require administrative permissions. This also includes the Windows Registry if you use it.

Test your application when the operating system or laptop goes into Sleep and Hibernation. I've had a situation where the application hangs or bizarre things happen when the system returns and it is usually related to Timer events (all the events you missed while sleeping are delivered when you wake). If you are using MilliSecs() or counters that can exceed MAXINT (DeltaTime for example), see what happens if you run it on a PC thats been running for a month. This is particularly important if you are developing a Daemon or Windows Service.

Lastly: If it has online adverts or contacts your website; test it with Wifi turned off.

RemiD

Quote
Be careful where you write temporary files, configuration and save state (SaveGame) data as these may well be in a locations that require administrative permissions.
@Scaremonger>>can you please give us more details (or links) about that ?
I suppose that you are talking about writing/reading temporary/config files in the USER directories ?