What's new

Hive World Alpha Unity, text RPG.


OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: KoL Unity, text RPG.

My lazziness level is lowered again.


This should work and it's all in zip file for you all.

This quote is for pure archiving reasons
Hello, i am blue light and i'm coding a CoC like game. I hate saying "CoC" like since i personally don't like this feeling that i'm degrading my own ideas and can't be creative. Anyways, down to the meat of my idea.

Latest project, pictures


Setting​
The future comes faster than anyone can expect. in a span of 40 years, we moved for propeller based aircraft, to jet, to rocket ships travelling to the moon. from the year 2000, to 2100 the human race learned and mastered the ability to nullify mass, making faster than light travel possible. With this advancement came exploration of space and colonization of new worlds.

It's the year 2167 and you, have been sent to a small colony that was founded in the year 2081 The colony is a huge dome that sits on this worlds rocky surface. In theory the dome should be transparent but it look like a frosty yellow. The colonist broke away from earth so they may pursue scientific breakthroughs that were being held up by the legal reason on earth. For the most part it was left alone; except for one instant where empire civilians were tricked into a vacation, only the passenger liner disappeared; no one from that flight has ever been heard from again. All inquires by the empire have been denied

You job is to investigate the surrounding area for a group of civilians and if need be, enter the dome; your to leave the instant you notice hostile forces and to call drop carry just a day away. Contact was lost just 2 weeks ago and they are assumed dead. Their last broadcast had them reporting in, that they were about ready to drill into the dome.

Your search turned up nothing. No bones, no sign of a fight, no drilling equipment and no damage to the dome. The only clue you have is one set of tire tracks from the main campsite leading to a entrance of some type.


What can you expect for this game?​

Well my plans as i said is to make a game like CoC. The huge difference i think is the fact i'm likely to go with a more sci fi approach to this, but i'm also going to try to keep the game play simple and reasonable. One of the let downs to the latest CoC updates is these events that are 3 or so pages long. Look, it's nice to have a lot of content but when you get to 3 pages long it starts to become a chore.

The monsters/enemy i will provide will contain mutants which i'm hoping to provide a couple different kinds, all with their own text for sexual events.
Escaped science experiments like tentacle monsters, goo, and breast sucking bugs.
I also thinking of doing some Robots who might try to pump you full of drugs and suck every liquid they can, out of you.

You will go into this game armed to the teeth, however it might be foolish to equip your best equipment.
You'll be given some body armor and two types of guns.
You armor can be broken over time and the guns will run out of ammo.

I have a fetish for character covered in stuff, for instants cum or goo so i'm hoping to have a liquid mechanic where your character can be covered by several types of liquids. However this is right now on the back burner if anywhere and will likely be added at a later date.

I do have a mechanic where you can filled containers with liquids. Mixing liquids is possible and will provide you with the benefits of both liquids.

Right, alot of this is just ideas floating around in my head.


-Blight

P.S. sorry for spelling or grammar errors. But i'm tired as all hell. NITE
 
Last edited:
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

I have no clue if anyone cares about my project anymore but right now i'm restructuring how my events are handled; so they're more modular with how everything else is/will be handled like Minigame or combat. This is a required change since my old code was a work around more than anything.

I'm also splitting up my code so i have my engine code, and then what changes to that code are happening for the program.
As you can guess, all these changes have broken my program but that's to be expected. I hope to have this fixed in a few days.

I got the basic implementation of my first drinking/mini game done but it needs work since the code for turning it off doesn't exactly work correctly; and to fix that, i need to fix the event handling code. I also need to program the logic.

I have references calls going out from my GUI which isn't exactly a problem but a GUI has one task; to display information; so it's wise for you to feed it information verse having it gather data. It makes for a cleaner GUI and simplifies the code for something this complex. Right now all it's doing is checking a Boolean variable and calling a method but I'd like to completely remove those calls.

Next i guess i'm working on the player; which means i'll be working on a entity class first.
 
Last edited:

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

I do have a subscription to the thread, if that counts as "caring".
Also, it's good to hear something about this... Even if it isn't that much anyway.
 

AngelKara

Sex Demon
Joined
Dec 14, 2010
Messages
277
Reputation score
13
Re: Hive World Alpha Unity, text RPG.

Sounds interesting to me.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

So one of the problems i right now have is that i need to basically turn on a mini game; stand back; then once done, i need to get a value. Generally there is no nice programming way of doing this because i have to build my code to understand the concept of when the mini game is done then teach it to flip my logic code on again.


How my code works right now, i press a button which sends a single to a decoder which figures out a numerical code for my buttons; then it runs the correct logic which will activate my minigame but nothing else. This part of the code has died.
Once the mini game activates, the game engine itself will handle the running of it automatically until deactivated. Once the minigame has won or loss, i have to basically figure out a way for the minigame to return a value to my original logic code and restart it.


If this sounds complex, it is in a very bad way. Basically think about it this way, i call you up and ask for a glass of water. you then have to tell your water company to turn on the tap when they fixed something, then you can come to me with the water.

Now how can we fix this problem which is overly complicated and isn't helped by me explaining it all while i'm playing PayDay2?

Taking from my water problem before, what i need to do is create a system where i call you up, you turn on the tap and wait for the water to come, then you give it to me. Remove the water company from the equation even though it still exist.

So here's how i implement that. So before when i activate the mini game, now i'm just going to ask the minigame for a variable. i will implement the code for activating the mini game into this getter function. since the variable i want doesn't exist yet, i'm going to put this line of logic to sleep until the minigame finishes it's logic. I just continue the logic to do what ever i want.
Basically i'm calling you up and asking you to bring me water when the company fixes a problem.

If this still seems complicated, let me state that it's kinda beautiful.


Now to figure out how to implement it in code. What this requires is threads and the understanding of them, which i kinda don't. I know how they work (to degrees) but not how to use them.
 

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

I can't give specific help without seeing the code and context, but what I got that you're trying to do is have a script do something to some other script, right?

You can either link the two scripts so they have a reference to each other if they're already existing in the scene, or find the object with the component of the script then catch a handle to the script itself. I don't know if I explained myself right.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

So referencing eachother is a valid option and what i was trying to do originally but i dislike it because it involves the programmer (anyone but me) to understand how my code works to re implement the mini games.
Basically the logic is all screwy this way.
However doing research, it seems that unity code isn't thread safe which i can which wont cause any problems.
I'm trying to build this as an engine, that other programmers can use, so i'm trying to keep things neat and clean.
 

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

Don't do that. Don't "try to build this as an engine", you either build a game or an engine, but I can't see it end up working out if you try both.

If you make a game, you'll eventually find a simple way to connect the minigames as you do more of them, but if you try to make an engine, you'll also have to go back when you find a better way.

Focus in making the game, and when you finish, you'll have something a few optimizations short of an engine.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

What i'm doing is making my code reusable.
I doubt what i'm doing fits the definition of engine since my code forces you to implement your own code but gives some base classes with base logic.

The word engine aside, the problem with your suggestion, is that i don't want to maintain that code because how things are structure, it will get mess.
 

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

Oh, that's different then. I'd try and suggest another way, but as I said earlier, it's kinda hard making suggestions without seeing what's on your code and in your head.
I'm sure you'll find a way though.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

and now it works again if i completely remove all the code.... not just comment it out; because that ton of sense.
EDIT EDIT^
Did you know Debug.LogError(); doesn't like it when you use a another
Well for some reason the bug popped it's ugly head again. I hate this part of programing. When you fix something and then you change your code in some small way and everything breaks.

EDIT ^

thread? It will not run the code and it's so strange. But Debug.Log() works just fine.

So i had a strange bug where i couldn't run some of my code through this new thread I created. The strange part was when it reached a ifstatement i had. Now the ifstatement just checked if a GUI object did exist, and if not threw a error. Since inside the if statement i used "Debug.LogError()" any code afterwards wouldn't work. What's so strange is that this code was never called so in theory there was no reason for a error to be called.

So the moral of the lesson? Unity is not thread safe and user beware whenever calling stuff from the unity library.

All fixed and right now having my group of tester monkeys telling me about any and all bugs.
 
Last edited:

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

Just a quick question: Why would you need multithreading in a text rpg?
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

So i can use a gimmick of the sleep function.
I'm pausing the return of a object. It was my simple solution that simplifies my code greatly.
 

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

Can't you do that with a coroutine? Multithreading kinda sounds a bit like overkill.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

I come from Java and never even heard anyone mention it there much less seen it on list of keywords.

I know it's a thing with C# but i just don't know enough at this time to even attempt implementing it. Hell i thought it was a thing related to threads.
 

barreytor

Tentacle Monster
Joined
Mar 28, 2014
Messages
349
Reputation score
23
Re: Hive World Alpha Unity, text RPG.

As far as I know, a coroutine in Unity is just another way of defining (and calling) a function so it does whatever it does without waiting to finish before returning. , and it's basically what you'd do with a Java thread.

I guess I just probably misunderstood something along the way until now.
 
OP
B

BlueLight

Demon Girl Pro
Joined
Dec 9, 2012
Messages
159
Reputation score
15
Re: Hive World Alpha Unity, text RPG.

Whats happening is when i click a logic button, i create a new thread which runslogic.
Now i really don't need a thread for my logic since i've already got it working with the main game loop. However i noticed that there are 2 singl ways to turn off my minigame since it relies on variables in both logic and minigame classes.

First is to have the minigame after it's completed to clean up it's variables, then to call a function in the logic class to clean up the logic variables, and restart the text part of the game some how. I found this impratical since a lot of errors can happen if a user overrides the wrong class and doesn't understand the inner working of the classes. You also have errors if you are just trying to change how the logic works because everything tied together in an oddway

Second is to use the game loop to check every second if a minigame is active, then if not and it was last frame, start resetting the variables in logic and assue mini game reset it's own variables when it stopped. I kinda like this solution but we're going to be checking something way to much to make sense.

Now what i'm doing is creating a thread just so i can, put to sleep which is also strange and has possiblity of bugs.

To make this simple as possible, what i am right now doing is calling a function in minigame that will turn it on and put the current nongame loop thread to sleep before it's able to get back to,logic. Once the game loop takes over the the player has to get to a end condition which will turn off minigame and wake up the other thread. I like this solution because i don't have to attempt recalculate what happened after a mini game, i can just add the calculations to the main logic.
 
Top