Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
o.m. 94
Nov 23, 2009

Quick and dirty visualisation of the Mandelbrot set using pygame. Code is here if anyone is interested or has any suggestions to make. Next I need to put it in an event loop and give mouse control to move about / zoom.

Adbot
ADBOT LOVES YOU

o.m. 94
Nov 23, 2009

Grabulon posted:

Color each pixel not in the mandelbrot set based on the number of iterations it takes to find it out.

That took longer to work out than I thought! :downs:

o.m. 94 fucked around with this message at 15:54 on Jan 1, 2012

o.m. 94
Nov 23, 2009

evensevenone posted:

Color the inside of the set by the periodicity of the orbit that the series converges to.

Actually if you look closely, I'm invoking the unramified Galois p-module over the extended reals in Sigma_e to determine the co-cycles, all of which are reducible in C and thus have points that are rendered black

o.m. 94
Nov 23, 2009

karma_coma posted:

Yes, it does. Influenced heavily by the already excellent roguelike Prospector.

I don't have much of the spaceship part done except for going to different planets/space stations and poo poo. No space combat yet and I'm honestly kind of dreading figuring out roguelike spaceship combat :/

I had a look at the Prospector source and oh my god

pre:
for a=0 to last_ae
        if areaeffect(a).typ=1 and areaeffect(a).dur>0 then
            areaeffect(a).dur=areaeffect(a).dur-1
            if areaeffect(a).typ=1 and areaeffect(a).dur=0 then dprint "the ground rumbles",14'eartquake
            if areaeffect(a).typ=1 and areaeffect(a).dur=0 and findbest(16,-1)>0 and rnd_range(1,6)+rnd_range(1,6)+player.science(1)>9 then dprint "Originating at "&areaeffect(a).c.x &":"&areaeffect(a).c.y,14
            for x=areaeffect(a).c.x-areaeffect(a).rad to areaeffect(a).c.x+areaeffect(a).rad
                for y=areaeffect(a).c.y-areaeffect(a).rad to areaeffect(a).c.y+areaeffect(a).rad
                    if x>=0 and y>=0 and x<=60 and y<=20 then
                    p1.x=x
                    p1.y=y
                        if distance(p1,areaeffect(a).c)<areaeffect(a).rad then
                            if show_eq=1 then
                                locate p1.y+1,p1.x+1
                                print "."
                            endif
                            'Inside radius, inside map
                            if areaeffect(a).typ=1 then 'eartquake
                                if areaeffect(a).dur>0 then
                                    if x=awayteam.c.x and y=awayteam.c.y and rnd_range(1,6)+rnd_range(1,6)+player.science(1)>9 then
                                        dprint "A tremor",14
                                        if findbest(16,-1)>0 and rnd_range(1,6)+rnd_range(1,6)+player.science(1)>9 then dprint "Originating at "&areaeffect(a).c.x &":"&areaeffect(a).c.y,14
                                    endif
                                else
                                    areaeffect(a).dam=areaeffect(a).dam-distance(p1,areaeffect(a).c)
                                    if areaeffect(a).dam=0 then areaeffect(a).dam=0
                                    tmap(x,y)=earthquake(tmap(x,y),areaeffect(a).dam-distance(p1,areaeffect(a).c))                                                
                                    if planetmap(x,y,slot)>0 then planetmap(x,y,slot)=tmap(x,y).no
                                    if planetmap(x,y,slot)<0 then planetmap(x,y,slot)=-tmap(x,y).no
                                    if rnd_range(1,100)<15-distance(p1,areaeffect(a).c) then lavapoint(rnd_range(1,5))=p1
                                    if rnd_range(1,100)<3 then 
                                        lastlocalitem=lastlocalitem+1
                                        lastitem=lastitem+1
                                        li(lastlocalitem)=lastitem
                                        item(lastitem)=makeitem(96,-3,-3)
                                        item(lastitem).w.x=x
                                        item(lastitem).w.y=y
                                        item(lastitem).w.m=slot
                                    endif
                                            
                                    for b=1 to lastenemy
                                        if enemy(b).c.x=x and enemy(b).c.y=y then enemy(b).hp=enemy(b).hp-areaeffect(a).dam+distance(p1,areaeffect(a).c)
                                    next
                                    if x=awayteam.c.x and y=awayteam.c.y and areaeffect(a).dam>distance(p1,areaeffect(a).c) then 
                                        dprint "An Earthquake! "& damawayteam(awayteam,rnd_range(1,areaeffect(a).dam-distance(p1,areaeffect(a).c))),12
                                        player.killedby="Earthquake"
                                    endif
                                    areaeffect(a).dam=areaeffect(a).rad
                                endif
                                    
                            endif    
                        endif
                    endif
                next
            next
        endif

o.m. 94
Nov 23, 2009

karma_coma posted:

Dammmnn. I've talked to that guy a few times and he's not really proud of his code but the game is still a lot of fun. My ultimate goal is combining the fun exploration of Prospector with the fun combat of DoomRL. I'm getting there..slowly. :)

Yeah, Prospector owns. But next time you speak to him, introduce him to the spacebar

o.m. 94
Nov 23, 2009

Is that... QuickBasic?

o.m. 94
Nov 23, 2009

HTML5 / Canvas Go tutorial in order to learn Javascript; it's been relatively painless so far- I can load up boards of 9x9, 13x13 and 19x19. Soon I'll have to implement the game logic which will no doubt be the real challenge.

o.m. 94 fucked around with this message at 14:37 on Oct 16, 2012

o.m. 94
Nov 23, 2009

There's a fairly good intro post in this thread. Find your way to ITGO on KGS and I'll give you some teaching lessons...

o.m. 94
Nov 23, 2009



Click for bigger

It's a browser "game" inspired by incremental clicker/idle games. Basically you sit there and let it run and your representative in the world goes out to harvest stuff for you. Of course, to get the rarer items, you'll need to craft items which boost your stats. These items use up items in your inventory, and you can only boost your stats so far in one direction in the game. HOWEVER, you can "soft reset" which resets your stats and clears your inventory but keeps your log of items/creatures you've discovered, so you can refocus your character on the next run to be better at getting drops from combat, rather than say, foraging. Once you collect every item, fight every monster, and get all the flavour text you get the final achievement and are free to depart this realm. I know its dumb but there are more boring ways to learn JavaScript I guess!!!!

Adbot
ADBOT LOVES YOU

o.m. 94
Nov 23, 2009

Sergeant Baboon posted:

This sounds like fun, do you have it online somewhere that we can play it?

Hm I was hoping to develop this more first as like I say there's no interaction yet but to be honest if I can get critiques on my JS that would be awesome. It's using bootstrap and jQuery. The content is generated from text files and inserted dynamically, so the items can be added really quickly without having to hard code anything into the template or write a large object in code.

Here!. Please note that it is very early days and right now there is nothing you can do but sit and watch your collection grow. There is no interaction yet. Try editing CWind.Player.perception or similar between 1 and 10 and I'll increase your drop rate for certain items

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply