madster's Forum Posts

  • 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

  • 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!

  • Though if there were a Linux port you'd be about five inches away from an Android port as well, so two birds down with one stone there.

    Thats very rather true.

    Likewise with the PS3... there is no XNA or XBLIG equivalent.

    There's this thing called PS3 Minis, but I have no idea what the hell is that. Maybe someone can shed light on that? I still believe indie iPhone sales are much, much bigger than indie PS3 sales.

    And you DO need a mac somewhere in the process. Damn jobs. Or at least OSX

    I believe Unity does it like that. Generate the project files, then go find a mac to compile them.

    really who the hell owns a Zune or a Windows phone?

    With all respect to Fresh frijoles and all other kinds of frijoles, I was about to point this out. Windows Mobile overtaking iPhone/Android?

    Unlikely.

    I will eat a small chocolate cake with marzipan topping if that ever happens.

    Yes. It's a crappy bet, but if I'm getting a crushed ego (and tolerating MS in a cellphone), at least I'll have some sugar to wash it down.

  • What I did try was:

    -Get the layer's origin (upper left corner) in the layout's center frame of reference (LayoutWidth/-2 , LayoutHeight/-2)

    -Scale that position according to zoom (0.01*ZoomX*LayoutWidth/-2 , 0.01*ZoomY*LayoutHeight/-2)

    -get the scaled position in the frame of reference of the layer ((0.01*ZoomX*LayoutWidth/-2)+(LayoutWidth/2) , (0.01*ZoomY*LayoutHeight/-2)+(LayoutHeight/2))

    It worked somewhat, but it overshoots... There's a factor I'm missing on Construct's zoom . It seems that zooming doesn't ..... wait.

    I might have it. Will edit this soon.

    EDIT: Got it!!!

    Since scroll rate is zero, it's zooming around the center of the SCREEN, not the layout. So scrolling rate affects zoom. Go figure. Replace LayoutWidth/Height with Display and it works

  • I honestly prefer Towerclimb.

    A game whose main character is a homogeneous blob will always have difficulty maintaining my attention. (I'm looking at you too, Gish)

    My first axiom of game design:

    You know you need help when your game characters are blobs.

  • I suppose there could also be a "During Message" condition that would activate every tick that animation frame is showing too.

    This is what I was trying to say

    Fire an event = send a message. The event is On Message

    Only one event is needed, which fires as long as the frame is on (so that would be "During Message"). Why? because the event system already has "Once while true". ^^

  • I was actually using unbound scrolling

    Using bound scrolling works, but what if your game needs unbound scrolling

    Also, I believe it only works if you're zooming out. If you're zooming in, the 0% scrolling layer would move towards the center, which is within the layout bounds.

    It's not exactly a bug per se... it's a consequence of zooming from an origin different to the positioning origin... I'd like to pick the origin for both per layer anyway

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is that Javascript? looks interesting