ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Announcements and Showcase
forum topic indicator DevLog - CCB Survival 0.0.6 - Behavior to organize buttons and slots.
person icon
cmaiia
Registered User
Quote
2024-01-03 23:27:23

Hello, I recently played a game called "Prey Day". It is similar to the "last day on earth".
So I decided I would make a multiplayer game with the same theme using Coppercube!
I will be posting the devlog of the game "CCB Survival" on YouTube and the Ambiera Forum.

Today, I share the behavior that organizes inventory slots using 2D overlap. Sometimes I had to organize the menus and how there were a lot of buttons or slots. It was bad to have to rename the item by item and align them.
For this reason, I made this behavior. You need a folder. Inside the folder, put your buttons that the behavior will make copies of them by organizing them in columns and rows, you can also determine the distance between the lines and the columns. Set a default name for the buttons, deactivating and size.
It's a simple but useful behavior ... Your download is at the link below:

link : https://drive.google.com/file/d/...

youtube : https://youtu.be/6ZBkPaVcLFM

person icon
just_in_case
Moderator
Quote
2024-01-04 06:33:19

Thanks for sharing, this one is great :)

person icon
blackwater
Registered User
Quote
2024-01-04 12:42:43

Wow, cool - nice of you to share it! Will have a closer look at it later on.

person icon
cmaiia
Registered User
Quote
2024-01-09 22:55:33

Update - Multiplayer approach.

HTTP is not the most suitable for multiplayer games. But it is possible and the CCB only has the Get method.

The most interesting thing would be to use the WebSocket. But for this, it is necessary to export to the web.

1 - I thought of NWJS, but a simple game is heavy in it would take up a lot of space.

2 - Then I tested Pywebview.
benefits :
- Being able to use python for network or websocket.
- occupies less space than NWJS

disadvantages:
- Rendering presents an error similar to the error that happens when VSYNC is deactivated. Even he is active.
- FPS has fallen a lot - CCB is good for web it is light and fast but
When using with pywebview, the FPS is around 30 max 40. In a scene with a player moves and few polygons.

I'm still looking for a way but I will try CCB http
The problem is that multiplayer is in real time and http is not suitable for real -time communication. even if it is possible to come close to this

person icon
just_in_case
Moderator
Quote
2024-01-10 05:34:37

In the upcoming update, if the "system" API update make into the version, you will be able to send and get data as javascript string, without actually writing it to the file and loading it from there.

So you can use Curl or any other library along with it, directly for better multiplayer integration.

There have been many multiplayer projects, A chat Lobby was also created by @rolevix that works almost in real time.
And a working multiplayer game was created by @NGame using the same system command.

You can use the node js if you want, it will work just fine.

person icon
okeoke
Registered User
Quote
2024-01-10 09:35:19

Hi cmaiia,

Regarding webgl - you can also try electron. It might be that nw.js and Pywebview do not support webgl hardware acceleration, so you get a low fps. At least I managed to get a decent fps with it: https://www.electronjs.org/ru/.
It uses chromium as under the hood. So if it runs fine for you in chrome, it will also most likely will run similarly in electron. "Clean" distributed windows application is around 300mb with the latest version, but you can try to use an older version and reduce size by ~100mb.

Regarding http. I have a short demo here:https://zeicmann.itch.io/ccb-var...

If you're going to try using http solution, I highly recommend you to read throughhttps://developer.valvesoftware.... first. Especially part regarding entity interpolation. It's super useful for http method, since it allows you to run your server at 10-20hz and still receive reasonable result. This is also great in case you have a limited bandwidth.

Another thing to consider, is what your infrastructure setup look like. Are you making server -> client or p2p setup? If you're going to distribute server application along with the client your users must likely will not be able to use it, since not everyone know how networking works, everyone have a different setup, some ISPs do not provide you an external IP you can use to host the application, some people have no idea about port forwarding and etc.

Anyway, good luck with that:)

person icon
cmaiia
Registered User
Quote
2024-01-10 11:35:19

Hi @just_in_case. What is this command you mentioned?

@okeoke I'll see what you've said. Thanks for the suggestion.

person icon
just_in_case
Moderator
Quote
2024-01-11 04:42:03

it is the
system()
check the documentation, it allows you to execute any cmd-supported command, and you can pair it with other libraries to extend it and use it for many different purposes.

person icon
cmaiia
Registered User
Quote
2024-01-11 17:50:41

It's a good idea. @just_in_case Thanks

person icon
cmaiia
Registered User
Quote
2024-01-13 15:18:05

Today bring a simple tip on collision.
Video Link: https://youtu.be/iNMsFTkjRnw
Inventory Progress:
- Display player status according to equipment [ok]
- Add usage interval to items [OK]
- items collection [ok] - Divide items [ok] - use items [ok]
- Double click on the item to use [ok] to equip item [ok]
- Current item icon [ok] slot for equipment [ok]
- Description of the Flubatuante Popup item [OK]
- delete all items [ok] specifying quantity [ok]
- Manage items with drag and drop [ok]


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |