Demo Map Using the Y Axis as the Z Axis: 2D Graphics

tooltiperror

Super Moderator
Reaction score
232
w0YsZ.jpg

If you haven't already, go and try out XANID by Uberplayer. It's really superb.

Well, I've always really wanted to make a platformer. After planning it for sometime, I realized my problem was that I had not yet figured out how I would make the physics work, or how to make the 3D game of Warcraft III into a 2D environment. I was stumped. Eventually I decided I wanted to make the units in the game sideways, have them walk along the X axis, and make the Y axis stand for height (aka the Z axis).

The way I was planning on doing this was by exporting every unit I was going to use, editing the model to be sideways, and importing it. Of course, this was an awful approach. It was rather wonky: it required a lot more work, for possibly worse effects. Next I came to a better approach, using [LJASS]SetUnitLookAt[/LJASS] on dummy.mdx, and attaching my units as models to the dummy. This was a step in the right direction, but I found units used as [ljass]effect[/ljass]s did not play animations, making the game ugly.

Eventually, I admitted that I was not smart enough for the job, and asked Uberplayer for assistance. Sir Uberplayerus gave me these eloquent words of advice:

I have two units for each object. Onea that faces right, and one that faces left. In the Object Editor the right unit has "Maximum Roll Angle (Degrees)" of -270, and the left unit has it -90. When the units are created, I set the right unit face 0 degrees, and left unit face 180 degrees.

And that was a way to edit their roll. Now, this is all grand and jolly, but every good animation needs that coding to go wit hit making it awesome. So in this demomap, there is thoroughly commented vJass showing you how I got this to work. The code uses KeyAction by Earth-Fury.

Word from the wise: compare zero to your variables, and take constructive criticism, for your code is made to be manageable not just fast, lest you become an ASMer in a world of high level programming.
 

Attachments

  • [Demomap] Y-axis as the Z-axis.w3x
    25.8 KB · Views: 462
Great job. I love XANID, although I don't know if Uberplayer is still working on it.

As for the demo map, it demonstrates what it needs to and does it well. Would be cool to change the camera AoA to 270 but otherwise nice job.
 
You should use the ArrowKeyEvent library by Bribe instead.

The XANID map is really a demo. What 10 seconds of gameplay? Any ~25 year old nes game is much more fun to play [for example Contra =)] and
has much more responsive controls. I mean when you press the move left button it should move left, not when you hold it down...

Is this the technique used in this map (forgot it's name) where you use a rifleman with rocket boots and different weapons (shotgun, ak47, rocket launcher). The fuel of the rocket boots is really the foodlimit so it was it's capped at 300.

Edit: oh lol the XAIND map is actually protected...
 
He did release one version of XANID that was unprotected.

View attachment XANID 0.2.L.w3x

Also he attached another version on page 11, post 128. (1.0.D)
I bet that one is more up to date; but I don't know how he does his versions.

Edit: The one i attached is more up to date then the one on page 11.
 
Yeah ArrowKey is way less overhead in every way than KeyAction. The demo map also glitches pretty heavily, the unit kept disappearing and would be more user friendly to let the unit move on a timer as keys are held down instead of having to spam press the arrow keys.

ArrowKey Glitch.png
 
> Great job. I love XANID, although I don't know if Uberplayer is still working on it.
<3

> You should use the ArrowKeyEvent library by Bribe instead.
I don't like the interface.

> The XANID map is really a demo. What 10 seconds of gameplay?
You can take it up with Uberplayer if you want, but not in this thread.

> The demo map also glitches pretty heavily
As it says in the demo map itself, the glitches were not solved to keep code simple. I wouldn't implement this as it is in a real map.

> Yeah ArrowKey is way less overhead in every way than KeyAction.
I have a funny feeling this really doesn't affect my map, other than some negligible effects I don't care about. I will agree that there is less "overhead" in ArrowKey, but that may be at the lost of code simplicity with KeyAction's many axis functions and constants, et al. perks I would use Earth-Fury's library for. You can discuss this in the ArrowKey thread, of course.

> move on a timer as keys are held down instead of having to spam press the arrow keys.
I'll definitely update the demo map to mention this, and add a second trigger. As I'm thinking about it, it is just as intuitive as registering events, but doesn't really have a place in the same script as the other method. But it's still important for this demo map to include it, or else it's not really accurate "documentation" of a feature of Warcraft III. So I think I'll add in this.
 
I also always thought that switching the camera only to an side viewing camera (not switching y and z) would be better for some 2d maps. Not specifically a platformer though; more of a 2d combat type map with some 3d elements.

Selection of the units definitely needs to fixed. Locust at least fixes the error of right click. I really like the idea of using 2 units with different roll type angles so you can see the unit clearly going left or right. You should add a jump for the arrow key for testing sake when you get the next version out. : D
 
It's not a good idea to make the units locusts. It's rather hard to enumerate them afterwards. Better way is to disable selection via coding.
 
Since selection events have a huge delay, wouldn't it just make more sense to do different enumeration methods?
 
But then you have no selection at all? I suppose for a 2-D scroller it shouldn't have it though.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • jonas jonas:
    I don't think the Republicans will get rid of income tax, at most lower it a little, mostly for people with 6 figures+. But that's just my opinion
  • The Helper The Helper:
    one can dream
  • Ghan Ghan:
    FairTax would be nice.
  • Ghan Ghan:
    But the electorate would have to demand it and vote people in to do it.
  • Ghan Ghan:
    Government spending, foreign policy, and the southern border are all bigger issues than the income tax right now I'd say.
  • The Helper The Helper:
    For you those are the bigger issues. Cannabis legalization and get rid of Income tax are mine.
  • Ghan Ghan:
    We have so much cannabis up here in Oklahoma. Can't go a block without running into 3 dispensaries. xD
  • The Helper The Helper:
    if the demand is there
  • jonas jonas:
    I think the biggest issue in USA is how divided the country has become
  • Ghan Ghan:
    There's a big split happening in fundamental values that is very worrisome.
  • jonas jonas:
    I think there's always been a split in values. But now there's a split in what reality is. No matter whom you ask, they think a third of the country is insane and wants to destroy the country
  • The Helper The Helper:
    pretty big split
  • The Helper The Helper:
    Happy Saturday!
    +1
  • V-SNES V-SNES:
    Happy Saturday!
    +1
  • The Helper The Helper:
    Dont forget to check out the list of all the recipes on the site at the Recipe Index - I am about to take Ghan up on the offer of making that a site :) https://www.thehelper.net/threads/main-recipes-menu-recipes-index-version-2-0.189517/
  • The Helper The Helper:
    We should add that as part of site navigation
  • Varine Varine:
    I just don't think Trump actually understands how the government works. I'm not going to pretend like I can understand the entirety of government but in my industry he kind of caused massive fucking issues. Tarriffs and the international counters had a pretty significant impact on what I do, it was actually kind of interesting to see though. I live in Idaho so I'm not really concerned with it, it'll be R pretty much the entire way down. We do have ranked choice on our ballot this year though and I DO really care about that. But if we are going to have a federal government we kind of need income tax. They could abolish it and tax states I guess, but then states are just going to raise income taxes. It's not really viable without a very significant and holistic overhaul of how the federal government works, and that isn't something I would expect Trump to do.
  • Varine Varine:
    I don't expect Harris to do it either. I want to see wealth and church taxes, but those also aren't things I'm going to hold my breath for.
  • jonas jonas:
    I mean he definitely doesn't, which is why he had to retract most of his executive orders, didn't manage to get rid of obamacare etc.
  • jonas jonas:
    B
  • jonas jonas:
    Replacing income tax with a wealth tax would be amazing imho, but I can't even imagine that this would happend
  • Ghan Ghan:
    Wealth tax would be a disaster. Imagine having to liquidate retirement accounts because you have a tax bill just for unrealized gains. Or your house goes up in price and you have to sell it to pay the tax bill.
  • jonas jonas:
    I'm not talking about an income tax on wealth gain.
  • jonas jonas:
    we already have a wealth tax on our house, it's called a property tax. I'm talking about extending that to other income-generating assets like private equity, bonds and stocks.
  • jonas jonas:
    I agree that the effect of that would be to depress asset prices, but I think that's a good thing. Makes it easier for hard working young people to grow their retirement income
    +1

      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