Форум

Знаменитая карта de_dust2 из CS в WebGL

27 апреля 2015 23:50

de_dust2 в WebGL, проект, над которым я работаю в свободное время. Цель изучить blend4web и javaScript сделать простенький но добротный шутер от первого лица.

Последняя версия 3.11

На данном этапе реализовано:
  • Базовое управление WSAD, спринт(Shift), прыжок(Space), обзор мышью
  • Грубая модель карты de_dust2, запечённая в cycles
  • Один режим игры deathmath
  • Подключена физика
  • Стрельба из одного оружия "шаромёта"
  • Повреждения исходя от силы удара снаряда об игрока
  • Мультиплеер, пока что работает только отображение позиций других игроков и передача информации о выстреле, линейное сглаживание перемещение игроков
  • Общий чат для общения внутри игры

Дальнейшие планы:
  • Нарисовать и анимировать персонажей игроков
  • Синхронизация физики между клиентами
  • Серверные просчёты, связанные с разностью пинга у клиентов
А попутно внедряя разнообразные режимы игры.

Идеей создания своего шутера загорелся на зимних каникулах. Тогда начал изучение с ThreeJS. Написал свою логику определения столкновения со стенами, передвжение игрока и пр… Короче велосипед, который зависает со временем в браузере, оставил на память. Потом понял, что без физического движка далеко не уйду.
Была ещё попытка.

Ну а сейчас, благодаря blend4web, продвинулся в своей идее дальше чем когда либо. За это выражаю огромную благодарность разработчикам! Надеюсь, что проект будет продолжать активно развиваться.
Не стой, где попало… Попадет еще раз.
http://naviris.ru/
28 апреля 2015 11:02
Здорово, теперь можно присылать отчёты по работе приложения, вот лог консоли.
Или так:
B4W EXPORT ERROR: The "Material Output" node is not supported. Nodes will be disable for "Material". Material: "Material".
B4W WARN: non-uniform scale for object Player
B4W WARN: material "dust2_ma" is not assigned to any face (object "collision").
B4W WARN: material "FALLBACK_MATERIAL" is not assigned to any face (object "Mesh01.006").
dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed
speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_01.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_08.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_07.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_04.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_21.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_ma.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_19.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_11.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_03.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_34.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_02.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_33.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_22.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_18.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_23.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_15.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_05.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_31.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_10.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_17.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_42.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_13.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_37.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_38.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_39.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_06.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_41.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_12.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_09.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_28.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_40.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_32.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_16.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_20.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_27.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_29.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_30.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_25.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_26.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_14.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_24.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_35.jpg?t=24042015074725
setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed
Failed to load resource: the server responded with a status of 504 (Proxy Timeout ( The connection timed out. ))
XMLHttpRequest cannot load http://185.39.148.168:8091/socket.io/?EIO=3&transport=polling&t=1430207787859-0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://naviris.ru' is therefore not allowed access. The response had HTTP status code 504.
GET http://185.39.148.168:8091/socket.io/?EIO=3&transport=polling&t=1430207808865-1
XMLHttpRequest cannot load http://185.39.148.168:8091/socket.io/?EIO=3&transport=polling&t=1430207808865-1. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://naviris.ru' is therefore not allowed access. The response had HTTP status code 504.


Вполне возможно что проблема с нашей стороны. Прокси у нас уж очень ночень. Ещё дома проверю, но двое знакомых, не на работе, сказали что именно 3D8 у них не загружается, только прицел и фпс. У меня такое получилось только на IE, а они грузились с оперы и хрома.
Менеджер и 3D художник Blend4Web
Запекайте Ambient Occlusion!!!
mikhail@blend4web.com
28 апреля 2015 11:21
Еще у нас именно в 8й шаромет не стреляет
28 апреля 2015 11:42
Здорово, теперь можно присылать отчёты по работе приложения, вот лог консоли.
Да, это нужно бленд файл почистить от старых ресурсов. Добавил в список задач.
двое знакомых, не на работе, сказали что именно 3D8 у них не загружается, только прицел и фпс
Была такая проблема на linux в chromium. Поправил вчера после обеда. Javascript давал синтаксическую ошибку.
Еще у нас именно в 8й шаромет не стреляет
В 8ой версии координаты появления и направления пуль (шаров) принимаются от сервера. Возможно он в то время был не доступен. Попробуйте пропинговать ip адрес 185.39.148.168, там запущен сервер.
Возможно, если стоит прокси, он не пропускает websocket соединение браузера, или браузер пытается подключиться на прямую…
Не стой, где попало… Попадет еще раз.
http://naviris.ru/
28 апреля 2015 12:09
Попробуйте пропинговать ip адрес 185.39.148.168, там запущен сервер.
Не пингуется:
— 185.39.148.168 ping statistics —
47 packets transmitted, 0 received, 100% packet loss, time 46366ms


Мне тут подсказали что наш прокси и пинг запросы не пропускат…
В обед подключусь к домашнему компу через тимвьювер, посмотрю от туда.
Менеджер и 3D художник Blend4Web
Запекайте Ambient Occlusion!!!
mikhail@blend4web.com
28 апреля 2015 14:23
Вот что домашний компьютер выдал:
Uncaught TypeError: Cannot read property 'getElementsByTagName' of null
B4W EXPORT ERROR: The "Material Output" node is not supported. Nodes will be disable for "Material". Material: "Material".
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W WARN: non-uniform scale for object Player
B4W WARN: material "dust2_ma" is not assigned to any face (object "collision").
B4W WARN: material "FALLBACK_MATERIAL" is not assigned to any face (object "Mesh01.006").
dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed
speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_07.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_01.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_ma.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_04.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_08.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_11.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_21.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_02.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_19.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_03.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_34.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_22.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_23.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_33.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_18.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_15.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_05.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_31.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_10.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_17.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_42.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_13.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_38.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_37.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_06.jpg?t=24042015074725
B4W ERROR: could not load image: ../../Documents/dust2_39.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_09.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_12.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_41.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_28.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_20.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_40.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_32.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_16.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_27.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_29.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_30.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_25.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_26.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_24.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_14.jpg?t=24042015074725
Failed to load resource: the server responded with a status of 404 (Not Found)
B4W ERROR: could not load image: ../../Documents/dust2_35.jpg?t=24042015074725
setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed
Object


B4W EXPORT ERROR: The "Material Output" node is not supported. Nodes will be disable for "Material". Material: "Material". Это похоже нода из сайклз материала осталась в материале "Material"
B4W WARN: non-uniform scale for object Player apply scale (ctrl+A) объекту "Player"

На домашнем компе стрельба работает.
Менеджер и 3D художник Blend4Web
Запекайте Ambient Occlusion!!!
mikhail@blend4web.com
28 апреля 2015 20:57
Вот что домашний компьютер выдал
Поправил scale и 404 ошибки материалов. Сейчас консоль почти пуста…
b4w.full.min.js:835 dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed
b4w.full.min.js:835 speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed
b4w.full.min.js:842 setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed

С этим пока не знаю что делать, есть подозрение, что у меня на сервере файлы движка от разных версий. Как только выйдет релиз, разберусь.
Не стой, где попало… Попадет еще раз.
http://naviris.ru/
28 апреля 2015 21:22
Нет, это не исправить, это у всех, вроде.
Менеджер и 3D художник Blend4Web
Запекайте Ambient Occlusion!!!
mikhail@blend4web.com
28 апреля 2015 21:29

Перестреливаемся с другом
Там ещё кто-то afk был
Менеджер и 3D художник Blend4Web
Запекайте Ambient Occlusion!!!
mikhail@blend4web.com
28 апреля 2015 21:47
b4w.full.min.js:835 dopplerFactor is deprecated and will be removed in M45 when all doppler effects are removed
b4w.full.min.js:835 speedOfSound is deprecated and will be removed in M45 when all doppler effects are removed
b4w.full.min.js:842 setVelocity() is deprecated and will be removed in M45 when all doppler effects are removed

К сожалению, разработчики Chrome решили убрать эффект Доплера из браузера (так и не предложив достойной замены ). Эти сообщения означают, что у нас есть время до 45 версии, чтобы поступить также с движком.
Команда Blend4Web
https://twitter.com/AlexKowel
 
Пожалуйста, зарегистрируйтесь или войдите под своей учетной записью , чтобы оставлять сообщения.