Join us on Discord!
You can help CodeWalrus stay online by donating here.

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - 123outerme

Web / Re: 123outerme's Minor Firebase Projects
May 27, 2018, 06:25:28 PM
Recently, I had trouble with login/out. When I logged out and refreshed, the user wouldn't stay logged out. When you logged into a different account, sometimes the user who was previously logged in would be the one who was logged in, when refreshing. Essentially, the user would be "remembered" and not allowed to change, even upon forcing a log out. This is the login.js file I used to control auth. gLogin() is called when the user presses Login, gLogout() is called when the user presses Logout, and that's about it.

var signedIn;
var curUser = null;

function updateUser(user)
if (user !== null) {
  curUser = user;
    signedIn = true;
  console.log("User is logged in");
    // User is signed in.
    } else {
curUser = null;
    signedIn = false;
    console.log("User is not logged in");
  // No user is signed in.

firebase.auth().onAuthStateChanged(function(user) {

function gLogin() {
  firebase.auth().signInWithPopup(gProvider).then(function (result) {
    // This gives you a Google Access Token. You can use it to access the Google API.
    var token = result.credential.accessToken;
    // The signed-in user info.
    curUser = result.user;
signedIn = true;
  }).catch(function (error) {
    var errorCode = error.code;
    var errorMessage = error.message;
    // The email of the user's account used.
    var email =;
    // The firebase.auth.AuthCredential type that was used.
    var credential = error.credential;
    // ...

function gLogout() {
firebase.auth().signOut().then(function () {
signedIn = false;
}).catch(function (error) {

function setButtons(loggedIn) {
  var stylesheet = getStylesheet("visibility");
  if (loggedIn) {
    document.getElementById("signin").setAttribute("style", "display: none;");
    document.getElementById("signout").setAttribute("style", "display: block;");
    document.getElementById("signoutButton").innerHTML = "Logout, " + curUser.displayName;
stylesheet.insertRule(".signedin { display: block; }", 0);

  } else {
    document.getElementById("signin").setAttribute("style", "display: block;");
    document.getElementById("signout").setAttribute("style", "display: none;");
stylesheet.insertRule(".signedin { display: none; }", 0);

Eventually, I figured it out: Apparently, the issue was that I didn't set a default auth persistence state. From what I understand, this meant that persistence would have undocumented behavior. Here's what I added to each of my pages' scripts:

firebase.auth().setPersistence(firebase.auth.Auth.Persistence.SESSION).then(function() {
console.log("Persistence set");
}).catch(function(error) {
While I'm doing background work on the engine (mainly adding features to the Toolchain and adding the last script into the game), I have been working on my related side-project, the GtL webpage. Meant to be a source of information, documentation, and a collection of links, I had a bright idea: why not host map-packs online? So, I set out to working with Firebase to implement this. As I didn't post anything about this along the way, I'll instead recap and explain some Discord announcements and posts I sent to my GtL Discord. Click the link to join if you're interested!

So my project has started to take shape, and I've made this website:
It adds rudimentary map-pack upload and download support. It will support a download counter as well as a like button. Once I actually release Gateway, I imagine this will be used a lot more, but for now we have this
My first announcement of the site. It had just launched with bare-bones upload/download support. It had a dummy download and like counter. No way to post map-packs with a certain type, description, or even see the profile picture of the person who uploaded it.

I've added the second-to-last script type editor, the one for the BossActions script! Now you can fully script bosses. Related to that, I changed the format of the BossActions script so now, it uses coordinates instead of X/Y velocities. I also revamped text input (and more noticeably, the Change FPS setting) to add just numerical input!
Today, I got back to working on the actual game and added editing to BossActions. BossActions has been functional for months, but I've been putting off creating the editor, since there were so many parts to it. I had to have the player choose what tiles the boss is, how much HP, and then figure out a way to have them define a variable amount of points for the boss to move to. However, I finally put that task to bed. Just one more script to create, and then that should be totally done! Also, I added an input method just for numbers, so you can't try to break the system by inputting text in a number-only input.

Since I'm feeling productive today, I also updated the map-pack webpage. Now, the Download (now View) button for each listing on the Download Map-Packs page redirects to the View page for each map-pack, where you can read about it, vote on it, and download it. I think I will add more such as an actual forum, as well
Ok last update (hopefully not for a while like it seems to be). I finally added the ability to like map-packs! The server keeps track of if you have liked or not, and will add or subtract a like depending on which you have done, when you press like. I'm gonna go ahead and style buttons tomorrow, as well as adding more information on the View page, such as likes and downloads. Perhaps I'll make a Comments field as well
I just updated the map-pack webpage to add a lot more to the Download and View pages, as well as making some things auto-load. I still haven't decided what I want on the Index of the page. Most likely a search function and featured map-packs. As you see, I am also debating adding a comments field to map-pack uploads, and adding a full forum! I think it's within my scope, although hopefully it won't become super popular, or my Firebase plan won't be able to handle the traffic!
Web / 123outerme's Minor Firebase Projects
May 09, 2018, 08:39:57 PM
Recently I have started to learn how to user Firebase, thanks to exposure from @_iPhoenix_ . I created a test website, which I have been developing on here. I've added a login/out button, file upload and download, and database read/write (demonstrated by the "load files" button). I intend to add more features to the test website before I call it complete, but know that some pretty cool websites will most likely begin development after this testing phase :)
I really like this change! Gives users something new to look at every single post. I, for one, will appreciate when my topic shows up :ninja:
Web / Re: Chat Application
May 06, 2018, 05:43:24 PM
I'd be willing to help with CSS if that's at all desirable. You can see what I did on my webpage (although admittedly I stole a few things and ideas from templates/tutorials):
PC, Mac & Vintage Computers / Re: Gateway to Legend
April 28, 2018, 03:47:01 PM
Quote from: _iPhoenix_ on April 23, 2018, 07:38:13 PM
The art style is very interesting. It's almost like the halfway point between high-res and the low-res, pixel-art graphics. It would be really cool if you were able to switch between the old, pixel-art graphics and the new, more smooth graphics.

If you do decide to do the high-resolution graphics, I recommend having multiple versions of each tile, each being slightly different in some way. This adds variation against a sea of the same color. I particularly think that natural things, like the grass and trees, should have different variations.

Also, the aliens disappear when you scroll. Is that intentional?
Thanks! I plan on having two tilesheets available to map-pack makers. There's the 48x48 tileset, the one you see in all the screenshots, and the 8x8 (upscaled * 6) tilesheet. I could possibly implement a switching of tilesheets while playing a map-pack, but that might get pretty confusing. I also intend to go back over my tilesheet and add more variations, like you suggested.

The enemies disappearing when you switch maps is actually not intentional. I finished the graphical scrolling of the background, and saw it was done. I'm not sure if I want to keep it like this, though, because if an enemy moves from its starting position while you switch into a new map, the enemy will reappear at its starting postion, which may be a little confusing. The second map will have its enemies in the right place, though.
PC, Mac & Vintage Computers / Re: Gateway to Legend
April 23, 2018, 12:51:05 AM
Quote from: xlibman on April 22, 2018, 05:43:41 PM
I love that sword and logo on the title screen :D

Also I like the music :D

Btw, if the engine already supports NPCs and event blocks/variables/switches, then maybe I could try to do a small game xd

Thanks! I'm happy with the way it's all turning out so far.
As for the engine, NPCs are supported. Events such as cutscenes have yet to be added, but are planned, and variables could be added, but as of now they aren't planned.
PC, Mac & Vintage Computers / Re: Gateway to Legend
April 21, 2018, 02:49:05 PM
I've added smooth scrolling, after much request for it. After two RPGs that handle only screen-sized maps, I have finally added a much-requested feature!

As well, I have added @_iPhoenix_ 's overworld music, fully integrated the map-pack toolchain, and more!

Music is almost done. I need one more track. The engine is almost done. I need to implement one more type of script, fix any bugs, and a few more things. The toolchain is almost done. I need to implement a few more features and allow two more script types to be fully edited. The only facet of the game I have any substantial amount of work left for is map-packs. Again, I have lagged behind making maps. Not because it's hard, but just because every time I go to make maps, I remember a feature that I wanted to implement before making the map :P
PC, Mac & Vintage Computers / Re: Gateway to Legend
April 05, 2018, 11:58:29 PM
Thanks to my friend, I have released a new update video for Gateway to Legend! I've added music! The main theme plays upon launching the game. There will be 3 overworld pieces, at least some provided by @_iPhoenix_ . The boss theme plays upon triggering a boss. We also have plans for more tracks than just those!
As well, I added some new graphics, including particle effects, a splash screen, and more. Finally, I merged the former toolchain program into the main executable.

Watch here:

As it turns out, I'm getting scarily close to releasing, without realizing! I've completed most of the main engine work. Music is chugging along nicely, sound effects are nearly complete, the toolchain is almost done, and game design work is almost finished! I have to finish creating some map-packs, and then I should be extremely close to being finished!
PC, Mac & Vintage Computers / Re: Gateway to Legend
April 01, 2018, 06:03:09 PM
I have released the Pre-Release 1 build publicly! This includes the base game, what I have completed of the toolchain, and one map-pack! See it for yourself:

Download here:

Edit: The link above sends you to the April Fools' Day demo, which is a fully-functioning demo, but only had an April Fools' teaser map-pack. To get the real demo, download here:
PC, Mac & Vintage Computers / Re: Gateway to Legend
March 18, 2018, 03:32:52 AM
I've been working on this still, even though I've been rather silent. What's here isn't even a big update, but I've been preparing the engine for several more big things. After those, almost all work on the engine is finished, and then off to map-pack making, which should hopefully be easy after all the work I did on the toolchain program.

I did a lot of "grease" work, aka lots of engine work for things you won't directly see. I've been working to ensure the Linux/GNU version actually runs, reorganizing some code I made before this project, and more stuff. Here, I actually get to show it off. I've added text input, so instead of having to input various data in the command line, you no longer need that. Another thing I did was revamp the Gateway transition slightly and added a boss into transition.
Quote from: _iPhoenix_ on March 02, 2018, 08:36:53 PM
I also think that the big yellow banner might be harmful. It could scare users away who would otherwise post a topic.
Actually, I was also thinking that. If people think that the forums are only up for archival (which they aren't, since we can still post), they wouldn't bother coming here to have discussions. I think the banner should say something along the lines of "Having a Slow Year" or something. I think we can turn this around, though!
Quote from: xlibman on March 02, 2018, 07:09:16 PM
I gave up on forums when I realized that nothing improved despite posting the same topic as this one about 10 times over the last 15 years. People expect that only user #1 is in charge of generating discussion.

And me and juju's life changes happened so fast that we could not initiate CW 2.0 nor a full staff renewal in time. Now the staff requirements are no longer as high, but we would prefer only hiring people who were not in constant danger of being permbanned due to their bipolar antics (being nice during 5 months, only to spend the 6th trying to make staff members ragequit)

I've given the same offer to other admins not so long ago, but if there's any role I could fill to help with this issue, I would be more than glad to take it up. The only thing I for sure wouldn't be able to do is hosting or covering the hosting costs, seeing as I don't really have much disposable income.
I agree. We have too much already here to let it die. Of course, in some capacity, everyone is already on some different calc forum, but still.
Also, I would like to point out that if you're looking to find information about user engagement, overall post count would not be the right statistic to use. I would use the unique number of users posting per week/month/year to describe how we have little engagement. One example that proves my point is if only one user posts, but posts 1000 posts, vs having 10 users post 10 posts. 1000 > 100 to be sure, but the latter situation has more engagement.
Wow! Framerate and camera speed look really great! I hope that doesn't change too much once you add more moving parts and data points like units, etc.! I love the isometric style, since it brings me back to playing these games when I was younger. Can't wait to see this release!
Powered by EzPortal