jobel's Recent Forum Activity

  • Nebulas are irregularly shaped with wispy edges, assuming I could make a tilemap that would look good. I'm thinking 4x4 or 5x5 tiles (each tile 128x128 pixels?).

    and I'd make a bunch of these in the game, different shapes and different colors (webgl).

    so which is more efficient? five 1920x1080 images spread throughout the game that require 1 draw call each (requiring 8MB x5 of memory), or a 5x5 tilemap (totaling 640x640 pixels) requiring 20 draw calls (requiring <4MB of memory)?

    There's probably no easy answer.. I guess my confusion is about draw calls versus memory...and how best to add background images to my game...sort of how they fill the background in SPAZ.

  • I'm trying to optimize the game I am working on. It's a space themed game and has an unbound layout. My stars and "radiation" layers are tiledbackgrounds using parallax. And to dress things up a bit I've added sprites of planets and nebulas.

    My question is about the nebula. I've had my artist draw up a 1920x1080 image of a nebula on a transparent background. This doesn't seem very efficient to me. I'm only using the 1 nebula in the game, and its always in the same place on the unbound layout. So sometimes the player is over it and other times not.

    I'd like to add a lot more nebulae and swirls of gaseous anomalies... would using a tilemap be effective for this? or are tilemaps for games with less detail? like blocky tile images?

    I've read posts like: "It is not appropriate to use the Tilemap object to display large images. The tilemap object draws tile-by-tile, but can optimise if there are areas of the same tile. " So I was thinking I'd like to make a generic nebula tile map and then be able to draw a bunch of different shaped nebulae from it.

    Anyone have any suggestions on how to do this? How to add more background elements efficiently?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • interesting.. totally makes sense that you could do it since all the technology is in place. I could see MS locking that down though since it's a potential risk to play a bunch of free games...or games that have nothing to do with microsoft.

  • I'm having problems with my suggestion.. now I'm not sure of the best way to do it.

    The first problem is my method requires monospacing (a font like courier). The second problem is for some reason C2 won't recognize "newline" as a carriage return (enter) in the replace() function. The ascii character is 0x13 or 'CR' but I don't know how to reference that in C2...

    also it seems the text object resize during runtime doesn't wrap the text...

    There must be a better way to do this..

    here is the capx I was working with...

  • yes, that's what I meant about "newlines" or "carriage returns". You need to count them as a full line by themselves.

    I'm not that great at string parsing in C2 but maybe the best way would be to replace all the "newline"s or "enters" with spaces (or any character for that matter) just so you can count all the characters to make the correct amount of lines.

    so let's say your TextBox's line height is 7 (pixels) and your line width is 20 (characters)...

    Set TextBox1 Text to ("This is my text." & newline & newline & "And this is a new paragraph.")
    Call Function AutoTextHeight("This is my text." & newline & newline & "And this is a new paragraph.")
    [/code:2m5u4q9r]
    and in the Function do this:
    
    [code:2m5u4q9r]
    Function AutoTextHeight-------------
    replace(Function.Param(0),newline,"XXXXXXXXXXXXXXXXXXXX")  //this will replace all your "enters" with Xs
    
    Set TextBox1 Height to (len(Function.Param(0) / 20) * 7 // divide by the linewidth and multiply by lineheight[/code:2m5u4q9r]
    
    you would need to pass the UID of the Text Object to "pick" it.. or you don't even need it in a function.  Just make sure to set the Text with the "enters" then make a copy of the string to replaces the "enters" for counting only. You don't want the actual Xs in your text.
  • so you basically want to "wrap" your text? Meaning make it so it doesn't cut off or not display text if it is too long for the height you gave it in the editor?

    Never tried it before but here's an idea:

    Account for which font and how many "W"s (or your font's widest letter) would fit in the given width; check how many characters are in your text string (making sure to check for newlines) then just do the math... Also you need to figure how much height to add with each newline.

    if 50 is your letter width max and you have 150 characters (including spaces) you add (3 * lineheight) to your TextBox's height.

  • Audacity is great because it's free... although not exactly user friendly for the audio novice. But there are some cool plugins for it like PaulStretch. Make sure to watch Youtube How-To videos.

  • Inkscape.. it does crash sometimes, but I like it a lot better than Illustrator. Unless you are a serious art producer, I'd say Inkscape is more than you'll ever need.

  • doesn't srand() get the runtime time and use that as a seed? I think that is plenty random enough, pseudo or not.

    as someone mentioned - maybe if you are dealing with casino style games for actual money you might need "true" randomness. But I would think the majority (if not 99.99%) of the games created with C2 will be more than adequate with Random().

    Believe it or not, I've actually tested C2's random function against some dice while I was in the design phase a while back. The game was only on paper at that point; I wanted to know how long it would take a player to collect item drops that were only dropped based on a random number range. The percentages were basically the same. I ran the test many times until I was comfortable with C2's randomness. Now I use it all the time without hesitation.

  • bad movies... or movies you've seen a bunch of times..

    it's cool to have something on in the background that you don't care about.. but is entertaining enough that you can tune into it when you are doing something tedious... it has to be the right thing though..

  • no music.. it takes to much focus..I have Netflix going on my iPad or iPhone and put a really bad movie on... or reruns of The Office.

  • you could probably modify what they are doing in this tutorial to suit your needs..

    https://www.scirra.com/tutorials/321/ho ... game-slots

jobel's avatar

jobel

Member since 27 Jul, 2013

Twitter
jobel has 8 followers

Connect with jobel

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x4
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies