you should go ahead, its very fun. you can download the game and play with the structure
lunafromthemoon
Creator of
Recent community posts
Hello everyone!
I've set up a discord server for RenJS, so you can share the games you make, follow up on new RenJS features and see the development roadmap. You will also get news about a visual GUI editor that's in the works.
Please, be excellent to each other!
Hope to see you there:
https://discord.gg/bmdBaDm
lunafromthemoon
There was only an optional boss to fight in the ice temple. In any case, the fight system is kind of broken since I didn't spent too much time on it. This game was a birthday present for a dear friend, and I only released it because to have it somewhere, I'm glad people can enjoy it a bit even then. :)
i think you can get that chest after activating all the stones (activate them with the spell) there are five stones in the forest: the one where you appear first, the second is very close on the second map, to the right. third in the next map you can go up on the left side, where the owls are, fourth after crossing the bridge, final one is on the big waterfall map, at the end of the path to the left. when you activate them all, the screen will shake and you will be able to continue with the path to the right side of the big waterfall
Hello, it depends mostly on your OS. I've had some reports of this happening, for example, with MacOs or some browsers on linux. Try another browser, or, if it's still an issue, you should be able to run it as a local server. The open source text editor Brackets allows you to run files in a server very easily, by pressing a button. Another option is tu run the python simpleHttpServer from a terminal.
Let me know if it works for you.
Cheers!
Hello computer science student, sorry for the delay, here's more or less what you should do:
The visual choices are loaded as buttons in the screen. In PhaserJS, a button has this parameters:
button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame, group)
That's the position where the button will be displayed, the image "key", the function that will execute when pressed and then the frames, that's where all the magic happens.
The image reference can be a static image (in which case has only one frame) or a spritesheet, with many frames. As it is in RenJS, we assume the visual choices will be a static image, so for the frames I use 0 value for all of them (line97 in LogicManager.js):
var button = game.add.button(position.x,position.y,str[0],function(){
RenJS.logicManager.choose(index,key);
},RenJS.logicManager,0,0,0,0,this.visualChoices);
See all the 0,0,0,0 are the frames, you just have to load a spritesheet and use different values. You don't need to have 4 different frames, you can have two normally (normal and hover) and use the frames 1,0,1,0.
The second most important thing is, the images have to actually be spritesheets. You can load spritesheets easily in the setup.yaml file:
spritesheets:
icecream_choice: assets/effects/ice_cream.png 100 100
In this case, we're loading a spritesheet for our icecream_choice, with frames of 100x100 pixels. That means each frame in the image is 100x100. I.e. if I have 2 frames, the image will be 100x200.
With that little change then it should work. Let me know if there's any issue.
Cheers!
Hello Yuna, it's easy to do, but you'll have to use a call function to set the name.
First, the characters have two names, an id, which is used in the script, and a name that will be shown in the name box. The id can never change, so if you have a character that represents the player, you can use, for example, "player" as the id. What you need to do is change the name property of the character so that when you make them talk, the new name will appear in the name box, instead of "player".
The characters are their own object, and the property for the display name is called "name". The characters are all stored in a map, accessible from the Character Manager (RenJS.chManager.characters), and you access each one indexed by their id. On the other hand, the variables are stored also in a map, in the Logic Manager (RenJS.logicManager.vars). Knowing this, it's easy to make a custom function to change a character name.
I'll give you an example with the Quickstart. The character with id "deuzi" has a displayName property defined in the setup as "Deuzilene".
Setup.yaml
characters:
deuzi:
displayName: Deuzilene
speechColour: "#ca90cf"
looks:
normal: assets/characters/Char3Normal.png
happy: assets/characters/Char3Happy.png
Story.yaml
start:
- play morningBGM:
- show room: WITH FADE CONTINUE
- show deuzi: happy AT CENTER WITH FADE
- var username: Sandrine
- deuzi says: I prefer to be called by my middle name, {username}.
- call changeName:
character: deuzi
name: username
- deuzi says happy: That's much better!
In this case I just used a normal variable to store the new name, but you will use the one obtained from the input. The new name will appear only after calling the function changeName, with two parameters, the character id (deuzi), and the variable where we have the new name (username). In this way, you can change any name you want. Finally, let's see what's inside the changeName function:
CustomContent.js
RenJS.customContent = {
//put here your own functions
changeName: function (params) {
//params is a map with {character,name}
//lookup of the character with "character" id
var character = RenJS.chManager.characters[params.character];
//lookup the content of the variable with "name" id
var newName = RenJS.logicManager.vars[params.name];
//change the character name property
character.name = newName;
//continue with the game
RenJS.resolve();
}
}
Hope you can make it work, and let me know if there's more I can help you with.
Cheers!
Luna
Hello nick, thanks, I'm glad you're enjoying RenJS.
The current save/load functionality saves and loads only one game. As you saw, the save/load function takes a "slot" number, so you can potentially save and load as many games as you want. In fact, that was the idea when creating the save system, and it was finally not implemented.
To add new menus to RenJS, you should check the SimpleGUI.js file, in this file, all the GUI is created, including main menu, setting menu, hud, etc. You would need to track where the menus are created, and add manually the ones that you need. Creating a new menu is not a huge crazy thing, and it's good that you know a bit of Phaser, because you will need to use it, more or less, to create them.
Phaser has groups of display objects (a display object is an image, a sprite, buttons, etc), a menu is simply a phaser group with all the elements of your menu, your menu background, the buttons, and anything else that you might need (in the save menu, maybe some squares for the save slots?). You create the menu (i.e. the phaser group) at the start of the game, and hide it until you want to use it.
Let's check the roadmap to create a classical save and load menu for visual novels, like this:
Let's check what are the most important elements:
* A menu background
* The save slots: It's a small box (an image, basically) with a screenshot of the moment you saved, associated with a slot number, save date and a title. It also has a little cross to delete it. If there's no game saved, a default image is shown.
* Return button: to go back to the game or main menu
* Save button: Select a slot and click on this button to save
* Load button: Select a slot and click on this button to load
The rest of the elements we can ignore for now.
Then let's see more or less how to create this menu:
- Create save menu Phaser group
- Create menu background and add it to the menu group
- Create the save slots:
- Create a the slot image (slot background) and add it to the menu group
- Create the thumbnail image for the saved game, add it to the slot image (addChild)
- Add the text part, if you want, and add it to the slot image too
- Add an event listener to the slot: on click, we want to select the slot. We can save this information in the menu group, for example, as a new property.
- Create the save button and add it to the menu group, the action on click should be to check if you selected a slot, and if you did, use this property to call RenJS.save(slot), after this you can hide the menu.
- Create the load button and add it to the menu group, the action on click should be to get call RenJS.load(slot) with the selected slot, and then close the menu.
- Create the return button and add it to the menu group, the action on click should be to hide the menu.
I know this sounds like a lot, but you can start trying to implement it and I'll help along the way
Cheers!
Luna
You will find the new changes in the Quickstar repo, for background animation: https://gitlab.com/lunafromthemoon/RenJSQuickstart
You can now load a background as a spritesheet, in the setup file as:
backgrounds:The information you need to add is the frame width and height, and the framerate. You can see an example in the quickstart, by changing the background that is loaded in the story file from "room" to "forest".
# key: filepath frame_width frame_height framerate
forest: assets/backgrounds/forest-spritesheet-800x600.png 800 600 5