Be a Supporter!

The Flash 'Reg' Lounge

  • 1,648,871 Views
  • 63,936 Replies
New Topic Respond to this Topic
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-16 14:45:18 Reply

At 7/16/13 01:35 PM, Diki wrote: That should just give you more incentive to learn good coding practices.

Yeah, i'm just saying I think that's what we're afraid of. At least, that's me to some degree. I can't speak for everyone.
I think I just don't want to say "hey, i'm a terrible programmer" because this is the thing i've dedicated my life to :P

At 7/16/13 02:39 PM, Rustygames wrote: Wait what? That came out of nowhere! What happened?

Somebody much weaker and shorter than I decided to try and punch me for some reason, so I hit him back a few times.
Nothing terribly exciting, I just haven't used my fists in quite a few years, so it's out of the ordinary.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-16 15:44:04 Reply

I'm reading gamasutra articles while my java teacher drones on, and the most recent page and a half are very interesting as far as game dev and design. Much more interesting than topological sorting, which he still hasn't actually defined despite doing an example.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-16 16:16:07 Reply

At 7/16/13 03:44 PM, MSGhero wrote: I'm reading gamasutra articles while my java teacher drones on, and the most recent page and a half are very interesting as far as game dev and design. Much more interesting than topological sorting, which he still hasn't actually defined despite doing an example.

this is one of the best things i've ever seen for sorting algorithms. I loves it :3


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-07-16 17:15:04 Reply

At 7/16/13 04:16 PM, egg82 wrote:
At 7/16/13 03:44 PM, MSGhero wrote: I'm reading gamasutra articles while my java teacher drones on, and the most recent page and a half are very interesting as far as game dev and design. Much more interesting than topological sorting, which he still hasn't actually defined despite doing an example.
this is one of the best things i've ever seen for sorting algorithms. I loves it :3

That is the coolest illustration of sorting I've ever seen. I will be bookmarking this! I've not done many sorting algorithms, but it's exciting to see it is such a complex and wonderful problem! Awesome link dude, I don't do this often but... you've earnt this

The Flash 'Reg' Lounge


- Matt, Rustyarcade.com

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-16 17:29:44 Reply

At 7/16/13 05:15 PM, Rustygames wrote: That is the coolest illustration of sorting I've ever seen. I will be bookmarking this! I've not done many sorting algorithms, but it's exciting to see it is such a complex and wonderful problem! Awesome link dude, I don't do this often but... you've earnt this

yay, I has internets :3

Anyway, yeah, ever since I linked that i've been working on a static sort class for GameWork. I'll need to work on a search class as well o.o


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-16 18:18:17 Reply

on my quest for a 3-way quicksort algorithm, I found this Java code. Probably some of the most beautiful code i've ever seen. VERY clean.

private static void sort(Comparable[] a, int lo, int hi) { 
    if (hi <= lo) return;
    int lt = lo, gt = hi;
    Comparable v = a[lo];
    int i = lo;
    while (i <= gt) {
        int cmp = a[i].compareTo(v);
        if      (cmp < 0) exch(a, lt++, i++);
        else if (cmp > 0) exch(a, i, gt--);
        else              i++;
    }

    sort(a, lo, lt-1);
    sort(a, gt+1, hi);
}

Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Toast
Toast
  • Member since: Apr. 2, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-17 06:10:26 Reply

At 7/16/13 06:18 PM, egg82 wrote: 3-way quicksort

what do you mean by that?


BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 09:59:44 Reply

At 7/17/13 06:10 AM, Toast wrote: what do you mean by that?

http://www.sorting-algorithms.com/quick-sort
http://www.sorting-algorithms.com/quick-sort-3-way

:P

condensed version written by a man who hasn't had his coffee yet:
The three-way sort is MUCH better than the two-way when up against arrays with very few unique values (in fact, it's the best out of all of them) but uses more overhead to get the job done. The three-way partition is pretty much equal to or better than the two-way partition in every way.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 10:26:58 Reply

At 7/17/13 09:59 AM, egg82 wrote:
At 7/17/13 06:10 AM, Toast wrote: what do you mean by that?

actually, that could be better explained as you probably want to know what a quicksort does, anyway.
A quicksort takes a value and puts everything in the array greater than that value farther down the list, and everything less than that value farther up the list, meaning the runtime is log2(n)
A three-way quicksort does this with two values instead of one, which results in a log3(n) runtime but more overhead.


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
FlyingColours
FlyingColours
  • Member since: Jul. 3, 2011
  • Offline.
Forum Stats
Member
Level 06
Programmer
Response to The Flash 'Reg' Lounge 2013-07-17 11:27:39 Reply

At 7/15/13 01:04 PM, MSGhero wrote: I'm glad my misery is of some use to you. The way I'm doing it now is that I have a couple States (battle, cutscene) and then a bunch of Managers (state, dialogue, child index, etc) and then the main engine. P helped me a bit here, basically you make the managers public then pass a reference to the engine throughout instead of using static classes. It's sooooo organized. The issue I'm having is that there's so much to add, idk what to work on =S

Clock day RPG? That could be...interesting.

I'm not really making a clock day RPG, just a series of battles with RPG stats. However, I do plan to make an actual RPG in the future, and I'll certainly ask you for help then! :P What do managers actually look like, though, and what do they do other than passing values to the main engine?

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 12:27:21 Reply

At 7/17/13 11:27 AM, FlyingColours wrote: I'm not really making a clock day RPG, just a series of battles with RPG stats. However, I do plan to make an actual RPG in the future, and I'll certainly ask you for help then! :P What do managers actually look like, though, and what do they do other than passing values to the main engine?

Anything. Mine have public methods like...
TileManager: createLevel, getTilesInRange
MoveManager: pathTo, skipPath, dispatches movecomplete
DialogueManager: initDialogue, formatDia, inDialogue, dispatches diabegin and diaend, has a sprite to add to display the text field and buttons
ChildManager: the engine has overridden add/removeChild which calls add/removeKid and reorderKids. Order is determined by what got added first, so the order of initializing managers matters in some cases.
StateManager: swapState - states implement IState which has init,dispose,enter,exit,update,render
And the Engine class just calls stateManager.update and render which calls currentState.update and render

Everything gets added to the engine, addChild and addEventListener. Engine is the only class I have that extends anything (states have a sprite property that gets addChilded); the states just implement an interface. I'll upload some stuff later, maybe start a git repo :O

My code isn't that interesting, though...and I need a cooler name for my pathfinder
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 12:41:20 Reply

At 7/17/13 12:27 PM, MSGhero wrote: Everything gets added to the engine, addChild and addEventListener. Engine is the only class I have that extends anything (states have a sprite property that gets addChilded); the states just implement an interface. I'll upload some stuff later, maybe start a git repo :O

Go for it! I was thinking about starting a repo for my framework, but in all honestly I don't think it would be well-documented enough to release. Plus, there's a bunch of stuff in it that would make you scratch your head, but I REALLY like having a lot of control over my program, so I put it in anyway.
So, i'll probably just use it for personal projects, even though it'll cover just about everything you'd need for games (hopefully)

Also, really? My engines are the only classes I have that DON'T extend anything - as far as classes that need to always be directly involved in every game, anyway. Hell, even my state classes extend GWSprite so you can add stuff directly to them easily.
I skipped Flixel's group class and directly put the functionality into GWSprite because it's just easier to me.

My code isn't that interesting, though...and I need a cooler name for my pathfinder

I'd take clear, concise names over cool names any day, but if you can find a cool one that describes what it's doing, then go for it


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 13:44:55 Reply

At 7/17/13 12:41 PM, egg82 wrote: Go for it! I was thinking about starting a repo for my framework, but in all honestly I don't think it would be well-documented enough to release. Plus, there's a bunch of stuff in it that would make you scratch your head, but I REALLY like having a lot of control over my program, so I put it in anyway.

The managers I have are all project-specific, so idk how useful it'd be to include any of them, and they don't necessarily have anything in common with each other to warrant extending or implementing.

Also, really? My engines are the only classes I have that DON'T extend anything - as far as classes that need to always be directly involved in every game, anyway. Hell, even my state classes extend GWSprite so you can add stuff directly to them easily.

Engine is my document class, so it has to extend Sprite. In IState.enter() it adds any graphics and listeners to the engine. I mean it could extend Sprite, but I like how the code flows now.

Pathfinder3D is lame... AStar3D? CoolStar3D?

Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-17 14:15:42 Reply

You fancy fellas. I don't think I've ever reused a class from one project in any other, I usually just start from scratch and occasionally I think "hmm actually I already wrote 5 lines just like the ones I'm thinking of" so I'll go back and nab something out, but that's about the extent of it, sloppy I know but ech. As a result I guess I never bother with package structure and stuff. I just stick everything in a 'source' or 'src' folder and call it a day.

More importantly, I'm having a hard time creating a hash file out of a ttf, it's the only gripe I have with this so far but it's enough to wind me up, keep getting this no matter what I change.

neko /Users/Mike/Downloads/hxswfml.n ttf2hash /Users/Mike/AddingText/Assets/steelfishrg.ttf -glyphs 32-126
Called from ? line 1
Called from be/haxer/hxswfml/Main.hx line 239
Called from be/haxer/hxswfml/FontWriter.hx line 315
Uncaught exception - Invalid field access : flags

nobody

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 15:11:05 Reply

At 7/17/13 01:44 PM, MSGhero wrote: Pathfinder3D is lame... AStar3D? CoolStar3D?

What about just "Path3D"?
Though that sounds more like a class name than anything else.

also, I finished this and this yesterday


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 17:06:00 Reply

I don't know what I'm doing.

Also, twitter is the only thing I've tried to sign up for where my username was already taken. I wonder if checking if that account has been deleted is actually keeping it active...

Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-17 18:21:51 Reply

I found a temporary solution but I can't help but wonder why there isn't more documentation or a more active community.

Anyway, it's nice to see this thread has gone back to being fairly active, even if I can't really participate in most of the conversation. I guess the only solution is to keep trying to start my own!

Scaling games
So if you have a game that's running at say 640 x 360 and you have a fullscreen option, which would you make the default:

Scaling exactly to the largest integer multiple of the size that the display can handle ie on a 1366 x 768 display the game doubles to 1280 x 720 with the content centered.
or
Stretch that shit out so that it fits the screen (but keeps aspect ratio, of course)

My problem is that for the example on the former it looks fine but if the display is just under the tipping point for the next scale up there's a ridiculous amount of black space around the game, like, more space is empty than full. If I fit it to the screen though things look really weird, so for example with a pair of 2x2 pixel eyes one might look 2x2 and the other will look 1x2, apply this to everything on screen and it's almost vomit inducing, but then of course if I magnify linear...ly(?) Shit gets all blurry of course and that just does not fly.

Then of course theres the final option which is to straight up change the base size according to the display, so on a 1152 x 720 display I'd change the viewable area to 576 by either 360 (which messes up the aspect ratio) or 324, which preserves the aspect ratio but reduces the viewable area from 90% to 81%, and I feel like that's unfair?

Now to go and pray for a reply

nobody

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 18:42:27 Reply

At 7/17/13 06:21 PM, Innermike wrote: My problem is that for the example on the former it looks fine but if the display is just under the tipping point for the next scale up there's a ridiculous amount of black space around the game, like, more space is empty than full.

How often/at what sizes does this happen? If you know the player's resolution will cause a lot of empty space, you could do the stretching thing instead or let the aspect ratio change, and there's always a chance/guarantee it looks worse to you than it will to the player.

swishcheese
swishcheese
  • Member since: May. 12, 2007
  • Online!
Forum Stats
Member
Level 14
Programmer
Response to The Flash 'Reg' Lounge 2013-07-17 20:31:30 Reply

At 7/17/13 06:21 PM, Innermike wrote: I found a temporary solution but I can't help but wonder why there isn't more documentation or a more active community.

I have not tried this, but just off top of my head thinking it might help out with making things still look good when fitting to the screen. It would be pain in ass tho.

What if on all the objects/player/pictures you have a xScale and Yscale variable. so width and height of the object will change based on that variable for every object in your game. Then based on the players screen size adjust the x and y scaling variables accordingly?? Have not gave this much thought, just a quick thought. So dont hate if this is bad plan.


BBS Signature
Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-17 21:10:47 Reply

At 7/17/13 06:42 PM, MSGhero wrote: How often/at what sizes does this happen? If you know the player's resolution will cause a lot of empty space, you could do the stretching thing instead or let the aspect ratio change, and there's always a chance/guarantee it looks worse to you than it will to the player.

Hmm, I'll probably end up asking the player what they want, but then the explanation would have to be concise and effective for the choice to mean anything, gah. I guess I probably will end up changing the aspect ratio or some shit, yuck.

While I'm at it, what's your experience with openfl and fonts? (particularly html5 if applicable)

At 7/17/13 08:31 PM, swishcheese wrote:
At 7/17/13 06:21 PM, Innermike wrote: I found a temporary solution but I can't help but wonder why there isn't more documentation or a more active community.

This was actually referering to my previous post about openfl font URI embedding haha

What if on all the objects/player/pictures you have a xScale and Yscale variable. so width and height of the object will change based on that variable for every object in your game. Then based on the players screen size adjust the x and y scaling variables accordingly?? Have not gave this much thought, just a quick thought. So dont hate if this is bad plan.

If the sizes changed you know the positions would have to aswell right? Even then it wouldn't actually change anything except a whole bunch of unnecessary processing (still can't spell either of those words first try dammit).


nobody

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-17 22:12:17 Reply

At 7/17/13 09:10 PM, Innermike wrote: While I'm at it, what's your experience with openfl and fonts? (particularly html5 if applicable)

I actually haven't used fonts yet with the openfl project. I know there's Assets.getFont(), not sure how applicable that is to html5.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Supporter
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-19 12:59:16 Reply

*pokes the lounge with a stick*
You think it's alive? o.o'

Been working on getting a D&D campaign set up with my friends. Kinda fun, actually :P


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-19 14:12:41 Reply

At 7/19/13 12:59 PM, egg82 wrote: *pokes the lounge with a stick*
You think it's alive? o.o'

Been working on getting a D&D campaign set up with my friends. Kinda fun, actually :P

That was the part of the heartbeat where nothing's going on. We wouldn't want tachycardia of the lounge.

Kirk-Cocaine
Kirk-Cocaine
  • Member since: Aug. 17, 2003
  • Offline.
Forum Stats
Moderator
Level 38
Programmer
Response to The Flash 'Reg' Lounge 2013-07-19 16:07:38 Reply

I don't know if this has been posted here before, but ya'll need to go check out the_coding_love(); right now.

Also Hello.

The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature
VoidForce
VoidForce
  • Member since: Dec. 18, 2012
  • Offline.
Forum Stats
Member
Level 18
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-19 16:15:46 Reply

At 7/19/13 12:59 PM, egg82 wrote: *pokes the lounge with a stick*
You think it's alive? o.o'

Been working on getting a D&D campaign set up with my friends. Kinda fun, actually :P

Got my first sesh in almost a month with my friend on Wednesday. They just finished the first of the main storylines I'd set out for them, now to stall with a random adventure or two until I think of another one :D Gives them a chance to build their characters a bit too though, I always fall into the trap of writing something that's exciting, but realistically above their level.

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-19 16:33:51 Reply

At 7/19/13 04:07 PM, Kirk-Cocaine wrote: I don't know if this has been posted here before, but ya'll need to go check out the_coding_love(); right now.

Also Hello.

This too.

Hello
Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-20 12:09:20 Reply

Been browsing http://meetup.com looking for developer conferences in London to network, hopefully get someone drunk and convince them to hire me. Or take one of their family members hostage, I dunno. My CV is totally empty, I have no references or qualifications aside from 3 AS levels (so nothing useful). I'm thinking maybe if I make a flashy enough canvas site (pun not intended) I can use that as a distraction from what a clearly bad idea it is to hire me or give me an internship. Also, about internships, all the ones I've seen so far seem to require that you have a university course lined up, well... shit.

Anyone ever got a job out of just hanging around places? It seems like a parsec-long-shot but it's better than nothing.

People are probably getting sick of this topic... oh well.

Also omg hi kirk.


nobody

VoidForce
VoidForce
  • Member since: Dec. 18, 2012
  • Offline.
Forum Stats
Member
Level 18
Game Developer
Response to The Flash 'Reg' Lounge 2013-07-20 12:27:30 Reply

At 7/20/13 12:09 PM, Innermike wrote: Anyone ever got a job out of just hanging around places? It seems like a parsec-long-shot but it's better than nothing.

I'm sure it wouldn't be your favourite option, but the job centre have been really helpful to me. Put me through my personal training qualification (funded two other course myself to show them I was serious), got me a six month placement which ended recently and are still helping me look for a full-time position in a gym somewhere.

I know it's a different field to programming, but if you'd be interested they could help fund courses or find placements to help build up your CV.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-07-21 08:06:08 Reply

At 7/20/13 12:09 PM, Innermike wrote: Anyone ever got a job out of just hanging around places? It seems like a parsec-long-shot but it's better than nothing.

No that's not gonna work ;)

Which companies have you sent a CV to?


- Matt, Rustyarcade.com

Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-07-21 09:38:10 Reply

At 7/21/13 08:06 AM, Rustygames wrote:
At 7/20/13 12:09 PM, Innermike wrote: Anyone ever got a job out of just hanging around places? It seems like a parsec-long-shot but it's better than nothing.
No that's not gonna work ;)

At least I'll meet some new peeps right? I figured talking to people would be helpful at least in absorbing some experience.

Which companies have you sent a CV to?

I think any sort of full thing is off limits right now so I'm eyeing up this seemingly gettable internship here and this one too.

This thing is looking sparse though http://innermike.com/CV.html :(

Please teach me o wise one.


nobody