July 29, 2021, 11:09:39

Author Topic: Vshooter (entry for the competition 'virus')  (Read 1561 times)

Offline Xerra

  • Hero Member
  • *****
  • Posts: 1292
  • Wait, what? This isn't Porn Hub?
    • Retro Evolved
Re: microbes shooter - virus competition entry
« Reply #15 on: March 13, 2021, 21:36:43 »
Can see the inserted image and the attached image. Oh, and also the avatar.

Safari seems to be ok.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2727
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: microbes shooter - virus competition entry
« Reply #16 on: March 14, 2021, 00:54:39 »
If using the IMG tags then make sure the URL is https and not just http
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Mac mini (2020 ), M1 SoC, 8 GB LPDDR4, 512GB NVMe 
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time.

Offline Derron

  • Hero Member
  • *****
  • Posts: 3614
Re: microbes shooter - virus competition entry
« Reply #17 on: March 14, 2021, 08:49:43 »
i see the images on my laptop (windows 7), with internet explorer browser, firefox browser, chrome browser, opera browser, epic browser, iron browser

and also i see the images on my smartphone (android), with default (samsung) browser, adblock browser, firefox browser, chrome browser, opera browser...

Normally Firefox _should_ block mixed content ... but it seems it became less strict - just displays a warning next to the lock icon



Quote
A gray padlock with an orange or yellow triangle indicates that Firefox is not blocking insecure passive content, such as images. By default, Firefox does not block mixed passive content; you will simply see a warning that the page isn't fully secure. Attackers may be able to manipulate parts of the page like displaying misleading or inappropriate content, but they should not be able to steal your personal data from the site.
https://support.mozilla.org/en-US/kb/mixed-content-blocking-firefox


Wonder why your chrome is displaying them - should only happen if you load the forum via "http" not "https" (as it is then no longer "Mixed content")
https://www.ghacks.net/2020/04/02/chrome-81-mixed-content-images-will-be-upgraded-or-blocked/


So some browsers accept images (or maybe other media files as audio/images) - and others completely block it.


Best is to have only HTTPS there ... as this does not lead to the "lock" showing odd colors or vanishing (some people might be afraid of something "not sober" happening).


bye
Ron
« Last Edit: March 14, 2021, 08:55:19 by Derron »

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - virus competition entry
« Reply #18 on: March 23, 2021, 18:35:36 »
the ai /  behaviors of viruses is almost finished, but now i have a problem with collision detection between a moving bullet and a moving virus, which happens sometime but not everytime ???, i had an idea why this happened, i wrote another code this morning to fix the issue, and the result is even worse...

i wonder if this is due to how linepick() works behind the scene... (if it is an independant system or not)

edit : linepick works well, there was an error in my code...

good ! 8)

AI / behavior of a virus :
;Enter (enters in the blood pipe)
;Go (translate towards direction at speed)
;Rebound (if near a wall, rebounds against the wall)
;Attach (if near a cell, attach to the cell)
;Inject (if attached to a cell, inject rna)
;Replicate (if rna injected, replicate others viruses)
;Burst (if enough viruses made, burst the cells, create others viruses)
;Detach (if cell burst, detach the virus)
;Destroyed (if virus life <= 0 (because hit by killingcell bullets), destroy virus into parts)


here we see a bursted cell (after having been used to replicate viruses) and several new viruses created.

of course i plan to replace the debugging color by a burst with parts
« Last Edit: March 26, 2021, 21:07:29 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - virus competition entry
« Reply #19 on: March 26, 2021, 20:40:07 »
working on the ai / behavior of killing cells

;Choose (choose the nearest microbe)
;Go (if too far from target, go towards target)
;Fight (move, aim, shoot at virus or bacteria)
;Destroyed (if cell life <= 0 (because hit by bullets or intoxicated by wastes), destroy cell into parts)


here we see a killingcell shooting a bullet at a virus, and the previous collision point and collision normal
« Last Edit: March 26, 2021, 21:09:29 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline 3DzForMe

  • Hero Member
  • *****
  • Posts: 1259
Re: microbes shooter - virus competition entry
« Reply #20 on: March 26, 2021, 23:55:57 »
Reminds me off Home world.... But with little viruses doing their 3d rounds  :o

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - virus competition entry
« Reply #21 on: March 31, 2021, 22:33:11 »
hi ! :-)

amazing what a good optimisation can do

in my game, there are many turning moving entities (cells, wastes, viruses, bacterias, bullets) and before checking for a collision between one entity and another, i do a distance3d check.
however when there are more and more entities in the game (wastes increase, viruses are replicated, bacterias divide, bullets are shot), then this caused some slowdowns.
especially for the distance checks between :
bullets->viruses
bullets->bacterias
viruses->cells
bullets->cells
wastes->cells

but i had an idea that i used in the past, using zones.

the map is 10width 1000depth

for this optimisation, the map is divided in 1000 zones of 10width 1depth

i use an array to store for each zone, which entities are in this zone
Zone_EntsCount%(999) ;1000 zones from 0z to 999z, 30 entities max per zone
Zone_Ent_Shape(999,30) ;the renderer reference
Zone_Ent_Pickable(999,30) ;the pickable reference
Zone_Ent_Kind%(999,30) ;to determine which other list array to read/write
Zone_Ent_I%(999,30) ;index in other list array

each loop, for each entity, i determine in which zone each entity is depending on its z position ( in this case i simply do a floor(entityZ) ), and i store the shape reference, the pickable reference, the kind, the index, of the entity in the zones array

then when i need to check if an entity is near another entity,
instead of checking the distance between this entity and all others entities,

i read the entries in the array between entityZ-2 and entityZ+2 and store the shape reference, the pickable reference, the kind, the index, of these entities in a temporary array

then i do the distance checks only on these entities

and then the linepick checks only on the near entities.

this is very fast, no more slowdowns with hundreds of turning/moving entities :-D

great !


here we see hundreds of viruses, translating and rebounding on the pipe walls, and attaching to a cell if near enough...
« Last Edit: April 01, 2021, 21:12:37 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline col

  • Hero Member
  • *****
  • Posts: 586
Re: microbes shooter - virus competition entry
« Reply #22 on: April 01, 2021, 02:31:46 »
Hi RemiD,

Your technique for optimisation of collisions has a name... Space Partitioning. There are many variants, Binary Space Partitioning, Quad tree partitioning, K-Tree Partitioning plus many more.

Kudos to you for working it out if you didn't know about any of these types of techniques.

There's also another name for this optimisation used in Physics engines... Broadphase collision detection - same thing different name.

They are all optimisations used to reduce the locality of potential collisions, therefore the number of checks required. Using tree like structures (maybe the next step for you?) will also give you another boost.

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - virus competition entry
« Reply #23 on: April 01, 2021, 07:37:54 »
Quote
Space Partitioning. There are many variants, Binary Space Partitioning, Quad tree partitioning, K-Tree Partitioning plus many more.

no i don't know the details of this partitioning but i guess it is similar.

i have thought of this approach in the past, using a 2d array, to store the vertices indexes of a big surface, so that i was able to know which vertices to consider for lighting/shading, (from lightx-5,lightz-5 to lightx+5,lightz+5) without having to do thousands of distance checks each loop...

thanks for having mentionned the appropriate terms. :)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline Scaremonger

  • Full Member
  • ***
  • Posts: 230
    • ITSpeedway - Ramblings of a geek!
Re: microbes shooter - virus competition entry
« Reply #24 on: April 01, 2021, 19:39:46 »
I know that technique, or at least something similar, as a Scenegraph. I used it in a game with hundreds of objects on a large map that all interact and the speed increase was massive.

There is a thread somewhere called "Let's talk about Scenegraphs" where one was developed for blitzmax.

Si...

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - virus competition entry
« Reply #25 on: April 05, 2021, 20:19:31 »
movements, collisions detection and repositionning, simple physics (to rebound on the walls of the pipe), ai, viruses can attach to cells and hijack them to replicate and spread, killing cells can shoot and destroy viruses, cleaning cells can intercept and clean wastes, work well, but the gameplay is boring.

i am going to simplify and try to make it more fun...
instead of having the player only being a killing cell, it will be a kind of super cell, able to shoot and destroy viruses, intercept and clean wastes, and call others killing cells / cleaning cells for help, and the goal will be to keep the viruses / wastes under control. (to not get overwhelmed)
« Last Edit: April 18, 2021, 08:40:50 by RemiD »
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1273
Re: microbes shooter - (project stopped)
« Reply #26 on: April 08, 2021, 09:36:39 »
no motivation to continue this anymore.

this takes too much time and it is pointless (for me)

good luck to the others participants.
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Online iWasAdam

  • Hero Member
  • *****
  • Posts: 2354
Re: microbes shooter - (project stopped)
« Reply #27 on: April 08, 2021, 10:49:12 »
 :(

Offline col

  • Hero Member
  • *****
  • Posts: 586
Re: microbes shooter - (project stopped)
« Reply #28 on: April 08, 2021, 12:58:06 »
Eh? I'm following all the devs for this compo. It would be a shame to not see this one come alive.

Offline STEVIE G

  • Hero Member
  • *****
  • Posts: 580
Re: microbes shooter - (project stopped)
« Reply #29 on: April 08, 2021, 15:59:43 »
no motivation to continue this anymore.

this takes too much time and it is pointless (for me)

good luck to the others participants.

Come on, get yer finger out, i was looking forward to trying this one!  ;D

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal