Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / something happens with the 3d particles bug??

Author
Message
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 17th Jun 2020 09:21 Edited at: 17th Jun 2020 19:52
I know I put it in the other thread but they are going to be mixing songs so I almost better open another thread just in case.

I upload an example of the problem I have so you can see what I mean ... move with wasd, look for a torch with particles, this is how they should look.

press the right button to activate the minimap and see what happens to the torches .....

is this a bug? PLEASE TAKE A MINUTE TO TRY IT

I put the code that creates the minimap

function DrawMinimap()
SetSpriteVisible(puntero,0)
setspritevisible(minimapa,0)
SetAmbientColor(40,0,0)
SetCameraFOV(1,0)
SetCameraOrthoWidth( 1, 480 )
SetCameraPosition(1,playerx#,playery#+700,playerz#-150)
// this needs to be created outside the function or you're going to run into memory problems then just reuse the image
playerx# = getobjectx(objID)
playerz# = getobjectz(objID)
playery# = getobjecty(objID)
SetRenderToImage(1, -1) //I believe this should be (1,-1) the help file doesn't explain this well
ClearScreen() //needs to be here
SetCameraPosition(1,playerx#,playery#+700,playerz#-150) // are you sure you want to place the camera 1000 units above the player?
//need to get your original camera angle since its being changed if its always pointed at character then Im not sure the following command is needed - no need to recalculate the camera angle
//SetCameraLookAt(1,playerx#,playerx#,playerx#,0)
Render()
SetSpriteImage(minimapa,1) // not needed if you've already set minimapa to use image 1

SetRenderToScreen()

SetCameraPosition(1,playerx#,playery#+camara_distancia,playerz#-80)
//need to get your original camera angle
SetAmbientColor(0,0,0)
SetCameraFOV(1,80)
SetSpriteVisible(puntero,1)
setspritevisible(minimapa,1)
endfunction

and the game loop



do
if desactiva = 1
DrawMinimap()
SetSpriteVisible(minimapa,1)
else
SetSpriteVisible(minimapa,0)
endif

recoloca_caracter_camara(objID)
controla_prota()
orienta_enemigos()

SetSpritePosition(minimapa,580,10)

actualiza_balas()

SetSpritePosition(puntero,GetPointerX()-GetSpriteWidth(puntero)/2,GetPointerY()-GetSpriteHeight(puntero)/2)
if ( GetRawKeyPressed(27) ) then exit
if GetRawMouseRightPressed() = 1
desactiva = abs ( desactiva -1 )
endif

Print( ScreenFPS() )
print ( desactiva )
Sync()


loop


22/5000
I don't know why it happens or what I can do to prevent it from happening


EDIT: DOES NOT ALLOW ME TO UPLOAD THE FILE, I PUT LINK

https://1drv.ms/u/s!Alw4cxQZ85htg484y_fFr-24BKFkOA?e=guqq2R
using AppGameKit V2 tier 1
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 17th Jun 2020 10:34 Edited at: 17th Jun 2020 19:41
I've managed to make a screenshot to see it ... although it shows a lot more in the game


https://1drv.ms/u/s!Alw4cxQZ85htg487Y_QCwSMG-4KH1A?e=dgh5vA
https://1drv.ms/u/s!Alw4cxQZ85htg4882siS18GkIaLePA?e=8yVnb1

I don't know why it won't let me upload anything ...
I put direct links
using AppGameKit V2 tier 1
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 17th Jun 2020 19:39 Edited at: 17th Jun 2020 19:42
I do not understand why the images that I upload are not seen
using AppGameKit V2 tier 1
JosephB
17
Years of Service
User Offline
Joined: 12th Sep 2006
Location:
Posted: 18th Jun 2020 15:57 Edited at: 18th Jun 2020 15:58
I ran your game and the appearance of the torch particles changes after pressing the right mouse button to show the minimap. Also, the appearance of the particles does not seem to change back after closing the minimap. I placed your main loop and minimap function below, so that others may be able to more easily review your code.;

main loop:


Minimap function:


I have attached the image that shows the minimap particle change below:

Attachments

Login to view attachments
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 19th Jun 2020 22:59
My first guess is your FOV and OrthoWidth camera commands are not exactly correct. It doesn't appear you set the OrthoWidth or FOV back to default. I have zero experience with either of those commands, but seems like a good starting point.
Golelorn
7
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 19th Jun 2020 23:07
Also after reading your other post, you might want to make sure your camera aspect matches your sprite size. Then change aspect back to match your device. Otherwise, its going to stretch.

To make your images available to us you need to choose the file, then hit the upload file button.

Login to post a reply

Server time is: 2024-03-28 20:21:11
Your offset time is: 2024-03-28 20:21:11