Other XANID (The Platformer)

Vestras

Retired
Reaction score
248
Pretty nice. Although I sucked pretty hard. :D
But I could select Teleporters and Goal and stuff...

But nice game.
Oh, and how did you make those fake blocks go transparent like that?
 
Reaction score
456
> But I could select Teleporters and Goal and stuff...
Good that you noticed. Only things I cannot make locust are blades.

> Oh, and how did you make those fake blocks go transparent like that?
By replacing the doodads with units at initialization.

JASS:
scope Fakes initializer Init

    globals
        private constant real WIDTH     = 768.00
        private constant real HEIGHT    = 768.00
        private          real AREA

        private constant real MAX_ALPHA   = 100.00
        private constant real MIN_ALPHA   = 0.00
        private constant real Y_INTERCEPT = MAX_ALPHA - MIN_ALPHA
        
        private constant real INTERVAL  = 0.04
    endglobals
    
    struct fake
        unit object
        rect area
        
        timer transTimer = CreateTimer()
        
        private static method handler takes nothing returns nothing
            local fake dat = GetCSData(GetExpiredTimer())
            local real dist = SquareRoot((GetUnitX(Character) - GetUnitX(dat.object)) * (GetUnitX(Character) - GetUnitX(dat.object)) + (GetUnitY(Character) - GetUnitY(dat.object)) * (GetUnitY(Character) - GetUnitY(dat.object)))
            local real alpha = Y_INTERCEPT / AREA * dist + MIN_ALPHA
            
            call SetUnitVertexColor(dat.object, 255, 255, 255, PercentTo255(alpha))
        endmethod
        
        private static method enterArea takes nothing returns nothing
            local fake dat = GetCSData(GetTriggeringTrigger())
            
            if GetTriggerUnit() == Character then
                if EI2I(GetTriggerEventId()) == 5 then
                    call TimerStart(dat.transTimer, INTERVAL, true, function fake.handler)
                elseif EI2I(GetTriggerEventId()) == 6 then
                    call PauseTimer(dat.transTimer)
                    call SetUnitVertexColor(dat.object, 255, 255, 255, 255)
                endif
            endif
        endmethod
        
        static method create takes unit object returns fake
            local fake dat = fake.allocate()
            local trigger trig = CreateTrigger()
            
            set dat.object = object
            set dat.area = Rect(GetUnitX(object) - WIDTH / 2, GetUnitY(object) - HEIGHT / 2, GetUnitX(object) + WIDTH / 2, GetUnitY(object) + HEIGHT / 2)
            call SetCSData(trig, dat)
            call SetCSData(dat.transTimer, dat)
            call TriggerRegisterEnterRectSimple(trig, dat.area)
            call TriggerRegisterLeaveRectSimple(trig, dat.area)
            call TriggerAddAction(trig, function fake.enterArea)
            
            return dat
        endmethod
    endstruct

    private function EnumConditions takes nothing returns boolean
        local integer id = GetDestructableTypeId(GetFilterDestructable())
        return id == 'B003' or id == 'B004'
    endfunction
    
    private function EnumActions takes nothing returns nothing
        local destructable f = GetEnumDestructable()
        local integer id = GetDestructableTypeId(GetFilterDestructable())
        if id == 'B003' then
            call fake.create(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'h003', GetDestructableX(f), GetDestructableY(f), 270.00))
        elseif id == 'B004' then
            call fake.create(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'h004', GetDestructableX(f), GetDestructableY(f), 270.00))
        endif
        call RemoveDestructable(f)
        set f = null
    endfunction
    
    private function Init takes nothing returns nothing
        set AREA = ((WIDTH + HEIGHT) / 4)
        call EnumDestructablesInRect(bj_mapInitialPlayableArea, Condition(function EnumConditions), function EnumActions)
    endfunction

endscope
Simple, really. I create a struct for every Fake Block, and register two events, enter and leave. Then I use a formula to calculate the current alpha.

EDIT://I would appreciate if you place the map in the Downloads folder, so I could actually view it.
 

Artificial

Without Intelligence
Reaction score
326
> Game Engine, second global blocks, Level to 1.
Ahh, thanks.

> I didn't see it needed, since there are actually only 2 levels currently.
Point taken. :p But once there's more levels?

> My records are 9 seconds for 1st, and 27 seconds for 2nd.
Hihi. I played it again. 8 and 22. I died once in the second level, though. ;o
 

Attachments

  • Times2.jpg
    Times2.jpg
    149.2 KB · Views: 316
Reaction score
456
Sorry, had wrong version there.

EDIT://Still doesn't work. Are you sure you did? It asks for a file Maps\Test\WorldEditTestMap.w3x

> But once there's more levels?
Then maybe.

> Hihi. I played it again. 8 and 22. I died once in the second level, though. ;o
Nice. You died in 3 seconds :p...
 

Romek

Super Moderator
Reaction score
963
You could add:
  • Gates with switches/keys
  • Ladders!
  • Platforms you can fall through by pressing down, otherwise they remain the same
  • Floating Platforms (Which move)
  • Weapons
  • Water (Slow down, drown slowly?)
  • Ice (Slide)
 
Reaction score
456
> Elevators
Moving platforms will be done, if possible ;)! ( they can be used as elevators, incase you didn't realize it :))
 

PureOwnage

Minecraft Server OP, Inactive.
Reaction score
72
Is it ok with you if I make a Youtube video with this game?
Give credits to you :D
 
Reaction score
456
> Appear Blocks
Coming for 1.1.

> Is it ok with you if I make a Youtube video with this game?
Yes. Linkage thread of course :).

> Does not work, goes back to the screen.
I see that. Worked earlier for Artificial, just when I released it. Weird.

Anyway, 1.1 is up. Change log people. (I removed some previous versions to give me more attachement space that was almost full).

HOPEFULLY this one will work. I didn't even optimize it now.

EDIT:// Umm.. did I possibly leave the Handle Counter enabled? If so.. damn it.
 

Romek

Super Moderator
Reaction score
963
Yes, you left handle counter enabled.

I tested it. It's awesome now! I love how the levels are more difficult.
[del]Thing is. Is the level with appearing blocks and water even possible?
I can't reach the appearing block at the top with any form of jumping, and I can't go anywhere else.[/del]

Tricky ;)

Completed for the first time, so excuse the sucky times:
  1. 17 seconds
  2. 27 seconds
  3. 1 minute, 16 seconds
  4. 1 minute, 40 seconds
 
Reaction score
456
Yes it's possible. To jump higher, use wall jump. :)

(old invalid image removed)
 

PureOwnage

Minecraft Server OP, Inactive.
Reaction score
72
Thanks for putting in my idea!
Suggestion:
Can there be a boss stage like if you do a certain action, it will damage the boss.
 

Builder Bob

Live free or don't
Reaction score
249
Really sweet map. Version 1.1 is much improved over the first release. It looks much more like a standalone game now.

Still too hard for me though. I can never get comfortable with the warcraft 3 delayed arrow controls. No fault of you of course.
Are there any cheat codes to skip the first few levels? I never get to see the end of it because I just fall into the abyss over and over until I get frustrated.

It really felt like a well made game with just a tad too much abyss. Keep up the good work :thup:
 

thewrongvine

The Evolved Panda Commandant
Reaction score
506
Wow, I hate this! :mad: I click it once and it moves like 50 feet.

This game is awesome. But I hate it. :(

:) :thup:

Level 1: 11 Seconds
Level 2: 32 Seconds
Level 3: N/A
Level 4: N/A

I quit at level 3. I couldn't find out where to go.

This game is fun and awesome, but it doesn't really have that 'platformer' skill needed to play. It's just you either make it or you don't. It's not your map's fault but because of the movement. You can't really take "pro risks and speed runs" :p. Do I hold the record for level 1? :)

Ha, good game but I get mad.

EDIT: Most of my deaths are from falling because when I'm trying to get to a ledge or different platform, I try to jump and move but it either goes too far with 2 clicks or too close with 1 click.
 
Reaction score
456
> Can there be a boss stage like if you do a certain action, it will damage the boss.
I'll look into it. I should first implement switches and doors.

> I can never get comfortable with the warcraft 3 delayed arrow controls.
Ah. I hope SC2 will have better :p..

> Are there any cheat codes to skip the first few levels?
There are currently no "cheat codes". The only thing you can do is open the map, go the Game Engine trigger, and find variable called "Level", and change it. Levels go from 0 to 4. I think I'm going to add dialog on the start up with buttons "Full Game" or "Choose Level".. something like that.

> It really felt like a well made game with just a tad too much abyss.
I always liked 2D Marios, because in it you could fall so easily. I should probably quit making these abyssed maps then :p..

--

> I quit at level 3. I couldn't find out where to go.
Electrocution? You have to use wall jump to get up.

> Do I hold the record for level 1?
Current record is 8 seconds for me, and possibly for Artificial too :).

--

Thanks guys. ;)

I have to continue this project with another map, because soon the current map starts to lag the hell out.
 

UndeadDragon

Super Moderator
Reaction score
447
Congratulations on winning map of the week!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top