[WIP] Myrena – procedural arena-based solo project

I’m working on a game where players will duel with each other in a procedurally generated arena. I plan on having a number of different game types, but PvP is coming first. This video illustrates the procedurally generated arenas, complete with physics. I’ve only been working with JME for about a month now, but I’m very impressed with how easy it makes game development. Next week, player physics. I plan on having player mechanics along the line of Ninja Gaiden / Prince of Persia / Assasin’s Creed, where you can climb, shimmy, run along walls, bounce off walls, etc., blended with an unrealistic fighting style of something like Marvel vs. Capcom / DragonBall. If I can manager to incorporate a sophisticated comboing system, my life will be complete.



[Edit]

Here’s a demo, if anyone wants to toy with it. It’s only built for Windows, haven’t tried it on Mac or Linux yet. F2 toggles between FlyCam and ChaseCam. Keys for the FlyCam are U/D/L/R and PGUP/PGDN. Keys for ChaseCam are W/A/S/D, RMB, and Space. Other keys are LMB, G.



Any comments/suggestions are certainly welcomed!

2 Likes

Whoops, here’s the video:

http://www.youtube.com/watch?v=TPi1jbXT4Vo



Shifting gears – I don’t see an edit post function, only an edit topic function. Am I blind?

3 Likes

that’s looking really cool, nice work :slight_smile:



to edit your post you need to “Join Group”, a button at the top of the page.



Also, you can record video directly from your app with one line of code using VideoRecorderAppState :wink:



keep it up, I’ve always been a big fan of procedurally generated content.

Pink Floid .

First your avatar made me laugh, then your username was hilarious, finally I saw the video. Very cool work! Looking forward to seeing more :slight_smile:

The german GEMA (https://secure.wikimedia.org/wikipedia/en/wiki/Gesellschaft_f%C3%BCr_musikalische_Auff%C3%BChrungs-_und_mechanische_Vervielf%C3%A4ltigungsrechte) blocks this youtube video (maybe because of the background music?) so I’m sad I cannot watch this :confused:

1 Like

@cmur2

yes, i can’t watch it too

Me neither :confused:

wow. thats cool keep it up!

Here’s a different video for those of you who can’t view the original, set to a midi version of Welcome to the Machine. Take that, The Man:

http://youtu.be/D6nqE5IKwiI



@thetoucher said:
that's looking really cool, nice work :)

to edit your post you need to "Join Group", a button at the top of the page.

Also, you can record video directly from your app with one line of code using VideoRecorderAppState ;)

keep it up, I've always been a big fan of procedurally generated content.


Thank you both both tips, and I'll give the VideoRecorderAppState a go soon.

..and to everyone, thank you for watching and stay tuned.
1 Like

Hehe, interesting concept! :slight_smile:

I’m hoping someone can point me in the right direction on an issue I’m having.



To illustrate what I’m going for, I want to have the character face the direction of the point where my the mouse cursor collides with geometry on the screen, and use this direction as a source for the player’s walk direction. Everything works except, apparently, the getPhysicsLocation of the player.



I’m updating everything in the simpleUpdate() function. I can set the initial player position fine using: “setPhysicsLocation(new Vector3f(somePositionX, somePositionY, somePositionZ));” and the logic for making the player face the point where the mouse cursor is, and I can walk toward or away from that point. However, the first component of the ray that is used to determine the direction the player should face seems to always be (0, 0, 0). It’s tough to explain, because I’ve been drinking a good deal now and I’m not the brightest crayon to being with. Let me show you:

http://youtu.be/4c4THCa7Nb4


…see how the direction the player is facing makes it seem as though the player is still at (0, 0, 0)? What am I doing wrong? Here is the code I’m using in simpleUpdate:



[Edit: Wrapped in java tags to avoid a possible throat punch.]

[java]

playerWalkDirection.set(0, 0, 0);

CollisionResults results = new CollisionResults();

Vector2f screenPos = new Vector2f();

screenPos.set(inputManager.getCursorPosition().x, inputManager.getCursorPosition().y);

Vector3f worldCoords = cam.getWorldCoordinates(screenPos, 0);

Vector3f worldCoords2 = cam.getWorldCoordinates(screenPos, 1);

Ray mouseRay = new Ray(worldCoords, worldCoords2.subtractLocal(worldCoords).normalizeLocal());

worldNode.collideWith(mouseRay, results);

if(results.size() > 0){

Vector3f pt = results.getCollision(0).getContactPoint();

Vector3f playerLocation = playerControl.getPhysicsLocation(); //<<<<<<<<<<<<<<<<<<<<<<<<<<< I suspect this is the issue, but don’t see how

Ray playerFaceCursor = new Ray(playerLocation, pt);

playerControl.setViewDirection(playerFaceCursor.direction.normalize().divide(10));

}



if(playerForward == true) {

playerWalkDirection.addLocal(playerControl.getViewDirection());

playerForward = false;

}

if(playerBackward == true) {

playerWalkDirection.addLocal(playerControl.getViewDirection().negate());

playerBackward = false;

}

[/java]

Any help is certainly appreciated!

How are you moving the character ? If playerControl.getPhysicsLocation() is always returning 0,0,0 ( which you should confirm with debug statements) I would say you’re moving the player’s spatial rather than the physics control.



edit: also if you put your code in ‘java’ tags with the buttons above the post field, it will save us having to punch you in the throat :slight_smile:

Or he isn’t updating the player position each loop with the updated walkdiretion.

@thetoucher said:
How are you moving the character ? If playerControl.getPhysicsLocation() is always returning 0,0,0 ( which you should confirm with debug statements) I would say you're moving the player's spatial rather than the physics control.

edit: also if you put your code in 'java' tags with the buttons above the post field, it will save us having to punch you in the throat :)


Hah! I tried the insert snippet mechanism but it wouldn't work. Got stuck on the page where I put my own snippet and wouldn't proceed. Just tried again and had the same result. Maybe because I'm using Chrome? I'll try to edit and put them in there manually. At any rate, I believe I am moving the physics control because it still collides with all of the surrounding level as expected, no matter where it has walked to.

@glaucomardano said:
Or he isn't updating the player position each loop with the updated walkdiretion.


I missed including the line that updates in my other post. After the code in the post above, I update like so:

[Edit: Wrapped in java tags to avoid a possible throat punch.]
[java]playerControl.setWalkDirection(playerWalkDirection);[/java]


[Edit]: I figured it out:
[java]
//changed this
Ray playerFaceCursor = new Ray(playerLocation, pt.subtractLocal(playerLocation).normalizeLocal());
//to this
Ray playerFaceCursor = new Ray(playerLocation, pt);
[/java]
...that's how it usually happens -- I struggle with something for hours and then figure it out a few minutes after I've giving up and posted. Thanks for the suggestions!

Here’s some progress I made on controlling a character:



http://youtu.be/3MEVluawamc



I really can't believe how easy it is to accomplish ideas using jMonkeyEngine :)

[Edit]
Here's a demo, if anyone wants to toy with it. It's only built for Windows, haven't tried it on Mac or Linux yet. F2 toggles between FlyCam and ChaseCam. Keys for the FlyCam are U/D/L/R and PGUP/PGDN. Keys for ChaseCam are W/A/S/D, RMB, and Space. Other keys are LMB, G.

As always, comments/concerns/violent disagreements are welcomed.
2 Likes