Search found 154 matches

by ITomi
Mar 09, 2023 14:10
Forum: Game Dev
Topic: Speed
Replies: 34
Views: 11744

Re: Speed

waiting=timer+.025 do while timer<waiting loop Be aware that that piece of code will keep 1 CPU-core very busy while waiting. Okay and thanks for the warning! Otherwise both of those codes worked correctly on the laptop: Grindstone's code was faster a bit, because it allowed some more extra fps (ap...
by ITomi
Mar 08, 2023 13:28
Forum: Game Dev
Topic: Speed
Replies: 34
Views: 11744

Re: Speed

Thank you very much your helpful examples, boys! I tried Dodicat's Regulate() function and Grindstone's piece of code too on my desktop PC and both of these could regulate the game speed to 25 fps with the correct values (if I know right, 25 fps is enough for the human eyes to see smooth motion pict...
by ITomi
Mar 06, 2023 10:16
Forum: Game Dev
Topic: Speed
Replies: 34
Views: 11744

Re: Speed

Hello everybody! After a long time I started to make an FPS game in FreeBasic and I would like it should be good in terms of speed, that is let it at similar speed both on slow and swift computers. Based on previous experience I understood that for this I need to know the delta time and the fps of t...
by ITomi
Jan 06, 2021 12:52
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 307621

Re: MiniB3d for FreeBasic

Thank you; now it is works with sprites, although now I can go across the walls. Then should I use different collision values to walls and sprites?
by ITomi
Jan 05, 2021 14:41
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 307621

Re: MiniB3d for FreeBasic

Wow, thank you Angros47 for the helpful explanation! Now I scaled down the size of texture, so it looks perfectly! And one more question: why the camera entity avoid collision with a sprite in up or down direction on the basis of this code: kamera=createCamera() EntityType kamera,1 EntityRadius kame...
by ITomi
Jan 05, 2021 10:13
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 307621

Re: MiniB3d for FreeBasic

Happy new year and thanks, Angros47, but something isn't work with it yet... I have four cubes to bound the game field and I scale these to fit the edge of field: wall(0).itsimage=CreateCube() PositionEntity wall(0).itsimage,1,entityy#(kamera),1 ScaleEntity wall(0).itsimage,pszel*pxegys,1,1 EntityTe...
by ITomi
Dec 20, 2020 8:48
Forum: Game Dev
Topic: A simple snake game - with two problem
Replies: 5
Views: 1639

Re: A simple snake game - with two problem

Yeah, this is it! Thank you, Angros47! I should listen better to this things, too... One more thing that I forgot two " redim preserve " lines from my program. So, put these at 36. and 42. lines: select case egydolog(i).neve case "alma" kukactesthossz+=1 redim preserve kukactest(...
by ITomi
Dec 19, 2020 16:23
Forum: Game Dev
Topic: A simple snake game - with two problem
Replies: 5
Views: 1639

Re: A simple snake game - with two problem

grindstone wrote:The second problem is easy to solve. You forgot a bunch of commas:
Thanks, GrindStone, now it is works! Previously I tried with 3 commas, but it seems, that was not enough...
by ITomi
Dec 19, 2020 15:17
Forum: Game Dev
Topic: A simple snake game - with two problem
Replies: 5
Views: 1639

A simple snake game - with two problem

Hello! Something is wrong in my newest program. This is a simple snake or worm game, in which you can use the ARROW keys. But there is two problems in it: 1. in the line 81 (if dologdb<250 then...) the program ought to create apple or poison at random coordinates, but after it creates four or five t...
by ITomi
Dec 18, 2020 13:32
Forum: Libraries & Headers
Topic: MiniB3d for FreeBasic
Replies: 1083
Views: 307621

Re: MiniB3d for FreeBasic

Hello! I have a problem with MiniB3d: first, I create a texture: walltexture=loadtexture("pics\brickwall.jpg") then, after I create an entity and scale it to bigger, I add this texture to this entity: borderwalls(0).image=CreateCube() ScaleEntity borderwalls(0).image,wallwidth*pixels,1,1 E...
by ITomi
Dec 09, 2020 15:55
Forum: Beginners
Topic: The island - An RTS game
Replies: 117
Views: 23192

Re: The island - An RTS game

Hello everybody! After I completed an RTS game, I rewrote this program too. This is the version 2.0. First of all I radically reduced the number of its lines: from 9075 to 3695 lines! Then I made some minor changes, e.g. player can select multiple soldiers, AI destroys its unnecessary buildings, etc...
by ITomi
Dec 06, 2020 15:40
Forum: Beginners
Topic: Mouse problem
Replies: 8
Views: 2989

Re: Mouse problem

Hello, Fxm, now it is work, but interesting: I had to put these code into main program instead of subprogram. One more problem that when I press a mouse button on a sprite what represent a button in my game and I change to another game state in this way with other buttons, the other button also pres...
by ITomi
Nov 23, 2020 16:59
Forum: Beginners
Topic: Mouse problem
Replies: 8
Views: 2989

Re: Mouse problem

Thanks, Paul, but is there possibility to draw a circle at the mouse coordinates without button pressing?
I would like draw it when a variable is true and not when the user press a mouse button.
by ITomi
Nov 23, 2020 15:02
Forum: Beginners
Topic: Mouse problem
Replies: 8
Views: 2989

Re: Mouse problem

Hello! I have a question here, too. I would like draw a circle at mouse coordinates, but my code doesn't work: #include "fbgfx.bi" Using FB screenres 640,480,32 dim as integer mousex,mousey,mouse,mousebutton mouse=getmouse(mousex,mousey,,mousebutton) do screenlock cls if mouse=0 then circl...
by ITomi
Nov 23, 2020 14:52
Forum: Game Dev
Topic: Problem with Fog-of-War
Replies: 15
Views: 3205

Re: Problem with Fog-of-War

Wow, Paul Doe! Your program looks great! Thank you for it! But as BasicCoder2 mentioned, I gave up using tiles in my RTS and I use another method to hide enemy units. But I save your code and browse it, because I would like make a minimap, too.