Results 1 to 10 of 45

Thread: Super Heli Land

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Problem is that when checking for collision with one sprite (it's pixel-perfect by the way) I can't tell if part of sprite player is colliding with is spike or harmless object, hence two sprites per chunk - one for harmful things and other for harmless. Supposedly I could do like you are saying, but I'm too much of a n00b yet and I'm basically learning Allegro with this project so...

    Also you are talking to guy who barely made world generation and pixel-perfect collision and only because I was given perlin noise unit and was able to (barely) translate pixel-perfect collision code for original Allegro (in C).

  2. #2
    Good news: World generator doesn't crash game (it did, but I got rid of the problem).

    Bad news: It looks awful (fails to generate ground and traps. Will be posting help request thread in a minute.

  3. #3
    Quote Originally Posted by Darkhog View Post
    Problem is that when checking for collision with one sprite (it's pixel-perfect by the way) I can't tell if part of sprite player is colliding with is spike or harmless object, hence two sprites per chunk - one for harmful things and other for harmless. Supposedly I could do like you are saying, but I'm too much of a n00b yet and I'm basically learning Allegro with this project so...
    collision sprite could have one color for marking harmful area and second for non-harmful, other colors could be also used if needed for other properties like bumpiness. This could be broken down to using one color channel for harmufulness and other for bumpiness to allow both on same surface
    I think this info could be also encoded directly into single sprite image with some work.

  4. #4
    Quote Originally Posted by Darkhog View Post
    Problem is that when checking for collision with one sprite (it's pixel-perfect by the way) I can't tell if part of sprite player is colliding with is spike or harmless object, hence two sprites per chunk - one for harmful things and other for harmless. Supposedly I could do like you are saying, but I'm too much of a n00b yet and I'm basically learning Allegro with this project so...
    How big are your sprites? Are you using one sprite for whole map section?

  5. #5
    Quote Originally Posted by SilverWarior View Post
    How big are your sprites? Are you using one sprite for whole map section?
    Two sprites per chunk. One is for "harmless" blocks, like ground and other for spikes. All I need to know here is whether player collides with something harmful or not. I don't need anything fancy here. And chunk sprites will be pretty small (144x144px), so speed shouldn't be big issue.

  6. #6
    I got sidetracked a bit by making present for my Mom's upcoming birthday. Anyway, I'm planning to get into SHL today again.

  7. #7
    OK. Got worldgen working properly (I think). Now I need to make some finishing touches such as generating destructible blocks, then will get into actual chunk rendering.

    Next thing will be to write class and code for animated sprites.

    While SHL will require just one looped animation per object (if animated at all) such as Mario or enemies, I'll do it properly by writing reusable code that can take for any number of animations. So it'll take some time.

  8. #8
    Just some info: I've moved all Chunk-related things not related to world generation into its own class. This means I had to rename TChunk into TChunkData as TChunk is now class name (TChunkData = array of array of byte). This will lead to cleaner code. Now I need to finish some Tileset-related things.

    Also you can track my progress here: http://livedo.sparklinlabs.com/qvear

  9. #9
    Ok. Worldgen is officially finished. Now I can get to other stuff, like tileset handling.

  10. #10
    Here's demo of world generator: https://dl.dropboxusercontent.com/u/...rldgentest.rar

    Brown pixels on chunk are ground tiles, green are "ground coverage" tiles (in game it'll be seen like one of indestructible blocks in Super Mario Land), red are spikes and blue ones are destructible blocks.

    Demo features two cats, one of which can be moved using arrows. They also collide, using pixel-perfect collision (using PMASK method)!

    Reason for strange executable name is that project was originally "hello world" type of deal, but I've figured out that by making actual game I would learn much more (and so far I did!).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •