Recent posts by EndlessSporadic on Kongregate

Flag Post

Topic: Game Programming / Update from Web Player to Web Gl

Silly question, but did you already export the HTML5/WebGL build? You can’t just switch what kind of build it is on the website (the wording you used in your question made it seem like you were attempting to do that).

The option to choose your build type is on the very top of the upload form. There are 3 radio boxes that say “Flash/HTML5/WebGL”, “Unity Web Player”, and “Iframe”.

 
Flag Post

Topic: Game Design / A little help here? What's the difference between interactive fiction, choose your own adventure and multiple endings genres?

The plot doesn’t necessarily need to be complex. Your world somewhat does. You need to create an extremely restrictive world but give the illusion that the world is complex. There are many ways to do this. Clearly describing an area when you enter opens up a lot of options for the player. “Examine vase”, “take painting”, “open chest”, “walk up”, “poke flower”, “attack wolf”, and so on and so forth. Any option the player can perform needs to be implemented. There shouldn’t be anything where you type something and the response is “nothing happens”. Of course there are exceptions – typing something like “have sex with cactus” doesn’t warrant a response. For stuff like that you can simply inform the user that the system doesn’t understand that command. My point is this – think about the world you have created and imagine you are adding sprites and graphics for every item in your world. Every single sprite needs to have “examine/look at/investigate”, “take/steal”, “poke/touch”, “attack/smash/destroy”, and “talk to” dialogue written for it at a minimum. Even if the person were to type something like “talk to vase”, you need to have a witty dialogue response for it. That kind of thing is what gives the illusion of freedom and makes your work feel more fleshed out.

Do keep in mind that there is no such thing as real freedom in video games. You can freely move within a certain area, but you can’t go outside the boundaries. In this sense it is no different than a prison and is not true freedom. Don’t think about “freedom” too much, and instead try to build a very detailed world that allows the player to do as much as possible within their restricted space.

Text adventures are widely considered to be video games, though they can also be considered literature depending on who you ask.

 
Flag Post

Topic: Game Programming / Need some help starting out

No problem. Once again be aware that the documentation for the exporting of HTML5 projects is outdated (the documentation was written for 4.7 even though it says 4.9 at the top of the page). In other words, most of the information here regarding the Epic Launcher install is incorrect. To my knowledge you do not need to install emscripten or python. If you aren’t compiling from source the option to export to html5 should be there by default. If you are compiling from source you will need to follow the instructions in the link I provided above (that I said was incorrect) and click on the “Compiling from source” tab.

 
Flag Post

Topic: Off-topic / Rubik's cubes

When I was really into Rubik’s cubes in high school my best time was 24 seconds and my average was around 45 seconds. I got really lucky with my personal best in that most of the center and bottom was already solved. Nowadays I don’t remember the algorithm for the bottom, though I can still solve the top and center as well as the bottom corners.

 
Flag Post

Topic: Kongregate / Found in the office: Legos at Lunch

The endercrow has appeared! Quick, hide your valuables!

 
Flag Post

Topic: Game Design / A little help here? What's the difference between interactive fiction, choose your own adventure and multiple endings genres?

Interactive fiction is very similar to “Choose your own adventure”. Nowadays, the term is most closely associated with what you know as “text adventures”.

Choose your own adventure, in a general sense, is a game that is “on rails” (all books are on rails) but allows players to take different paths along the way. The player is given a choice of pre-selected actions they can perform and the media allows the player to pick among them. “Choose your own adventure” formatted games are often very structured. For all intents and purposes “interactive fiction” is synonymous with “Choose your own adventure” when referring to video games, but the distinction exists when referring to books (since books are not interactive). Unlike “multiple endings”, “Choose your own adventure” does not require multiple endings. For example, all endings in a “Choose your own adventure” can cause the reader/player to die, but at least one ending must allow the reader/player to live in “multiple endings”.

Multiple endings games are a sub-genre of “Choose your own adventure” and allow the player to reach a different type of ending based on their actions throughout the media. Visual novels are a good example of this genre as the player receives a good or bad ending depending on what actions they took throughout. This is even more pronounced with the “galge” genre (dating simulators) as the player can get good or bad endings with one of many different women.

 
Flag Post

Topic: Game Programming / My game won't show up in Kongregate's search bar

It takes time for the server to cache your game for searching. That aside, I think you also need to have a certain rating before appearing in the search results.

 
Flag Post

Topic: Game Programming / Need some help starting out

Stick with Unreal Engine 4 instead of Unity. You have C++ experience and have already dabbled with the engine, and you can fall back to blueprints if you need to (plus I am here as a resource if you need it). Unity will start exporting everything to HTML5+WebGL, and Unreal 4 does that as well. I won’t deny that Unreal is slightly lacking in the documentation department, but that is because the engine is still growing and things are still changing. On the other side of the coin, that makes it a great opportunity to learn more about the engine’s structure and more about programming than you ever could by using Unity.

So, my recommendation is Unreal Engine 4, Visual Studio 2015 Community (since that is what the engine requires/supports – it is free anyway), and export to HTML5.

 
Flag Post

Topic: Game Programming / Game In Ten Days -- Rules on Use of Assets from personal and public libraries

I appreciate the clarification. With the facts that these points were brought up and your desire to clarify and solidify the rules, I think it is also a great opportunity to explicitly relay some basic information regarding the creation of video games at a very high level (even if they are listed in the “how to make games” sticky). Lay out the legal requirements (giving credit, don’t use copyrighted IP, etc…) and clarify what an engine and libraries are (engines are just a bunch of libraries, not applications that end with the word “engine”), and what kind of libraries are not allowed. It may help to go into some detail about the differences between general-purpose code and content-specific code, and perhaps listing some royalty-free resources.

 
Flag Post

Topic: Game Programming / Game In Ten Days -- Rules on Use of Assets from personal and public libraries

As a complete outsider to the GiTD event (/disclaimer) I am surprised this kind of thread needed to be made. Without having context of the events that called for the creation of this thread, this thread brings up a lot of troubling questions (and I ask them seriously, not sarcastically like many of them sound).

1) Are people not aware that copyright laws exist? What makes people think that they can skip giving credit to the original artist just because they say you can use the piece? Similarly, what makes people think they can use assets without the permission of the creator?

2) I’d love to see a single person that participates in GiTD create a game in 10 days without using a game engine. Pretty sure writing fully functional, cross platform rendering code will take you at least a month. Even then, that violates the rule of using content you created before the time period. At what point was it brought into question that using a game engine was off limits? I feel like this point was brought up by somebody who doesn’t know what an engine actually is. An engine is essentially a set of libraries. Libraries exist for a reason – by definition they are precompiled bits of code that can be re-used between multiple programs. Disallowing them is rather silly, and in fact I would encourage them as well as their creators to share them with their fellow competitors to make better games in the future (remembering to give credit to the creator). By the way, HaXe and Flash are engines (though not necessarily of the game persuasion), so whoever brought this point up was shooting themselves in the foot.

3) Better guidelines need to be made regarding what kind of code can and can’t be used if it was created outside of the event period. Programming is an extremely iterative process, and it seems silly to think you can’t bring all of your experience from the previous event into the next one.

4) In regards to people not reading the description or the loading screen – you can’t expect people to do so. If you fail to make your game interesting and understandable in the first 30 seconds that is on you, not the players. Having said that I have no context on why this point was brought up. What do the description and loading screens have to do with the competition?

I’m getting the extremely terrible impression from this thread that GiTD rewards better creators, not creators who make better games.

 
Flag Post

Topic: Game Programming / Need a Balancing Mechanic

- Checkpoints/saves restore x% of your missing health the first time they are activated.
—> Restores more health at lower health, but this is seen as rewarding players for doing poorly.

- Checkpoints/saves restore x% of your remaining health the first time they are activated.
—> Restores more health at higher health, but this makes checkpoints less of a saving grace for players who are doing poorly.

- Checkpoints/saves restore x% of your maximum health the first time they are activated.
—> Restores a flat amount regardless of health, but this can be seen as not rewarding the player based on their performance.

You choose which one fits your needs. Scaling is always less of an issue when looked at from a percentage standpoint since percents always scale more reliably than flat values.

 
Flag Post

Topic: Game Programming / Question - Java

Keep in mind that you will likely need to use a vector then turn that into an array before returning. I don’t know Java that well, but this is a language-agnostic question that deals with what is called array intersection. In your case you are using an even stricter version that restricts true values to the same index instead of the entire array.

string[] Intersection(string[] Array1, string[] Array2)
{
    List<string> ResultArray = new List<string>();

    // Grab the smallest size of the array so we avoid an index out of range exception
    int SmallestArraySize = Min(Array1.length, Array2.length);
    
    // For all items in the smaller array
    for (int i = 0; i < SmallestArraySize; ++i)
    {
        // If the item in the smaller array has the same item in the same index as the large array
        if (Array1[i] == Array2[i])
       {
            // Add the item value to a list
            ResultArray.Add(Array1[i]);

           // If you want the indexes that match instead you can do this.
           // Keep in mind that this and the line of code above are exclusive -
           // do not keep both.
           ResultArray.Add(i.ToString());
       }
    }
    
    // Return the list as an array.
    return ResultArray.ToArray();
}

The number of matches is retrieved by ResultArray.size(). If you want both the index of the match as well as the value you will need to create a custom data structure that holds that information for you (or you can use a KeyPairValue-type pre-existing class).

// Because I am lazy I am giving you code that works but isn't of optimized or proper design.

public class KeyPairValue<K, V>
{
    public K Key;
    public V Value;

    public KeyPairValue<K, V>(K Key, V Value)
    {
        this.Key = Key;
        this.Value = Value;
    }
}

The above method becomes the following:

KeyPairValue[] Intersection(string[] Array1, string[] Array2)
{
    List<KeyPairValue<int, string>> ResultArray = new List<KeyPairValue<int, string>>();

    // Grab the smallest size of the array so we avoid an index out of range exception
    int SmallestArraySize = Min(Array1.length, Array2.length);
    
    // For all items in the smaller array
    for (int i = 0; i < SmallestArraySize; ++i)
    {
        // If the item in the smaller array has the same item in the same index as the large array
        if (Array1[i] == Array2[i])
       {
            // Add the item value to a list
            ResultArray.Add(new KeyPairValue<int, string>(i, Array1[i]));
       }
    }
    
    // Return the list as an array.
    return ResultArray.ToArray();
}

Items are accessed as such:

String A [ ] = {"0000", “T”,“T”,“T”,“T”,“T”,“T”,“T”,“T”,“T”,"T"};
String B [ ] = {"1234",“T”,“F”,“F”,“T”,“T”,“T”,“F”,“T”,“F”,"T"};

KeyPairValue<int, string>[] Matches = Intersection(A, B);

for (KeyPairValue<int, string> Match : Matches)
{
    System.out.println(Match.Key); // The index in the original array
    System.out.println(Match.Value); // The matching value (as a string)
}
 
Flag Post

Topic: Game Programming / I need help with the starling lighting extension

Take a look at this page. It seems to briefly go over how to install extensions.

 
Flag Post

Topic: Game Programming / Question about the Starling

I can’t answer anything related to the Starling framework, but there is nothing wrong with movie clips embedded within movie clips. It does not affect performance outside of the affects of adding another component to the list (which you would do regardless of whether the movie clip was embedded or not). As for causing script functionality issues, there is no issue as long as you are aware of what is parented to what and ensure that the correct layer in the hierarchy is being referenced.

 
Flag Post

Topic: Game Programming / Image is smaller after uploading HTML file

They both look exactly the same to me.

 
Flag Post

Topic: Game Programming / Keep the zombies spread out?

What you want is a modified version of something called a flocking algorithm. It makes it so that objects swarm around a point but also attempt to avoid other units in the flock.

No offense to you, UnknownGuardian, but that lighting model is atrocious. Who needs ambient light, anyway?

 
Flag Post

Topic: Game Programming / Networking...Login

If the server correctly validates user authentication it should send a package back with certain information. Take a look at what Kongregate does. You request the Kongregate API object and it returns an array containing the user’s information, or an error code if something happened. You would do something similar. You send the user’s username and password to your server (or whatever else you need for your credentials), and the server should send back any information you need as well as a code. If the code is a specific value then the login was successful, else it is an error code. Your app checks this code and takes action depending on what it is. If it is a success code you move to screen A and parse the information returned by the query, else move to screen B and display the error.

As for how chatrooms and master servers work:

Chatrooms: the way they work is your server has a text file and the client pings the server at a set interval to send the new lines over. Your client then parses the new data and updates the chatroom view. Any time a user submits a comment it sends that comment to the server and is appended to that text file.

Master servers: Your client will ping the server at set intervals and submit its own state, then it will request the state of all other participants. This is known as “data replication”. Once again you take the information given by the server and parse it and update your game to reflect the changes.

The server never indicates that there is an update to the client in any type of server-client interaction, ever. The clients always contact the server and request updates.

 
Flag Post

Topic: Game Programming / Unity WebGL build not working on Kongregate

- Do you have a possible memory leak somewhere?
- Are you using Kongregate-specific features?
- Play the game and make note of what you are doing when memory usage starts going out of control.

 
Flag Post

Topic: Game Programming / How do you duplicate movieclips with tweens inside of them?

MovieClips are stored as “prefabs”, and any time you drag a new instance out from the library you are creating a shallow copy. This instance simply points back to the original movie clip since it is expected that this object will be consistent with others like it. Just think of bullets in other games. They don’t have a different game object for every bullet – they just create a copy of the bullet object, and to save space they all point to the same space in memory. In order to edit the tween inside you will need to create an entirely new instance of the movie clip and save it as a new entity.

If you are having issues programmatically you will need need to make a deep copy.

private function clone(obj:Object):Object {
	var temp:ByteArray = new ByteArray();
	temp.writeObject(obj);
	temp.position = 0;
	return temp.readObject();
}

More information on shallow vs deep copies can be found here.

 
Flag Post

Topic: Off-topic / Anime Addicts Anonymous (AAA)

I’ve started binge-reading manga recently and the right-to-left format definitely takes some getting used to. As for the reason why:

Traditionally, Japanese is written in a format called tategaki (縦書き), which copies the traditional Chinese system. In this format, the characters are written in columns going from top to bottom, with columns ordered from right to left. After reaching the bottom of each column, the reader continues at the top of the column to the left of the current one.

Modern Japanese also uses another writing format, called yokogaki (横書き). This writing format is horizontal and reads from left to right, just like English.

A book printed in tategaki opens from what a Westerner would call the back, while a book printed in yokogaki opens from what traditionally in Japan would have been considered the back.

 
Flag Post

Topic: Kongregate / How do I undo the flag for review.

You don’t need to do anything. If the comment is inoffensive then no action will be taken.

 
Flag Post

Topic: Game Programming / programming games

http://lmgtfy.com/?q=How+do+I+program+games%3F

 
Flag Post

Topic: Game Programming / Unity, WebGL, Chrome

Note that large project size complaints are due to people including both the compressed and uncompressed directories. The compressed WebGL build will only be slightly larger than the Web Player build by a few MB. The uncompressed build is only required if the server hosting the data does not support compressed files, and to my knowledge Kongregate does. Another thing to note is that the game will only use the full bandwidth the first time. Subsequent loads of the game will only require partial downloads due to caching, and load times will be up to 3 times faster than the Web Player builds because of it.

Check and see whether your test build size is only containing the compressed files. I highly suspect it includes the uncompressed files as well.

 
Flag Post

Topic: Game Programming / Idle game large number system

If you are desperate enough and don’t want to use a library you can create your own number class where each digit is a variable in an array. While it isn’t memory-cost effective, it would allow you to store large numbers.

byte[] Number = new byte[500];

// This is a number with 500 digits.
// Wrap this in a class and add methods to manipulate data.

I highly recommend not doing this, but this is a guaranteed way to get significantly large numbers.

 
Flag Post

Topic: Game Programming / Game In Visual Studio

There are no built-in project templates for web development. You would need to click the “online” tab and search for a web-based one. A quick glance gives me one called “React.js Starter Kit” which says it is a “Web application front-end starter kit built with React.js, Bootstrap. It is a cross platform project template powered by Node.js-based development tools.”