How would I go about creating a main menu?

52 views
Skip to first unread message

szayel...@gmail.com

unread,
Jul 12, 2018, 8:24:15 AM7/12/18
to excaliburjs


I'd like to create a main menu but I'm not sure how, I'd like to add 3 buttons such as "New Character", "Load Character", and "Delete Character"

My idea of doing this was making a new scene for the main menu and clicking the buttons would direct to a different screen but I have no idea how to go about, the API documentation isnt very clear

Erik Onarheim

unread,
Jul 12, 2018, 10:05:05 AM7/12/18
to szayel...@gmail.com, excaliburjs
Hi Szayel,

Good point, I've made an issue to better discuss constructing game UI https://github.com/excaliburjs/Excalibur/issues/1015

What I'd suggest is using HTML to build your UI and center it on top of the game canvas that is running excalibur. It is possible to build UI in excalibur itself using UIActor, but HTML/CSS may get you the most utilitiy quickly, here is a quick example https://codepen.io/eonarheim/pen/XBbeeW?#

If you need lots of custom drawing/excalibur's lifecycle that's when I'd look into excalibur UIActor for UI elements.

Let me know if you have any questions,
Erik



On Thu, Jul 12, 2018 at 7:24 AM <szayel...@gmail.com> wrote:


I'd like to create a main menu but I'm not sure how, I'd like to add 3 buttons such as "New Character", "Load Character", and "Delete Character"

My idea of doing this was making a new scene for the main menu and clicking the buttons would direct to a different screen but I have no idea how to go about, the API documentation isnt very clear

--
You received this message because you are subscribed to the Google Groups "excaliburjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excaliburjs...@googlegroups.com.
To post to this group, send email to excal...@googlegroups.com.
Visit this group at https://groups.google.com/group/excaliburjs.
To view this discussion on the web visit https://groups.google.com/d/msgid/excaliburjs/45bc8b84-b55f-4b33-b724-5a8a7b1ac925%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

szayel...@gmail.com

unread,
Jul 13, 2018, 2:24:05 AM7/13/18
to excaliburjs
I've looked at the UIActor documentation but there isnt really much there, just;

"Helper Actor primitive for drawing UI's, optimized for UI drawing. Does not participate in collisions. Drawn on top of all other actors."

I feel like the docs should have some examples on how the classes/vars/etc work and maybe a list of arguements you can pass similar to how linux has man pages but that might be a lot of work but currently its a bit hard to understand how to use it as a beginner(I'm not a pro or anything) trying to make a RPG game


Kamran Ayub

unread,
Jul 13, 2018, 8:53:43 AM7/13/18
to szayel...@gmail.com, excaliburjs
This is good feedback and something we are definitely planning to focus on after the stable 1.0 release. The API docs are expanded in some places but we've yet to write real user documentation for Excalibur. UI Actor is just a fixed position Actor, so I would check out the docs of Actor instead which has a lot more detail.

--
You received this message because you are subscribed to the Google Groups "excaliburjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excaliburjs...@googlegroups.com.
To post to this group, send email to excal...@googlegroups.com.
Visit this group at https://groups.google.com/group/excaliburjs.

szayel...@gmail.com

unread,
Jul 13, 2018, 10:50:11 AM7/13/18
to excaliburjs
Have you guys thought of using Discord?

I've read most of the sites documentation it's not very clear about how to create sprites/loading resources especially if you're using them from custom paths. Also a bit confused as to animating sprites and what kind of spritesheets are allowed(as in png or gif/etc)

Maybe for one of the next samples or ludems project you guys could try making a RPG? or perhaps a video tutorial on how to use certain classes/etc
Reply all
Reply to author
Forward
0 new messages