Demon Dreams ( Source Code release! 2015-9-27 )

The place to post Flash-based creative projects.
Forum rules
This forum is for posting and collaborating upon third party Flash work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby DomJoe » Wed Jul 02, 2014 4:31 am

I love the color customization options, but I will voice Bass' sentiments as well: I'd like to see more hair options, more body options, just more physical options in general. Heck, some clothing options would be cool as well. Doesn't have to be complicated, but a little extra goes a long way.

Otherwise, love the art-style, and looking forward to seeing more.
User avatar
DomJoe
 
Joined: Wed Jul 02, 2014 4:21 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby BlueLight » Wed Jul 02, 2014 5:44 am

So hey. I'm working on the project "Gang n` whores" and i just recently put my hands into the mess that we call our code..... Anyways point being; while i'm officially our community manager, i also created this AS3 class (Made this years ago in java) to deal with managing stuff like health. It takes 3 numbers, min,max&value along with a boolean; and then makes sure you can't increase the values above max, or below min.

No idea what you're going to do in your code but this could simplify thing if our code has proven anything.
*Glares at the coders*

Anyways since this is code i made myself and has very little editing done by anyone else; here it is if you want to use it.
Code: Select All Code
package data {
   import flash.events.EventDispatcher;
   /**
    * I REQUEST THAT ANYONE WHO USES MY CODE CREDITS "BLUE LIGHT" AND LINKS TO GNW SUB-FORUMS ON "LEGEND OF KRYSTAL". THIS IS A REQUEST, NOT A DEMAND.
    * @author BlueLight
    * @author Bit (I think)
    *
    * This class is designed to minimize the amount of code is required to maintain most stat variables.
    * We will store 4 variables, a min, current and max; along with a boolean called goHigh. (Might want a better name for that variable.
    * The current can not be below the min, or above the max.
    *
    * It will have at least 8 functions.
    * Get: min, current & max. set:min, current & max. change current, restore current
    *
    */
   public class DynamicNumber extends EventDispatcher
   {
      public static const CHANGED:String = "changed";
      public static const RESTORED:String = "restored";
      public static const MINNED:String = "minned";
      public static const MAXED:String = "maxed";
      
      protected var _minimum:Number; // the min number that current can be.
      protected var _maximum:Number;//the max number that current can be.
      protected var _current:Number;//current or index number.
      protected var _highest:Boolean;//if you restore method, this decides if you set current to maximum or minimum.
      
      
      /**
       * the function has a default value of 0 for min, and 100 for max. These are the values you're most likely going to use.
       */
      public function DynamicNumber( min:Number = 0, max:Number = 100, current:Number = 100, high:Boolean = true )
      {
         
         //set the min and max values. We use Math.min, and Math.max incase the user messes up. Basically bug prevention.
         _minimum = Math.min(min,max);
         _maximum = Math.max(max,min);
         _current = current;
         _highest = high;
         
         //there are designed checks and balances in these methods to make sure variables have the wrong value. Only reason for running all the values right now.
         this.maximum = this.maximum;
         this.minimum = this.minimum;
         this.current = this.current;
         this.highest = this.highest;
      }
      
      /**
       * Minimum value of the dynamic number
       */
      public function get minimum ():Number
      {
         return _minimum;
      }
      
      /**
       * Maxiumum value of the dynamic number
       */
      public function get maximum ():Number
      {
         return _maximum;
      }
      
      /**
       * Current value of the dynamic number
       */
      public function get current ():Number
      {
         return _current;
      }
      
      //returns boolean, highest.
      public function get highest():Boolean
      {
         return _highest;
      }
      
      /**
       * Minimum value of the dynamic number
       */
      public function set minimum (min:Number):void
      {
         //checks to make sure min is more than Maximum.
         this._minimum = min <= this._maximum? min:this._minimum;
      }
      
      /**
       * Current value of the dynamic number
       */
      public function set maximum (max:Number):void
      {
         //checks to make sure max is more than minimum.
         this._maximum = max >= this._minimum? max:this._maximum;
      }
      
      /**
       * Sets the current variable to a new value so unless it's above the max or below the min.
       * If it's below the min, it will set the value to the min, or if it's above the max, it will set the value to the max.
       */
      public function set current(value:Number):void
      {
         this._current = Math.max(this._minimum, Math.min(this._maximum, value));
      }
      
      //just a simple setter for changing highest.
      public function set highest(high:Boolean):void
      {
         this._highest = high;
      }
      
      /**
       * Adds an amount to the current value.
       * @param   value
       */
      public function add(amount:Number):void
      {
         this.current = this._current + amount;
      }
      
      /**
       * Restors the current value to either the max value if highest is true, or the min value if not.
       */
      public function restore():void
      {
         this.current = highest ? maximum : minimum;
      }
   }
}


I'd give you the code in file form but the site doesn't like that.

I do request that you credit me if you use this class as is or modified. However if you don't, then there is no way i'm going to be able to tell you used this.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Terrantor!!! » Wed Jul 02, 2014 6:51 am

Hey, blue. his game is written in as2, not as3, so he may need a translator.
User avatar
Terrantor!!!
 
Joined: Thu Aug 23, 2012 10:36 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby BlueLight » Wed Jul 02, 2014 9:26 am

Terrantor!!! Wrote:Hey, blue. his game is written in as2, not as3, so he may need a translator.

-_- people use AS2...... What madness is this!
-BlueLight; avid C based programmer.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 4:45 pm

Anonymouse Wrote:I'm not really sure what you mean by the tinting issue. It sounds like you are saying that if you want to tint x, and then you change what x is - not change what frame x is on or any property of x, but completely redefine what x refers to - it should keep the tint that the previous x had. That sounds awful, and there's also a really simple workaround - put x into a container, then modify the container. For example say you have three body shapes and you put each one on a frame, and want to tint each one, all you have to do is put those three frames inside a new symbol and tint the new symbol.

Also the issue with "best practices" seems a little redundant, as using AS2 is by no means considered a best practice either. Don't want to use best practices? Then don't. Stick your code on the timeline - it's not like the code police are going to arrest you, and this isn't a good reason to stop using AS3.


I might be really off-base then. That's the problem, I don't remember. And I can't find it again reasonably quickly with google search because Flash has grown so much since the early days of CS3. I was under the impression that in CS3, tinting things is slower, at run-time, than the same movieclip in AS2.

Putting a container around the container in AS3 is not a solution because of the overhead imposed by the AS3 version of the MovieClip class. AS3 made a lot of things faster, cleaner, and more efficient. The Movieclip class was not one of those things.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 4:59 pm

Terrantor!!! Wrote:Amazing Work! I see great potential for this model. Was wondering if you could chop a model up for me and make it animation friendly.


Uh, if the model is already completed, I suppose I can give it a shot. I have a copy of CS3 and CS6, but I don't like using CS6 if I can avoid it because the IDE itself is very slow and unresponsive on this computer. Fair warning, I'm still learning animation, so I may not be the best person to decide where the cuts should go on your model. I'm having problems with the butt/thigh seams, for example. You don't notice it much in the idle animation, but it's more of an issue when I try to pose the model in new ways.

If you already know where you want the cuts to go, actually making the cuts is fairly easy. Just duplicate your full-body vector art Movieclip in the Library multiple times, giving it all the names like Arm, Leg, etc. Then draw individual Lines as Drawing Objects, get them lined up exactly where you want them, then Break Apart, select none, delete anything not part of this body part. Repeat for all the other body parts.

(Of course, that's assuming your original vector art is posed in a way that lends itself to "chopping up" in the first place.)
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 5:30 pm

VintageBass Wrote:OK so I really can't say much in terms of the coding, there was one thing I wanted to say but I never did in my first post... the male has some hanging balls. Not that I'm complaining, having that is a good thing. Plus I don't really mind all that much that the male is using the same figure as the female/herm, considering that there are guys like that and hey why can't incubi look as good as their sister succubi?

Still I am excited about this. I would like to see more options, be it eye shapes, more bangs, breasts and cock sizes, whatever, and if you need help with that I'll be glad to provide. And maybe in writing as well, too... it does depend on what is going on after the character creation.


Yeah, I'm gonna be honest here. The way I implemented the art assets made this project suddenly way more inclusive than I actually planned ahead for. It basically all comes down to laziness. I wanted to get as many different kind of characters out of the same limited pool of art assets. I wanted to add n new jawlines or eyelashs and get n ^ n2 new character designs out of it. When it came time to make a male character, I was like "Oh, hell, why not turn the female character into a male character. Can I do that?" Turns out I could.

So. Why are there herms in the game? Laziness. Why are there black people in the game? Laziness! Why male/male animations? They were male/female animations all along! I just slapped a couple more booleans into the character configuration code and there you go, you can play as a gay dude now if you feel like it.

( So the next time Ubisoft or EA or somebody tells you "waaah, waaah, we can't make inclusive video games, it's too haaaaaaard," just think back to this forum post and tell them that they're full of shit. )

Having said all that, I have no idea what I'm doing here when it comes to drawing dudes. It is well outside my comfort zone and area of expertise. So if the balls look dodgy, you're doing me a favor by telling me they look dodgy. I won't learn anything if you start to say something but then back out and tell me it looks fine. I need to hear the entire comment. I can't guess the part left unsaid, because I might be thinking something completely different, or not thinking about the finer details at all. So the more complete the feedback you can give, the better. Paintovers would be great. I don't know about accepting staight-up content dumps from people because I was hoping to go full Patreon with this later if it starts to feel like I can actually finish it.

Just to be clear, I definitely do plan on adding more eyelash and hair styles. Probably other body types, too. The character editor you see in the OP is meant as a technology test, not a catalog of all the possible options.

Story comes later. I have a vague theme in mind, but that's as far as I'm taking the story until I have some gameplay working and refined to the point where it's fun.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 5:33 pm

DomJoe Wrote:I love the color customization options, but I will voice Bass' sentiments as well: I'd like to see more hair options, more body options, just more physical options in general. Heck, some clothing options would be cool as well. Doesn't have to be complicated, but a little extra goes a long way.

Otherwise, love the art-style, and looking forward to seeing more.


Yup. More options are planned. But I can't do 'em all at once, and right now, the priority is on getting the gameplay and animation systems working.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 5:44 pm

BlueLight Wrote:
Terrantor!!! Wrote:Hey, blue. his game is written in as2, not as3, so he may need a translator.

-_- people use AS2...... What madness is this!
-BlueLight; avid C based programmer.


Haha. Yeah. Sorry about that. I know. Believe me, I know. If I had unlimited time and brain power, and the coding chops to use it wisely, I probably wouldn't even be using Flash at all. I'd be developing some sort of SVG/html canvas thing so I don't even need to mess with wrangling Flash's drawing tools in the first place.

That said, I'm very curious about this code you've shared with me, and I would love to know more. What is the purpose of the DynamicNumber class? I can see how it works (except for the assigning everything to itself in the constructor, that struck me as a bit odd...) but what programming challenge in Gangs n' Whores was it created to solve?
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby VintageBass » Wed Jul 02, 2014 5:49 pm

Bad Idea Wrote:When it came time to make a male character, I was like "Oh, hell, why not turn the female character into a male character. Can I do that?" Turns out I could.

Well as I said, there are males that have a feminine figure so what you have for the male now is fitting and I have no problems with it.

Bad Idea Wrote:So. Why are there herms in the game? Laziness.

Not that there's anything wrong with herms in the game, it's very good.

Bad Idea Wrote:Why are there black people in the game? Laziness!

Again nothing wrong with that.

Bad Idea Wrote:Why male/male animations? They were male/female animations all along! I just slapped a couple more booleans into the character configuration code and there you go, you can play as a gay dude now if you feel like it.

At least it can be done, plus I do like that there is an option for that and really how hard is that supposed to be? All it takes is that, and boom! Plus considering that incubi and succubi tend to go both way, not really carrying all that much for their partners as long as they are getting satisfy, playing as an incubus and targeting only males is a strong possibility. Also it's kinda nice to see more yaoi coming along. :)

Bad Idea Wrote:Having said all that, I have no idea what I'm doing here when it comes to drawing dudes. It is well outside my comfort zone and area of expertise. So if the balls look dodgy, you're doing me a favor by telling me they look dodgy. I won't learn anything if you start to say something but then back out and tell me it looks fine. I need to hear the entire comment. I can't guess the part left unsaid, because I might be thinking something completely different, or not thinking about the finer details at all. So the more complete the feedback you can give, the better. Paintovers would be great. I don't know about accepting staight-up content dumps from people because I was hoping to go full Patreon with this later if it starts to feel like I can actually finish it.

Yeah I'm kinda weird when it comes to my comments. I'm not exactly the best when it comes to constructive comments. Yes his balls do look like they're hanging lower than what normally should be there. While I think it is neat, they could be move up slightly to be about where an average male's should be, perhaps about an eight of the way up.

Bad Idea Wrote:Just to be clear, I definitely do plan on adding more eyelash and hair styles. Probably other body types, too. The character editor you see in the OP is meant as a technology test, not a catalog of all the possible options.

OK, good to know. I am just offering more ideas, and if you are focusing on other things, I'm not going to push the matter any further.

Bad Idea Wrote:Story comes later. I have a vague theme in mind, but that's as far as I'm taking the story until I have some gameplay working and refined to the point where it's fun.

If you do need help with it, I am here to help along with others who are capable to help you out.
"Just because you can put your dick in it, it doesn't mean you can fuck it"
- Nash Bozard
User avatar
VintageBass
Moderator
 
Joined: Fri Mar 22, 2013 3:16 am
Location: Exploring the world of Pokemon

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 5:55 pm

VintageBass Wrote:perhaps about an eighth of the way up


That's the part I needed to hear! Thank you very much. :mrgreen:
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby VintageBass » Wed Jul 02, 2014 6:19 pm

Bad Idea Wrote:
VintageBass Wrote:perhaps about an eighth of the way up


That's the part I needed to hear! Thank you very much. :mrgreen:

You're welcome and sorry about the trouble earlier. It's pretty much me being excited about the project and I want to see it succeed. I'll try to do my best for any other constructive comments when you start showing more.
"Just because you can put your dick in it, it doesn't mean you can fuck it"
- Nash Bozard
User avatar
VintageBass
Moderator
 
Joined: Fri Mar 22, 2013 3:16 am
Location: Exploring the world of Pokemon

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby BlueLight » Wed Jul 02, 2014 9:44 pm

To answer your question; imagen a heath system. The first number you're going to need is a min, followed by max the a unstable value that changes. There are many ways you could implement this in your code; for instance every turn checking to make sure the values all match up. then after that your going to create get and set functions for all those variables so the user does have dirrect control.

Now great, you have a hp system; bit of work but not to much. Now imagen you doing the same thing about 10 more times with little to no change. Suddenly your code is harder to maintain, it's bigger, and your more likely to cause a bug if you messed around with your setter/getter.
-----
Okay you can stop imagining that sucky code. My class does all that but it's only written once. this makes it less likely to cause bugs and with one edit you can change how all the standard dynamic numbers work because it's only written once; but if you need specialized logic, then thats still possible but thats advanced concepts.

Basically this class manages 3 numbers. it makes sure your "current" value is between min and max like any good health or skill system would need. You could even do a gold system. Then you have setter metheds which would pervent min from being more than max or the inverse being true then rechecks if the current value still valid.
Then you also have the restore function which reset the current value at a default value. For instance if you rest at a inn, you'll use the restore function with your heath.

Basically its there to simplify alot of the numbers in rpg so you don't have to rewrite 100+ lines of code and should be used with things that fit with these 3 number systems.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Wed Jul 02, 2014 11:20 pm

I follow you. It makes sense now. In the past, I suppose I would tend to put that stuff into the class that "had health," the player or the enemy or whatever. It never occurred to me to make a special class just for the number itself.

BTW, don't ever open up that fla in the OP. You would want to cry.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby BlueLight » Wed Jul 02, 2014 11:38 pm

so long as you comment your code and don't expect me to do anything with i, then I doubt i'd care.

so the code I gave you was based on a concept we programmers came up with in I believe the 80s..... I think.
It's called object oriented programming.
it realy helps to simplify your code.
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Thu Jul 03, 2014 12:12 am

Yup. Mad respect to Kay and Sutherland. If this were an action game, with tons of arbitrary objects being created and destroyed all the time, I would definitely be writing classes for everything in AS3.

I would also be using Object Pooling. Because, you know. Garbage Collection.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams w/source ( M/F/Herm, Sound )

Postby Bad Idea » Thu Jul 03, 2014 2:10 am

Animation Test now available in OP. I am aware of the awkward pose on the hand, and have a plan to fix it. It is reasonable to assume that I am probably blind and ignorant to all the other little problems with this animation, so feel free to just point out the flaws for me. I can't promise I'll fix everything, but I'll dang well try to fix what I can.

Thanks! :D
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams Animation Test & more( M/F/Herm, Sound )

Postby DomJoe » Thu Jul 03, 2014 5:05 am

I'm no animation expert, but it looks a little stiff to me.

Also, the male has an amusingly fair-looking face. Not saying this is a bad thing, it just amuses me.
User avatar
DomJoe
 
Joined: Wed Jul 02, 2014 4:21 am

Re: Demon Dreams Animation Test & more( M/F/Herm, Sound )

Postby Bad Idea » Thu Jul 03, 2014 1:26 pm

Okay. I'll see about differentiating the male character a little bit more. Thanks.
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

Re: Demon Dreams Animation Test & more( M/F/Herm, Sound )

Postby Bad Idea » Thu Jul 03, 2014 10:50 pm

I updated the animation a bit, DomJoe. Is this an improvement?
Demon Dreams - WIP thread - Because those fantasies had to come from somewhere.
Bad Idea
 
Joined: Sat Jun 07, 2014 5:06 pm

PreviousNext

Return to Flash Projects



Who is online

Users browsing this forum: Google [Bot]