BerryBots forums

It is currently Wed Oct 20, 2021 1:13 pm

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Oct 19, 2013 11:13 pm 
Offline

Joined: Sat Oct 19, 2013 11:06 pm
Posts: 15
Hi guys, I found BerryBots yesterday and am very excited by it.

I've added to the AUR for any Arch users: https://aur.archlinux.org/packages/berrybots/

Can't wait to give this a good go after I finish my exams.


Top
 Profile  
 
PostPosted: Sat Oct 19, 2013 11:56 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
That's awesome - thanks for posting!

One concern I have is that on Linux/Windows, BerryBots expects everything (ships, stages, etc) to just be in the current directory. For this to work smoothly running from an installed location, I think I need to separate the executable path from the data path, like what I've done on Mac. Basically:

  • Store the "base directory" and some other properties in a hard-coded path, like ~/.berrybots.
  • If there's no ~/.berrybots, have a setup process to choose a base directory and copy the samples over.
  • Also have a smooth process to upgrade samples / API docs in your base directory when you run a new version for the first time.

I already have this logic on Mac, so it shouldn't be hard to do. I started looking at packaging as .deb this week, so hopefully I'll have that code in place soon and it would also work for the AUR package.


Top
 Profile  
 
PostPosted: Sun Oct 20, 2013 1:38 am 
Offline

Joined: Sat Oct 19, 2013 11:06 pm
Posts: 15
Yes, ideally binary in /usr/bin and game data (including sample bots etc) in /usr/share/berrybots (readonly) then user created bots/stages in ~/.berrybots or wherever they choose. I put it all in /opt/berrybots (readonly).

I only tested the sample bots and assumed that `browse' would let you choose bots etc from your home directory but clicking that button doesn't appear to do anything for me, what should it do?

I also used the dependencies on the system rather than adding them to berrybots, this meant patching the makefile a bit and 2 source files, have a look here if you are interested https://aur.archlinux.org/packages/be/b ... ots.tar.gz


Top
 Profile  
 
PostPosted: Sun Oct 20, 2013 3:11 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
"Browse" just opens the directory in a window (Finder / Nautilus / whatever). On Linux it uses xdg-open. On Linux, the ships/stages dirs are relative to the current working directory, so I'm guessing that doesn't exist and that's why it's failing/doing nothing. Though it should be the same dirs as where those listboxes look for ships and stages, so I'm not sure why one would work and not the other?

That's great AUR has wxWidgets 2.9 and SFML 2 already! Still looking into the right solution for Debian, which has neither in stable...

I'll have to think about keeping the samples permanently separate or not. On Mac I just copy them into the user's dir, and then you're free to modify or delete them.


Top
 Profile  
 
PostPosted: Sun Oct 20, 2013 8:58 am 
Offline

Joined: Sat Oct 19, 2013 11:06 pm
Posts: 15
Ah yes it does too, I don't notice because I already had it open. So what I want then is just to be able to add my own personal directory to those lists, for now I'll just have to copy the installation to my home directory and use it there.

Well actually they are in the main Arch repository, the AUR is just for user made packages like this.

I think you should keep them separate so you know you haven't modified them by accident. Then you can copy them if you want to modify them like you say.

Thanks for the info, can't wait to give it a go.


Top
 Profile  
 
PostPosted: Wed Oct 23, 2013 3:02 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
So I've made a lot of progress on this. Revamped the build to use autoconf/configure, it detects and uses the installed version of the libs if they're present, or you can specify the paths to each with args to ./configure if you built any of them from source. And separated the data path from the executable, like on Mac, and that's all working. So you can configure / make / make install and run "berrybots" from anywhere and everything works.

This would all work fine for packing on Arch Linux, I think. I built a .deb that worked and I'll be looking into .rpm next. But like I said, Debian stable still lacks both SFML 2 (at least that's in the pipeline) and wxWidgets 2.9, so I need to figure out what to do there. I can bundle them in the .deb - that would have more binary incompatibility than having them as dependencies, but would at least make it easy to build from the source package if you needed to.


Top
 Profile  
 
PostPosted: Wed Oct 23, 2013 10:24 pm 
Offline

Joined: Sat Oct 19, 2013 11:06 pm
Posts: 15
Awesome, I'll package it up now a let you know how it goes. Should I grab the source from git or will you put it out as 1.3.1?

I've just finished v1 of my BerryBot which I'll post up soon too, it beats BasicBattler in 1v1 with my limited testing so far.


Top
 Profile  
 
PostPosted: Wed Oct 23, 2013 10:46 pm 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
I hadn't pushed anywhere yet, but here you go - this is 1.3.0 + the build changes: berrybots_src_1.3.1-beta1.zip

You can probably just call that 1.3.0 if you repackage it, or 1.3.1-beta1. Version 1.3.1 is hopefully a few days out, but I'm still unsure about some of the .deb / .rpm packaging stuff, and I may do similar to Windows and add an installer.

Looking forward to seeing your bot!


Top
 Profile  
 
PostPosted: Thu Oct 24, 2013 1:40 am 
Offline

Joined: Sat Oct 19, 2013 11:06 pm
Posts: 15
Thanks, that compiled flawlessly just had to set --with-wx-config=wx-config-2.9 because 2.8 is the default on Arch and that was all. However I got a seg fault after it had copied the files or I chose skip.


Top
 Profile  
 
PostPosted: Thu Oct 24, 2013 5:01 am 
Offline
Site Admin
User avatar

Joined: Sat Nov 17, 2012 5:03 am
Posts: 88
Hmm... Well, I want to give it some thought and research before asking you to spend much time on it. But I would at least be curious if ~/.berrybots exists, and the contents if it does. Also, is this just after configure / make / berrybots? Or a make install and running it from somewhere else?

Good find on that --with-wx-config flag, there's a bunch in that group that I'm glad to be aware of now. I guess the --with-wx in my configure script is redundant when there's --with-wx-prefix. And I bet if I use that instead, I can just let the wxWidgets detection happen normally - right now I skip it if you pass --with-wx.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group