Announcement

Collapse
No announcement yet.

Real Flash Quake

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MadGypsy
    replied


    It's a done deal. wpl files are now supported. The wpls that Windows Media Player creates need to be opened and have all paths changed to absolute full system paths but, other than that, local music is now supported. The same super simple info panel that gives station details, flashes the song title (actually the filename minus path and extension) when the songs change. My text in that image is at about half fade/transition. It turns a deep blood red and disappears.

    I made the less-than and greater-than keys the previous/next buttons for wpl playlists. My stream player worked out the box for playing local mp3s. I didn't have to do anything but explain to the player the difference between a pls (one address and title to play) and an wpl (many addresses and titles to play). You can mix and match wpl and pls all day long in the playlists.zip.
    Last edited by MadGypsy; 09-21-2016, 11:03 PM.

    Leave a comment:


  • MadGypsy
    replied
    @agreed. this is my favorite thread at the moment. some real juicy shit here

    Thank you.

    edit:

    Windows Media Player playlists are gonna be a breeze to parse. It's xml. My content manager already uploads xml as an instance of xml. I just need to add .wpl to the extensions list and explain like 10 keywords.
    Last edited by MadGypsy; 09-21-2016, 09:06 PM.

    Leave a comment:


  • MadGypsy
    replied
    This is not Haxe. It goes like this:

    I started this project in flash and I wrote the proof of concept code
    I restarted this project in Haxe and wrote much better code based on the proof of concept code
    I came back to flash to port my better haxe code over and in the process I added a shoutcast player, upgraded the content manager even more than the haxe way and "scribbled down" some other ideas in the code

    This is currently flash.

    EDIT: ooooh riiiight..but it's an .exe. Yeah, that's just AIR/Flash wrapped in an exe. It's still just flash. I do it like that so nobody has to install AIR to check out my thing. If it was haxe all that META/mime/Adobe AIR shit would be replaced with a couple .dlls


    The next step, after I stop doing stuff in the flash version, is to go to haxe and upgrade that script to match the additions to the flash one. Then I'll make stuff happen in haxe and eventually go back to flash to port my changes on and on and on. It has to be like this or I will never finish. Haxe and flash are different enough to be the "other" language I'm doing something in. I've always tried to keep more than one language to work in. That was the only appeal web programming had for me html,css,php,sql,js there was always another language to do some work in. I even switched to hta just so jscript,bat,vbscript and a number of other languages could be used. When you spend the time to learn a shit load of languages it's nice to be able to use as many and whichever that you want.

    Now, I know that Haxe makes flash ports and I know that often they even get better performance. I am an AS3 programmer (if I'm choosing my "default" language). I want my flash port to be written by me, not a compiler. Also, by going back and forth like this, stuff I messed up that I can't figure out in HaXe, I end up figuring out in AS3 and then I just port that back over to haxe. All this "port" talk is by hand. No scripts, macros, none of that.

    I am however not finished porting the haxe version to AS3. My Haxe engine does a bunch of other stuff that my flash one doesn't do yet. Like replacement textures, working sky shader, normal maps...other stuff.

    Oh BTW... I made my player class a completely independent package. It now handles all of it's business internally (ie KeyDown events, the info field, etc..) now you just put an instance on the stage and if there is any music to play, it'll play it. I also reworked the transition for the info field. It now changes from almost white to a bright red while it fades out. It is never shown as a bright red due to how much it has faded at that point but, it adds 1 more second to readable time. The transition (mostly) means that at some point before it fades, no matter what your background is, you will be able to read it. My transition is really smooth.

    This is all it takes to add the entire shoutcast player to any project
    Code:
    //playlist
    if (ImportManager.getPlsCount() > 0)
    {	_ip = new Player(stage);
    	addChild(_ip.infoField)
    }
    "ImportManager" is just "ContentManager" renamed since I have ExportManager now, too.
    Last edited by MadGypsy; 09-21-2016, 08:36 PM.

    Leave a comment:


  • Dutch
    replied
    Originally posted by nahuel View Post
    great work here madgipsy!!
    agreed. this is my favorite thread at the moment. some real juicy shit here. I like seeing what you're doing with haXe. I know i said i would jump into haXe forever ago but real life won't slow the fuck down. pretty neat to see what someone else is doing with it for the time being.

    Leave a comment:


  • MadGypsy
    replied
    I made a really subtle notification that tells you what station you are on. If anybody is interested the link is below. Aside from the notification and me suppressing the stats window for this build, it is no different than the last link I posted.

    noclip around e1m1 and listen to music

    For those that are curious about the notification but don't want to download stuff to check it out


    when you hit space(as play), back or next - a little message like the one at the top of the image appears and immediately starts fading away. The data is simply the Title data from the pls. It's readable for less than 2 seconds.
    Last edited by MadGypsy; 09-22-2016, 02:26 PM.

    Leave a comment:


  • MadGypsy
    replied
    Thanks Nahuel!

    To save people some time on these 33 stations:

    almost ALL OF IT is a variation on the first station you hear. Some of it's slower, some of it is faster but, it's all the same shit (basically and with very little exception). I'm telling you this so you don't waste time looking for a rock or jazz or metal etc... station. If you want that go get a pls and ignore my default stations. You can delete any/all of the pls's. Just don't delete the playlists.zip and obviously, make sure you put your pls in the playlists.zip.

    I got the idea for this when I realized I'm just one guy building an engine and a game. I am cheating and letting already established radio stations provide the soundtrack, instead of having to make all the music myself. Which is also why I need to parse WMP playlists. I'll give the user so many ways to get music that they'll forget I was supposed to make the music.

    EDIT!

    It's been brought to my attention that you can easily switch the map. Just go get a map, rename it e1m1.bsp and overwrite the e1m1.bsp in test.zip. Note that whereas my engine does properly parse BSP2 and 2PSB the current map limit constants are too low to let 2psb or bsp2 load. So, can you load a bsp2 or 2psb? Sure, as long as it falls within bsp29 limits...lol. So, you can load every bsp2 or 2psb that used the format for no good reason. :laughing: so like, none of them or so.
    Last edited by MadGypsy; 09-21-2016, 04:12 PM.

    Leave a comment:


  • nahuel
    replied
    great work here madgipsy!!

    Leave a comment:


  • MadGypsy
    replied
    @mindz - just for you

    noclip around e1m1 and listen to music

    controls:

    mouse+LMB:freelook
    Left/Right: strafe left or right
    Up/Down: move forward or backward
    Spacebar: Play/Stop music - whichever one is the opposite of its current state
    N: next station
    B: previous station

    e1m1 is hardcoded by filename into the engine so... you can't switch the map. Well, you can switch the map, just not in this port at this time. You also have no way of knowing what station you are listening to. There are 33 of them. It is absolutely possible for you to dump your own .pls in the playlist folder and have it added to the queue. You can get .pls files by going to shoutcast.com and clicking the download button (next to the play button) for the station you want.

    pressing N or B a lot and fast ain't gonna break shit. Also, I know my sky is only the solid layer. For some reason my sky shader doesn't work in AS3 (which is nutty cause the shader language was written by adobe) so I disabled it. Apparently I am going to have to reconsider the shader entirely. The Haxe version works. This link is not to a haxe version.
    Last edited by MadGypsy; 09-22-2016, 02:26 PM.

    Leave a comment:


  • MadGypsy
    replied
    Done. Drop any version 2 .pls file in playlists.zip and it gets added to the available stations. Currently, I have all 33 channels of SOMAFM as default but a user could delete/replace any/all of that with whatever stations they want.

    The next step is to open up playlists from stuff like WMP. That way even your local music can be used as a station.

    Leave a comment:


  • MadGypsy
    replied
    @pls - too easy


    not "correct" though. Obviously I should start by split("Version=").pop(), learn something and then split on the rest of those keywords and any other keywords a specific version supports. The above script gets the job done fast and in any Version=2 case properly. I've downloaded like 200 pls's...they are all version 2 so....
    Last edited by MadGypsy; 09-21-2016, 11:50 AM.

    Leave a comment:


  • MadGypsy
    replied
    SOMAFM has 30 streaming stations and I just added them all with (b)ack, (n)ext controls. There is still no UI and nothing to indicate which station you are listening to but all the stations work and skipping through them is very very clean. In other words hopping from one station to the next is virtually instant... like pressing a preset button on a regular radio.

    I think I'm going to bite the bullet and put in full .pls support. That way someone could download or make a pls for whatever stations they want and simply dump it in the game folder... or maybe engine folder. As far as a UI goes. I think I am going to completely avoid it until I get to dealing with mobile devices. Pressing B or N to cycle stations works well and spacebar to stop/play is also convenient. The whole thing is wired to where, if you back, next or stop the entire stream (good, bad or ugly) is completely destroyed and a new stream is created so, it's basically impossible to have a fatal crash cause everything except play is a full reset.

    I chose SOMAFM cause the music is "different" (ie not popular or radio) and there are absolutely no commercials. Not even a station identification. I actually miss the station identification though.

    Musique Agent Sucret - SOMA FM (in a beautiful girl voice with a very thick french accent)
    Last edited by MadGypsy; 09-21-2016, 10:41 AM.

    Leave a comment:


  • MadGypsy
    replied
    Idea:

    I'm just throwing this out there for people that are better than me to tell me how bad it is.


    Take batching by textures to the next level and batch again from a texture batch by lightstyle. So like faces in a texture batch that have no animated lights will be together and all the animated light faces from that same group will have their own batch.

    The reason is a few fold
    1) with all faces that do not have an animated lightstyle segregated I end up with a pool of "only animated" lightmaps and I don't have to consider the whole damn map every time I animate a light
    2) those animated batches could be PVS'ed harder than the flat stuff and I could actually get rid of large chunks of batches that are not in view.

    ex: floor_1 is visible in the leaf you are in so ALL of floor_1 is rendered, but floor_1 with animated light is not visible in this leaf so no animated floor_1's are rendered (gist)

    Leave a comment:


  • MadGypsy
    replied
    Woooah, the music finally stopped. I've had that one stream going for 35 hours and it just stopped...

    {presses spacebar twice (stop/play)}

    ..and we're back!

    lol, I love making things that aren't shitty. Full recovery.

    @mindz - those are lightmap atlases.

    Leave a comment:


  • Mindf!3ldzX
    replied
    forgive me, but what are those rorschach tests

    Leave a comment:


  • MadGypsy
    replied
    @when do I get to try it

    apparently never OR maybe when you are really really old. I'm trying to release this exactly when my tech is already 20 years old.

    I'm just kidding BUT I am just one guy and I'm not copy/pasting a quake engine. I am figuring out a quake engine in a language that Im not really comfortable in and re-solving all the problems differently. Currently my code looks basically nothing like a quake engine. AllocBlock is seriously the only thing straight out of a quake port and honestly I don't like how alloc block is welded to a "whatever the width is so be the height" mentality. My current method has to go behind AllocBlock and go "Hmmm you are only going to fill in the atlas to this maxY + potentially maxFoundHeight...pow2 result, snip". It works well but, there is potential for there to still be removable deadspace.

    Really I should probably completely dump AllocBlock and the snip and simply create 1 method that can figure out the most optimized amount of area and arrangement possible to allocate any given set of lightmaps to an atlas. That's probably a very tricky formula and I honestly just don't want to think about it right now.

    for the record tough, my current method does an OK job.


    Due to power of 2 sizes, that's about as good as it gets. And there is no way for me to know how much of that is all black lightmaps. So, my current method is pretty optimized. Maybe even more than it appears.

    However there is also this


    which is either a lot of black lightmaps or a bit too much deadspace IMO. These atlases are the same dimensions by coincidence. That is not a static size or anything.

    woah, look at this guy. This is how I want them all to be...full
    Last edited by MadGypsy; 09-21-2016, 09:15 AM.

    Leave a comment:

Working...
X