Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1382375 Posts in 66045 Topics- by 58457 Members - Latest Member: Skermunkel

September 24, 2020, 02:25:45 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsMegaCity
Pages: 1 [2] 3
Print
Author Topic: MegaCity  (Read 7737 times)
SuperDisk
Level 2
**



View Profile
« Reply #20 on: November 13, 2012, 12:06:31 PM »

That nice Smiley keep the good work Smiley

Thanks!

I'm having some trouble with circular imports, so hopefully that will be resolved soon enough...  Droop
Logged
SuperDisk
Level 2
**



View Profile
« Reply #21 on: November 20, 2012, 04:36:39 PM »

No one gave me any enlightenment on how to cleanly fix the circular imports, so for now I'm just doing the stupid

Code:
import states.minicitystate

and using it rather than doing

from
Code:
states.minicitystate import MiniCityState

and just using MiniCityState.

 Angry
Whatever. The project continues  Corny Laugh

In the news department, I gave the credits screen its own state rather than having FallingButton, because it was just causing more harm than coolness. The image is still a button though.
Logged
SuperDisk
Level 2
**



View Profile
« Reply #22 on: November 22, 2012, 09:14:47 AM »

Didn't work on anything much yesterday but did make a small game:

https://github.com/SuperDisk/DEBATE

It's inspired by Oddball's Argue Mentor, but made in Python.

This doesn't seem related to MegaCity, but it contains some tests of network code that I'm going to incorporate to MegaCity (in a much cleaner way than that, of course)

But yeah. Rules are about the same thing as Oddball's, but you can set your own topic and timeout.
Logged
SuperDisk
Level 2
**



View Profile
« Reply #23 on: November 25, 2012, 11:12:23 AM »

Added creation and deletion of saves.  Smiley

(Just blank files, because of no gameplay yet  Angry)
Logged
SuperDisk
Level 2
**



View Profile
« Reply #24 on: November 25, 2012, 07:42:02 PM »

Tile tests with gameplay. A map full of tiles runs at about 50 FPS, which is below my target 60..  Lips Sealed

Probably needs more optimization.

(Should I be merging this all into one post?)
Logged
Belimoth
Level 10
*****


high-heeled cyberbully


View Profile
« Reply #25 on: November 25, 2012, 07:45:14 PM »

No, separate updates are acceptable.
Logged

SuperDisk
Level 2
**



View Profile
« Reply #26 on: November 26, 2012, 01:48:09 PM »

Found the reason for some of my framerate woes. The collision checking function loops though all objects in the room and does pygame's colliderect method with them. I didn't know this was incredibly superslow until each object does this every frame with 1024 objects.  Corny Laugh


Time for fixes.

EDIT:
Actually, it's not colliderect at all! It's just looping through all objects for every object is.. really slow. I have no idea how to get around this.

2EDIT:
Actually, it's none of that. My entire system of optimization was just slowing the entire thing down. When I disable the optimizer, my framerate spikes up from the usual 50 to 80. What a waste of work.  Tired
« Last Edit: November 26, 2012, 02:32:03 PM by SuperDisk » Logged
SuperDisk
Level 2
**



View Profile
« Reply #27 on: November 29, 2012, 05:27:33 PM »

Added chip (tile) placement and editing. Works at 60 FPS and you can place and remove chips. I'd make a GIF but my host dumped me for too much RAM use.  Lips Sealed
Logged
SuperDisk
Level 2
**



View Profile
« Reply #28 on: December 01, 2012, 11:09:51 AM »

Added a (world) Generator class that functions like so:

Code:
class Generator:
    def __init__(self, chipboard):
        self.board = chipboard

    def generate(self):
        for pos, chip in self.board:
            self.board.setChip(pos, Grass())

Code:
self.chipboard = ChipBoard((255, 255))
self.generator = Generator(self.chipboard)
self.generator.generate()

And that would generate you a flatmap of grass. It also lets me have multiple world generators or let users make their own or something. Yay.
Logged
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #29 on: December 01, 2012, 11:13:06 AM »

Could you please add some working screens?
Every picture you uploaded till now doesn't work anylonger.  No No NO
Logged

SuperDisk
Level 2
**



View Profile
« Reply #30 on: December 01, 2012, 11:36:44 AM »

The host I had dumped me, and the Gifs that my giffer makes error out on tinypic, imageshack, and some other site that I forgot the name of. I suppose I'll try to find a host.
Logged
kamac
Level 10
*****


Notoriously edits his posts


View Profile
« Reply #31 on: December 01, 2012, 01:44:53 PM »

http://www.postimage.org/

should do.
Logged

SuperDisk
Level 2
**



View Profile
« Reply #32 on: December 01, 2012, 02:06:31 PM »



I cropped the image to just the relevant parts. Yay.
« Last Edit: December 01, 2012, 02:21:16 PM by SuperDisk » Logged
pluckyporcupine
Level 9
****


View Profile WWW
« Reply #33 on: December 01, 2012, 02:30:42 PM »

I always use imgur.
Logged

SuperDisk
Level 2
**



View Profile
« Reply #34 on: December 01, 2012, 06:24:01 PM »



Just read about a cool SDL hack and I thought I must try it.
Had to replace Pygame's input things with my own (GetAsyncKeyState rather than Pygame's listening to window events) and it kinda works except the mouse is offsetted by a lot.
Logged
SuperDisk
Level 2
**



View Profile
« Reply #35 on: December 04, 2012, 02:47:54 PM »

Horrible web design. I got the HWND stuff automated so now if I just run the Java app the game loads as well.



And on the non WebCity department:



Everyone loves animated water, right?  Huh?

This game is actually progressing far faster than I thought it would.  Hand Metal Left
« Last Edit: December 06, 2012, 01:06:38 PM by SuperDisk » Logged
makerimages
Level 2
**


Makerimages Studios


View Profile WWW
« Reply #36 on: December 06, 2012, 06:13:23 AM »

need actual ingame scrrens, or a follow wont happn
Logged

Makerimages-Its in the pixel
SuperDisk
Level 2
**



View Profile
« Reply #37 on: December 06, 2012, 01:02:37 PM »

There are some actual ingame screens, but they keep getting taken down by horrible hosts around the world.  Angry

What do you mean by follow?
Logged
SuperDisk
Level 2
**



View Profile
« Reply #38 on: December 12, 2012, 05:42:06 PM »

Now that I've got a 32x32 editable terrain, it's time to expand my horizons into infinity..

Here comes the hard part of splitting it up into chunks and making it not lagtastical.  Huh?
Logged
SuperDisk
Level 2
**



View Profile
« Reply #39 on: January 18, 2013, 10:55:11 AM »

After delaying a long time on this, I picked it back up for a bit to correct some problems.

Complexity has been added, and there is a lot of cruft in the engine.

Here are a few dandies.
Code:
'''1/18/2013 This flag was a horrible idea, so now, it's turned off'''
        optimize = False
        #optimize = self.elementcount < 1024

        ''''11/26/2012 Optimizer disabled'''
        #Lags the game much more than it ever fixed. Sigh.
       
        #Update these rects after element updation
        if optimize:
            updatethese = []

However! Not everything is cruft. I added a new thing called the "Sub-Engine" that lets you specify a Frame, and it will load it as an element in the currently running Frame.

Think Sub-Applications in MMF2.  Smiley Hand Thumbs Up Right
Logged
Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic