DarkShroom's Forum Posts

  • creative commons sucks, u can't sell it, it's all good an well these guys being "saints" and giving away there collection but they're not really because you can't use any of it.

    negative but true

  • I don't know personally.

    I so far have not been too impressed with the performance of the HTML5 Javascript combo.

    That said you guys don't have to be defensive and worry because the industry is right behind you making middle ware to improve your game performance if you get a hit, so your games being HTML5 they are fairly portable.

  • thanks for your informative replies as ever,

    the dir() function looks like what I need, I never got along with PyShell but I dropped dir() in my normal code and wow!

    this dir command is going to help me out with other stuff to wow, incredibly useful I just chuck objects in it, finally can check out the grid movement because that didn't have any header files

  • Hi

    I have searched and searched and for the life of me cannot find any way to set maybe like the horizontal speed which you can by events, but by python?

    Is it documented anywhere what things you can access?

    it would be great if someone could point me in the right direction.

    as far as I got is on the wiki it mentions the Bullet behavior so I think it must be possible:

    SOL.SpriteBullet.Speed = 30

    update good god wow solved:

    SpriteCustomMovement.ChangeHorizontalSpeed("",320,320)

    and i have no idea why it takes 3 arguments, but the names of this stuff are in the headers files

  • actually in the end i decided just copy my frames in as i don't really have many frames, with python i can go:

    "Sprite.LoadFrameFromFile("Picture.png")

    but i don't think i can load into other animation frames so it's pointless as yeah like you're pointing out i don't want to be constantly loading data

  • it was another 2 year old resurrection thread

  • I like the idea I am just wondering if even steam will have a problem with your title lol

    I also enjoy rougelike mechanics however I think you have to be careful to make this enjoyable for the player.

    I really recommend playing tower climb as a perfect example of rouguelike balancing in my personal opinion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • class EventTimer:

         iClock = 0 #incremented each frame

         Events = [] #[iTime, cCodeToExec]

         def AddEvent(self, iTime, cCodeToExec): #keep it neat, add events with this function

              self.Events.append([iTime,cCodeToExec])

         def CallEvents(self): #run once each frame

              for n in range(0, (len(self.Events))):

                   try:

                        if self.Events[n][0] <= self.iClock:

                                            

                             text1.text = self.Events[n][1] #i suggest trying it first to make messages not events

                             #exec self.Events[n][1] #Now this bit is YOUR job xD, exec can run strings as code

                                                     

                             del self.Events[n]

                   except:#when the del is called it reduces the list size, causing an exception, another thing is certain events can be missed until the next frame because of this

                        pass

                        

                        

    Events = EventTimer() #create a class, keep it neat!

    Events.AddEvent(200, "Hello") #here some examples, note this is just next, you could call functions in here and run with the exec

    Events.AddEvent(400, "There")

    Events.AddEvent(600, "Good")

    Events.AddEvent(800, "Sir")

    #In your game loop, I suggest every frame calling this

    Events.iClock += 1 #increment the clock

    Events.CallEvents()

    Hello, my first "tutorial", I hope you enjoy this little demo of how one would go about causing things to happen in the future in Python. Shock horror you may have added "import time" and found it freezes the game! What you need is an eventing system. Released under the do what the frak you like license.

    Now it's presented as a text messaging system because exec is a troublesome command, it's really up to you if you opt for this or some other solution. Me personally this is my first dynamically typed language so exec it makes me a bit uneasy but I am starting to see how epic it can be for scripting a game.

    A few words about the exception, the list shortens with the del command WHILE we are still in the for loop, now this is a little bit of bad practise but I code this way as it's more efficient. You may need to bear in mind some events could be missed on a cycle, they will get called next frame (notice the greater or equal than comparison)...I decided this was the best way for my stuff, something to ponder

  • Sprite01.LoadFrameFromFile("Lava1.png")

    this seems to work but it loads the same picture for every instance of a tile something i think many before me have encountered as a problem!

  • yeah sorry R0J0hound came to the rescue and gave me the answer.

    i was just going epicly mad.

    python is the only option for me due to the complexity of what I want, although that scripting system is pretty cool it starts to encounter it's limitations when you want to target a certain particular instance of a sprite, it has like this sort of assumption system where it was like the last thing you spawned.

    I have a class with functions now that can create a grid of tiles/sprites anything, as per an array etc. Roj provided a bit of code that does not even need to be understood if you knick my funtion you can begin work on python along the lines of:

    Bob = Spawn(Sprite01,128,256,3)

    Ted = Spawn(Sprite01,128,256,3)

    Bob.Destroy()

    now I guess the only way to do that in the event system is to select an object at a location, now that aint no good if bob goes for a walk. I posted the function in my SOL thread.

  • i wanted to share the code that has evolved from your advice:

    #####

    def Spawn(sSpawntype, x, y, iSpawnLayer):

         System.Create(sSpawntype, iSpawnLayer, x , y )

         cCodeToExec = "ref = SOL." + sSpawntype + "[0]"

         exec cCodeToExec

         return ref

    ####

    Then if you want to spawn something and never loose it:

    EvilBadGuy1 = Spawn(sSpawntype, x, y, iSpawnLayer)

    ####

    Thanks so much the possibilities are endless with this i can stream the tiles in and out as you walk about etc, awesome.

    When I found Python could build and run strings well I just knew I would be I was in love with this xD

  • 1st...

    no wait

  • i consider raycasting a 3d technique, i know that essentially the maps are 2D but you need to save wall textures and are preferable going to need to draw the map with vectors, two things 2d does not expect.. it's like trying to use the wrong tool for the job because this is more the domain of a 3d game engine...

    and the engine i'd suggest would be the doom engine.. it's open source xD

  • I would worship the ground someone walks on if they could find a way to make a fullscreen game that doesn't limit my options in some way (eg. Scroll rates get messed up, games becomes extremely pixelated, game slows down dramatically etc.)

    I've tried basically everything and there's simply no conventional way of doing it. Some very inconvenient problems arise with each and every method I've tried, and it really slows my progress down.

    I guess you could say this is a last plea. Is there anyone out there who can create a fullscreen game minus the tough issues that always seem to come with it?

    i have to admit i have not experienced these issues?

  • this is interesting, so it is possible to have animations with tiled textures but you seem to be loading them with events somehow.

    this interests me because i need a way of having water and duplicating tonnes of tiles seems wasteful, i've resorted to stretching the pictures a bit which is loosing my 16x16 art style a bit.

    You wouldn't be able to guide me towards a texture sheet type implementation would you? Is it feesable to have the frames as seperate png's still (i have 4 water frames)? I I like the idea of external resources it's getting messy xD

    EDIT **i got what i needed from Sprite.LoadFrameFromFile("Picture.png")   ... it's a little less flexible than what you're doing but suitable for my needs