madster's Recent Forum Activity

  • It's weird that event sheets are always included, but you can place them as subevents. This confused me.

    Then I realized it was being included always, even if the subevent wasn't firing. So I moved all of that code into a function object and call that function with the condition I wanted. I made the function object global so I can reference it from the event sheet and call it from wherever I want.

  • Oh okay!

    So there's no automatic rotation then? cool, no biggie.

    I like the "exclude from rotation" action ^^ it's very useful.

    EDIT: no sarcasm, I'm actually using it so my UI doesn't rotate

  • They pulled an Adobe

    _<

  • Hey I love those games >_< I want to play it!

    I know, they're meant for kids, but there's something about them I really enjoy

    if you want chance, you should use random(max).This generates a random number which you can divide by max to generate a chance.

    Then, you'd have to do the stickin' by yourself

  • Hello I found another bug >_<

    Yeah, I'm hammering your plugin.

    When you set an object to follow a sprite and you tell it to use object angle.... well, it doesn't.

    However if I manually set the camera's angle to the object's angle every tick, it works.

    (funny though, camera angles have a different orientation to object angles. Not surprised, as I've been fighting Construct's conflicting coordinate systems for zooming and scrolling and positioning... this is just one more, just set camera angle to -90-Sprite.Angle)

    This is an easy fix using an *always* event, but you might want to test it in the new version of your plugin

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hello.

    Are there any events that fire when a window is resized?

    If not, could it be possible to add one somewhere? Perhaps the Window object?

    This is what I'd be using it for:

    (This is where I'm at with blackbars and multi-resolution)

    You can move around using the arrows.

    Try resizing the window. Witness the greatness!

    http://octavoarte.cl/JR_Resizeable.exe

  • Did you try debugging that value? perhaps it's 1 in all sprites

  • Best wishes to you, your wife and your daughter. I hope your family's health will improve from now on.

    Here's the code, indented by repeating the + and - symbols.

    Code for showing top 5.

    + Registry: Key "Volatile Environment" in root HKEY_CURRENT_USER exists
    -> Registry: Open key "Volatile Environment" under root HKEY_CURRENT_USER
    ++ File: [negated] Directory Registry.ReadString("LOCALAPPDATA")&"\darkasteroids" exists
    --> File: Create directory Registry.ReadString("LOCALAPPDATA")&"\darkasteroids"
    ++ System: Always (every tick)
    --> INI: Set INI file to Registry.ReadString("LOCALAPPDATA")&"\darkasteroids\hiscores.ini"
    + System: Always (every tick)
    -> SpriteFont2: Show Text INI.ItemString("1", "name")&newline&INI.ItemString("2", "name")&newline&INI.ItemString("3", "name")&newline&INI.ItemString("4", "name")&newline&INI.ItemString("5", "name")
    + RecordEntrySpritefont: Value 'ID' Equal to 3
    -> RecordEntrySpritefont: Show Text INI.ItemValue("1", "score")&newline&INI.ItemValue("2", "score")&newline&INI.ItemValue("3", "score")&newline&INI.ItemValue("4", "score")&newline&INI.ItemValue("5", "score")
    [/code:z37563ln]
    Notes:
    [ul]
    [li]First we find out if the user has the INI file in the decided LOCALAPPDATA subfolder (Windows User profile), and if not, create it. Here I'm using darkasteroids/hiscores.ini[/li][li]RecodEntrySpritefont is a Spritefont object with a private variable called ID. This is so I can put several instances of the same Spritefont in the layout and pick the correct one by its ID. So ID=3 is the one that holds the high scores. I've ommited titles and such.[/li]
    [li]SpriteFont2 is another Spritefont object. Back at the time there was a bug involving picking the right Spritefont object, so I have a mixed approach here. This object holds the player names.[/li]
    [li]The INI file has 5 groups, each one with items "score" and "name". They're always ordered so that highest score is at [1].[/li]
    [/ul]
    
    The next code shows how to add a new score.
    
    [code:z37563ln]
    + TiledBackground: On timer "hiscore"
    -> System: Set global variable 'hiscore_slot' to 0
    ++ System: For "scoresloop" from 1 to 5
    +++ System: INI.ItemValue(str(6-LoopIndex),"score") Lower or equal global('score')
    ---> System: Set global variable 'hiscore_slot' to 6-LoopIndex
    
    + System: Is global variable 'hiscore_slot' Greater than 0
    + RecordEntrySpritefont: Value 'ID' Equal to 3
    + System: Trigger once
    -> XAudio2: Autoplay resource "hiscore.wav" (No loop)
    -> RecordEntrySpritefont: Write Text "you rank "&str(global('hiscore_slot'))&newline&"best scoring player"&newline&"your score is "&str(global('score'))&newline&newline&"enter your name" at 100 millisecond per letter
    + System: Is global variable 'hiscore_slot' Greater than 0
    + System: Trigger once
    + RecordEntrySpritefont: Value 'ID' Equal to 1
    -> RecordEntrySpritefont: Start Edit Box
    + RecordEntrySpritefont: On Edit Box Character Typed
    -> XAudio2: Autoplay resource "shooting.wav" (No loop)
    + RecordEntrySpritefont: On EditBox Ended
    -> XAudio2: Autoplay resource "explode.wav" (No loop)
    -> System: Set global variable 'hiscore_name' to RecordEntrySpritefont.CurrentText
    ++ System: For "scoresloop" from global('hiscore_slot') to 5
    --> System: Set global variable 'tempA' to INI.ItemValue(str(LoopIndex), "score")
    --> System: Set global variable 'tempC' to INI.ItemString(str(LoopIndex), "name")
    --> INI: Write value global('score') to item "score" in group str(LoopIndex)
    --> INI: Write string global('hiscore_name') to item "name" in group str(LoopIndex)
    --> System: Set global variable 'score' to global('tempA')
    --> System: Set global variable 'hiscore_name' to global('tempC')
    --> System: Go to layout "Hiscore" with transition "None" lasting 0 MS
    [/code:z37563ln]
    
    Notes: The first block finds where your score should be inserted
    In the second block hi-score slot == 0 means your score doesn't make it into the list.
    Afterwards there's a loop that pushes scores down until the last one is dropped out.
  • Dunno about the rest of you, but I'm leaning more to a XNA port... for a couple of reasons.

    XNA is made for gaming so the port itself should be easier, as the devs would simply be converting it, instead of creating code.

    Then there's performance. Again since it's made for games, getting features we already have should be a lot easier.

    Now on the other hand it looks like a lot of people are leaning towards Android, mostly since its made from a Linux kernel.

    But, would the games run on C, or Java (Dalvik), and what features would be expected?

    Obviously not speed....

    Then how hard would the port be for that since there's probably not a lot of existing game development?

    Perhaps the Android port should be left for some third party to do.

    I say that after finding out about the Android Developer Challenge.

    http://code.google.com/android/adc/

    Uhm.. I don't know where to begin here.

    I.. umm....

    It.... things just don't work like that. C is as fast as you can get today without going to ASM. Java is the exact opposite. Linux kernel is not as important as you would think (not as the use of OpenGL and other libs) and performance of XNA will NEVER match C, as XNA is based on C# which is managed code.

    And "converting" code instead of "creating it".... that doesn't work like that either.

  • Instruction Button:

    When I toggle the Instruction Button I have to hide and show a lot of things. Can these be put in to a container to make hiding and showing easier in the game?

    I believe families would help you there. Make a HELP family and add all the help objects there, then just set visibility on the whole family.

    High Score baord:

    I can make a simple high score with the INI but do not have the time since I am at the hospital alot to make a full featured high score with the top 5 lowest times. Does anyone want to pitch for that part? I am sure the boy will love it as it is but I thought that would add an extra element

    I have a top5 score that stores in an ini file in the windows user profile folder. It's in my Dark Asteroids game. I could copy those events and paste as text here, then it should be easy to add them to your game. Does that work for you?

  • I really want to try out that 2D physics framework.

    Maybe I will after I finish my current game.

    Also, the 3D solid destruction demo is Teh Ceks.

    it scares me but I want to try the lib too.

  • tl;dr.

    I like the idea of typing through dialogs. quicksearching objects, tabbing through fields, accepting with enter.

    I do this whenever possible.

    sys [enter] star [enter] --> On Layout Start event

    Now, if I could highlight an insertion point and add conditions/events with the keyboard, I wouldn't even touch the mouse!

madster's avatar

madster

Member since 17 Feb, 2009

None one is following madster yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies