Page 3 of 3 FirstFirst 123
Results 41 to 55 of 55

Thread: Dreamrider

  1. #41
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    I had been considering the second one - if just from the point of view of replays - but I had not considered concurrent with the game. I like that idea, but I'm not quite sure how it would handle event like 'world collapse' when the player hits an obstacle, or when the replay collects a powerup, or does something else that alters the world state. The most major issue is that events like world changes are timed based on the song - not based on position. I think this means that the environment the player is transversing may be different from the one the replay is transversing. But I'm not sure about that. It may 'come out in the wash' because for the replayer to be visible, you must be in about the same place at about the same time. Hmm, I'll have to think this through.

    I think I'll try make the world-type interface quite versatile to allow the sort of thing you describe (though I hadn't though to that in particular). I also have grand ideas about a world a bit like city streets, one without a 'ground' and big geometric tumbling shapes.....
    The way I think this will all hang together is that the 'track' consists of:
    - an audio file
    - a list of 'events'

    Most events are 'world_change' events which collapse the current world (each world is left to its own to decide what a collapse is) and spawn a new world on the horizon. Other events can be coloured flashes, messages on the HUD, and whatever else can be accessed via the event system.
    Interestingly, a non-concurrent replay is exactly type same as a track - just it also broadcasts player input events. (And recording a replay is just putting logging on the event router). I'll have to think about how to handle concurrent replays. Concurrent replays would be extremely similar to multiplayer in terms of architecture (just different input sources), so there are lots of reasons to think it through very thoroughly.

    Oh, and figuring out how to place powerups is going to be pretty hard if not nearly impossible. I'm hoping an elegant solution will appear soon. I mean, how do you find a 'good place' in a noise function?!

    @Everyone:
    Now is the time to suggest ideas - before too much of the architecture is built. The later ideas come, the harder they will be to add.... No guarantee's though - I intejd to keep this game relatively small/simple.
    Hmm, when the player hits the world, should he blink visible/invisible as in the old DOS games?
    Last edited by sdfgeoff; 22-Sep-17 at 17:22.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  2. #42
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    And we have a nullworld:
    nullworld.png

    It's not very interesting terrain to drive through, but it is the most trivial implementation of the world architecture.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  3. #43
    Member JustinBarrett's Avatar
    Join Date
    Jul 2009
    Location
    Trier(near), Germany
    Posts
    2,064
    So it is basically up and running now?....minus the extras.
    "The crows seem to be calling my name." Thought Kaw.
    Myrlea, "The Shepherd's Quest" formerly "Valiant" [project]



  4. #44
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    @Justin:
    Minus the music, things to hit, the effect of hitting things and a few others - y'know, all the things that make it into a game rather than driving on a featureless plane for all infinity....



    Intersetingly, selecting the music prompted me to start making menu's, and because my brain has been code-tired for the past few weeks.... Hey look! Coloured stars!
    stars.png
    I may have just spent <way more hours than I care to admit> making them. You see that red glow in the middle of the half-star? Yeah, it moves in just before the star is illuminated. It's pretty cool but no-one will ever notice it in-game....

    There's now a build system to generate textures from a source blend file. Things like the speedometer (a bunch of blocks), the inside/outside of a star and the logo are now rendered out as part of 'building' the game. This allows easy changes to these textures. I plan a few more textures to be done using this method.
    Last edited by sdfgeoff; 01-Oct-17 at 14:15.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  5. #45
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    After some thinking "wouldn't it be cool if..." and then an hour playing around with pyplot and the wave module, then fiddling around with gimp and finally into blender:
    progressbar.jpg

    So the way this game will work is that converting music into tracks is a two part process:
    - Extracting metadata, waveform, md5sum of track etc.
    - Sequencing events that happen during the track
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  6. #46
    Member Nicholas_A's Avatar
    Join Date
    Oct 2014
    Location
    own.worldPosition
    Posts
    1,050
    Have a library on soundcloud and use the aud library to stream the music from there.
    My website | My YouTube channel | My Blendswap profile | Current Project: [BGMC 25] Ant Panic!

    I sell custom logos for $5 (among other things). Check them out!



  7. #47
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    I have been considering how best to handle music content. It is likely that, at least for the first version, content will have to be local (based on users hard drive). I'm still working through the requirements for storing trackdata (information that the game needs about the track) as there are some rather interesting caveats.
    For example:
    - Different filenames but the same song should not require different track data
    - Different audio formats/bitrates should not require different track data
    - Non-local (eg streamed) songs should not require different track data

    As such there is a many -> one mapping from audio to trackdata.

    The naive way to solve the first problem is to use the md5sum of a song as a filename for the trackdata. Then no matter the filename, you can associate it with a specific trackdata. However this fails when different encodings are used, and will not handle different audio sources (eg streaming from soundcloud).
    What is needed is some sort of database - but I don't want to make the process of creating tracks hard (and putting things in a database fits my definition of somewhat awkward).
    So for now I'll just write some abstraction around retrieving trackdata/tracklisting, and hope that a better solution presents itself in the near future.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  8. #48
    Member Olm-Z's Avatar
    Join Date
    Apr 2006
    Location
    Bxl - Be
    Posts
    326
    may I suggest this : use a fft spectrogram of the audiotrack as a base texture for the surface height, that can be generated on the client or on a server...
    it is doable with matplotlib f.ex.
    then as it's a fixed data relative to the audio it's both super cheap on the computing and you can replay as you want as time = u on the uvmap
    you can do also some filtering tricks to the song so have multiple planes, still synchronised but one with the bass and other with the mid and high freq
    you can see also easely on audacity the spectrogram of an audiotrack so filtering is easy (I used it even to plot and use the spectrogram with printscreens )



  9. #49
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    Currently the track will be read from a data file on disk. Whether this is manually created or autogenerated from looking at the waveform/spectrogram is dependant on my enthusiasm for audio analysis....
    I actually did generate the spectrogram. Somewhat counter-intuitively it was easier to generate than the waveform!

    test.png

    but for the progress bar at the bottom, I think the waveform is prettier (although you can see the beats in the spectrogram!)

    There are some interesting limitations of the ability to "boost" the car, as this means that the user can travel different distances. This unfortunately means that there isn't a 1:1 mapping of song->track, so the sound can't be mapped directly to the track. As a result, the track's data file is defined in time rather than in distance. So unfortunately the tracks are more likely to have fewer changes at key points at in the song (eg "the drop") than continually be reacting.
    Attached Images Attached Images
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  10. #50
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    Well, things are getting places. Still a fair way off, but now tracks have the ability to influence things in game. Currently they can only fire to public event listeners. Currently there are four, but only one "useful" one (the message bar at the top of the screen). I mean, you could fire an extra "time" event, but at worst all you'd do is jump the whole game clock somewhere.... Hmm. Maybe tracks shouldn't be able to do that.
    But it now loads in music, loads trackdata from the disk, and can toggle between different "levels" (including a NullLevel which will be used during menus).

    So what's next?
    - World Generators. I'll be programming up a world generator or two. Probably not the full shader-based-uber-world you say earlier in this thread (that needs some more thought put into it), but ones similar to the WNG dreamrider that operate by spawning objects. This will allow me to develop:
    - Shield hits on the player. Currently the player is invulnerable, so making him take damage onto his shield needs to be implemented.
    - Menu's to handle end-track and player-death (yes, those are menus)
    - Menu to handle track selection
    - Menu to handle options

    At that point, the game will be (nearly) feature complete, and except for a world builder to help me make tracks, it should be ready for some sort of testing.

    And I think we need some images. First up a code-graph (not that anyone's interested):
    classes_structure.jpg

    And now a screenshot showing things functioning together
    riding.jpg
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  11. #51
    Member JustinBarrett's Avatar
    Join Date
    Jul 2009
    Location
    Trier(near), Germany
    Posts
    2,064
    still looks good, the only criticism I have is the number on the speedometer can use a bit more contrast between the dark unlit and the lit parts(the actual speed). ...maybe less saturation for the unlit ones??
    "The crows seem to be calling my name." Thought Kaw.
    Myrlea, "The Shepherd's Quest" formerly "Valiant" [project]



  12. #52
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    I completely agree. Unfortunately fixing that will have to wait until I file a bug report with UPBGE (and they fix it) - or I suppose I could implement my own bitmap text.

    Here is a mock-up menu (it's in blender with BGE-compatible materials, but doesn't hasn't been programmed yet):
    menumock.png


    So there is a power button on the left. The middle is a list of songs (including folders/subfolders). On the right is a box that will contain track statistics (length, successful plays vs completions, furthest distance etc). Below that is a settings button and the play button.

    Issues that need to be addressed (ideas welcome):

    • Absolutely everything is additive type alpha, so things tend towards white. Large areas of white such as the "play" button can result in losing track of where the cursor is. Possibly rethink the symbols or the cursor.
    • Settings button is too big/too close to play button
    • "Balance" in empty space is off. I haven't quite figured out what needs to change to fix this.
    • Logo may not be prominent enough?
    • Scroll bar is going to be a right pain to program.....
    • Stars have lines between them (modulo operator in the shader being weird?)


    Any ideas around the menu are welcome.
    Last edited by sdfgeoff; 11-Oct-17 at 17:49.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  13. #53
    Member BluePrintRandom's Avatar
    Join Date
    Jul 2008
    Location
    NoCal Usa
    Posts
    18,212
    a quick fix for the bitmap font would be to store a dictionary
    Code:
    numberDict = { (int):[[vertex_index,uv cord] ]}
    for vert in numberDict[(int)]:
        vertex = mesh.getVertex(0,vert[1])
        vertex.uv = vertex[1]
    then just libnew in the number (or even letters) so the vertex map is still good?
    Break it and remake it - Wrectified
    If you cut off a head, the hydra grows back two.
    "headless upbge"



  14. #54
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    Yep, bitmap text isn't hard. It would only take an evening or two implementing and testing. (And I'd do the texmap lookup in the fragment shader rather than libnewing each mesh). Hmm, I wonder of the feasibility of doing mesh-based text? That would be a fun one to implement.
    But I'd rather that font handling was better in UPBGE, and in my mind it makes enough sense that it should use the normal material parameters.
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



  15. #55
    Member sdfgeoff's Avatar
    Join Date
    May 2010
    Location
    Kalpana One
    Posts
    5,071
    The menu is now a thing. It looks exactly like the mock-up above except that the names aren't so nicely formatted (being filenames). Maybe I'll have to read the metadata to extract filenames. It's linked all the way through to the game itself so that you can now start the selected track. I still need to do the scroll bar (armature?), the settings menu (shouldn't be too hard), and start thinking about how pausing the game is going to work.
    Anyway, animated gif:


    I also made a code-graph using a tool that analyses the code at run-time (the previous graphs are static code analysis). A small section of It looks like this:
    code-graph.png
    The big node in the lower right are all the references to "NoneType" objects - I think I need to tweak the settings - it's not very useful at the moment eh?
    "Someone applied a roof texture to that wall" - martinsh

    Website: www.sdfgeoff.space



Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •