Search found 151 matches

by ITomi
Jan 06, 2021 12:52
Forum: Libraries
Topic: MiniB3d for FreeBasic
Replies: 995
Views: 235076

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
Topic: MiniB3d for FreeBasic
Replies: 995
Views: 235076

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
Topic: MiniB3d for FreeBasic
Replies: 995
Views: 235076

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: 761

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: 761

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: 761

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
Topic: MiniB3d for FreeBasic
Replies: 995
Views: 235076

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: Projects
Topic: The island - An RTS game
Replies: 117
Views: 17294

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: 2170

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: 2170

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: 2170

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: 1677

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.
by ITomi
Nov 22, 2020 10:46
Forum: Game Dev
Topic: Problem with Fog-of-War
Replies: 15
Views: 1677

Re: Problem with Fog-of-War

" why are you doing it this way? It's woefully inefficient and unnecessary. You'll do better (and it's easier to implement) simply by keeping a separate FOW map for each player, and use bitflags to control visibility (as in, fully obscured, partially obscured or fully visible). " Unfortuna...
by ITomi
Nov 21, 2020 15:43
Forum: Game Dev
Topic: Problem with Fog-of-War
Replies: 15
Views: 1677

Re: Problem with Fog-of-War

Hello Paul Doe! Okay, I corrected it, although the "Array out of bounds access" error didn't come up at me. :-/ But I found an interesting thing: in my game the whole playfield is greater than the 640*480 view. But when I move away the view in the playfield, the program shows me the same f...
by ITomi
Nov 21, 2020 9:41
Forum: Game Dev
Topic: Problem with Fog-of-War
Replies: 15
Views: 1677

Re: Problem with Fog-of-War

I wrote a small code based on my program. It works well in this separated code, but not in my whole game. :-( #include "fbgfx.bi" Using FB dim shared as any ptr background,player,tileimage dim shared as integer playerx=400,playery=300 type fogtiles as integer xplace,yplace end type dim sha...

Go to advanced search