A request for review / help :)

Previous topic - Next topic

Darmakwolf

I had kind of lost interest in my previous project (Thy Wanderer) because of failure to port it to handhelds. I somehow hard-coded 800x600 into every facet of the program. Oh well! ANYWAY! I have a request for all forum-goers. I decided to start work on a platforming game engine, which quickly became my inspiration for a game similar to Castlevania: Symphony of the Night. The style of game is a traditional side-scroller with open-ended exploration of a ridiculously gigantic castle (and occasionally outside of the castle.) It includes RPG elements (stats, like strength, dexterity, HP/SP/EXP, etc.) blended in with hack-and-slash fighting in real-time. The engine so far allows for infinite sized maps with a technically infinite object entity system. Only objects on-screen are drawn, which makes for good performance even with literally hundreds of other objects with their own properties off-screen.

HERE'S THE DEAL:  =D
I need some help. The engine is coming together really well, but there's some slight problems with collision detection. My code is generally very complex with not-useful-to-other-people commenting for each segment. I'm hoping someone can help me resolve these nagging little issues. They don't affect gameplay in a functional manner, but they're annoying.

1. Jumping right towards a vertical "stack" of small objects allows the player to hold jump and continually move up the wall. I think I've tried 50 times to get it to stop happening and it either broke wall detection or made things worse. Moving left is unaffected...
2. Falling onto a horizontal platform slowly "floats" the player to contact with the object to be standing upon it. I've tried to make it sort of "click" into place with the character, but this kept breaking the scroller or doing something terrible to the object. On the other hand, there is code in place to "push" the player out of a block if they happen to get stuck in it, this should stay intact.
3. Sometimes fadeout() just instantly blacks the screen. WHY? O_O
4. Hitting ceilings while jumping and moving a direction stops horizontal speed most of the time. I'd like it to just prevent the player from going though it, really )=
5. Objects appear to move slightly out of place and then back when running into them. To test this, immediately move left into a block until collision. press and release left several times and you'll see what I mean. I want things to stay solid looking...

If anyone can contribute and fix any of these things, please post your fix or the entire project with the fixed code, I'll appreciate it and put you in the credits for the iOS version as well :)

HOW-TO:  :rtfm:
The game does not rely on the mouse. I intend to finish it and port it to a variety of platforms, so eventually there will be a touch interface which acts like a keyboard button emulator.
On the PC:

*Arrow keys to move / select menu items
*Z = cancel/back/attack
*X = accept/jump
*I = inventory (can be used to exit inventory along with Z)
*F1 = DEBUG MODE. The game WILL look scary with this enabled! Entering the menu in debug mode will show selected item positions in the item menu. Pressing the "a" key on the map in debug mode will add a random amount of turkey and a sword (unequippable) with random stats to the inventory.
*F2 = toggle frameskip amount while in debug mode. I do not recommend trying this as it does not work properly.
*Holding F3 will simply show FPS to get an accurate reading of FPS while on the map

IN THE MAP EDITOR:
Go down to "edit" on the main menu to open the map select screen. Each square represents a different map. Clicking the upper-left map selects "map0000.ini" which is the very first map the demo will load.

LEFT CLICK to spawn an item. RIGHT CLICK an item you are hovering over to move in by its upper-left edge
+ and - on the numpad scrolls through objects in the media folder to place on the map
* and / keys on the numpad scrolls through object properties for the next object you place. Objects can be solid, invisible, bouncy, etc.
1 and 0 on the numpad toggles priority. Objects with a "1" priority appear in front of the character. This is useful for "go-thru" objects.
-> there is no way to delete objects currently. If you can devise a method for doing this... awesome ;)

Quick keys for the editor:
these are useful for building a cleanly constructed environment / map. It snaps the next object to the selected one, allowing for easy construction of large complexes which use pattern-like objects such as bricks or dirt.

U: Spawns the next item directly above the selected item
D: Spawns the next item directly below the selected item
L: Spawns the next item directly to the left of the selected item
R: Spawns the next item directly to the right of selected item

Important: S saves the room.

Obviously this is an unfinished works and I'm just beginning to get things rolling. Don't be afraid to download and try it just to use the editor and play! I do ask that you do not use any portion of this engine for your own commercial games. You may use it to build something of your own if it's just for fun. Full project with source code, Windows, OSX Universal, and Linux binaries link below in a single zip!

zShare link: http://www.zshare.net/download/944739834c364d14/
MegaUpload link: http://www.megaupload.com/?d=YZB8AZIA

Ian Price

There are definitely lots of problems here, but it'll be worth the effort to sort them out - one can never have enough CastleVania type games.

I spotted another issue BTW (which you probably already know about) - pressing UP make the character invisible. I presume this may be to have the character face you and there's no graphic for this yet?

The scrolling (non-solid issue) is a wierd one, as you can actually see this while moving - there are sets of bricks at the bottom of the screen that merge (along one vertical line) when moving (or when pressing right/left against a barrier). The level scrolls smoothly in the editor, but not in the game. Hmmmm...

I haven't got the time (to go through your code), but it looks like you are well aware of the major issues.
I came. I saw. I played.

Darmakwolf

Yes, up and down currently make you invisible because there is no graphic for looking up or ducking. That's not really a "bug." I think the objects not staying in a solid position has to do with acceleration horizontally...

Darmakwolf

Also it seems I only set up the Windows binary to start in 480x320 window. Looks silly in a big window where you can see outside the view :P anyhow - like I said before, if anyone can contribute to fixing any of the issues or make comments I'd appreciate it :)

Darmakwolf

Every problem I stated here has been fixed. I have implemented solid collision detection with no "floatyness." Everything moves perfectly smoothly and there are no more problems. Woohoo  :good: